Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added repository status to the CLI status display. #86

Merged
merged 6 commits into from
Jun 21, 2014

Conversation

acant
Copy link
Collaborator

@acant acant commented Jun 19, 2014

This will show if the watched repositories are fully committed or need to be synced.
It will be particularly useful to see if a fetch_only repository has commits which can be merged.

This is displayed in the watched repository table in the CLI status.
In the process I have also extracted the code for checking if the working
directory is dirty into its own method, and test it.
@nesquena
Copy link
Owner

Looks like the travis CI build failed?

@acant
Copy link
Collaborator Author

acant commented Jun 19, 2014

Yeah, there seems to be an issue with the character that I am using for marking needs_sync in the CLI, but only in ruby1.9. It was generating a syntax error, but I changed the character and added the encoding string, and now Aruba seems to not properly understand the character.
But it does work fine in Ruby2.0, so I am hoping that I just need to specify the encoding more precisely to resolve this.

This is a good practises in general, but hopefully it will also make
the UTF-8 characters that I wish to use in the CLI work consistently
across Ruby1.9 and Ruby2.0.
This is also displayed in the watched repository table in the CLI
status. Shows if the repository needs to be pushed or merged.

Not using any fancy UTF-8 symbols for the status as they will not always
work in ruby1.9. Maybe try this later when 1.9 support is dropped.
I think that this makes the logic of the when to push or sync a little
easier to read.
Which hopefully will avoid failures due to slow execution on Travis.
@acant
Copy link
Collaborator Author

acant commented Jun 21, 2014

@nesquena ready for a review and merge
I removed the UTF-8 characters that I was trying to use in the status output used more plain ASCII characters, which fixes the failures under ruby1.9. We could try adding this again later if there is a method for consistently setting UTF-8 in ruby1.9, or when we drop support for ruby1.9.
But not really a big deal, the ASCII characters work well enough.

@acant
Copy link
Collaborator Author

acant commented Jun 21, 2014

Forgot to update the CHANGELOG, but that should be fixed now.

@nesquena
Copy link
Owner

Awesome! Looks good, thanks for updating the changelog too.

nesquena added a commit that referenced this pull request Jun 21, 2014
Added repository status to the CLI status display.
@nesquena nesquena merged commit 21bcf67 into nesquena:master Jun 21, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants