Skip to content

Conversation

@ryneeverett
Copy link

Both Git and Mercurial have the option to write an annotated tag in the
$EDITOR. Expose this when --tag-message is passed with no argument.

Both Git and Mercurial have the option to write an annotated tag in the
$EDITOR. Expose this when --tag-message is passed with no argument.
subprocess.check_output(command)
elif message is None:
command += ['--annotate']
subprocess.call(command)
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This doesn't check the exit status like check_output did. There is check_call. Since the project is marked Python 2.7+ I don't think that'll be a problem.

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Turns out I was confused with check_output (which is 2.7+), check_call exists since 2.5 so even less of a problem.

@ekohl
Copy link
Owner

ekohl commented Feb 28, 2016

This changes it to always tag with a message and I'd like to keep the option not to tag with a message.

@ryneeverett
Copy link
Author

This changes it to always tag with a message and I'd like to keep the option not to tag with a message.

I don't think this commit changes that behavior -- message is only None if --tag-message is passed with no arguments. If I understand it correctly, in your branch the only way to have no tag message is by passing --tag-message '' and I believe I've preserved that behavior since that test (test_unannotated_tag) still passes.

- subprocess.call -> subprocess.check_call
- Fix test.
@ekohl
Copy link
Owner

ekohl commented Feb 29, 2016

I was slightly surprised there was no test for 'without message' so I'm going to verify. Otherwise I think this is looking like a nice addition to my patch.

@ryneeverett
Copy link
Author

Thanks for the review. At first I was thinking this should be merged into your branch/PR but now I'm thinking I should submit it as a separate PR to upstream. It doesn't change much of your work and given that #58 has been under review for over a year it would be a shame to start the review process over. Thoughts?

@ekohl
Copy link
Owner

ekohl commented Mar 1, 2016

I was thinking of further reviewing your comments and then keep it as a separate commit. That should make reviewing simple enough. I don't think the size of peritus#58 matters that much, there's simply a lack of time at all.

@ryneeverett
Copy link
Author

Cool.

@ekohl
Copy link
Owner

ekohl commented Mar 28, 2017

My apologies for never getting around to it. I'm going to close this now but please open a PR against https://github.com/c4urself/bump2version which is a fork and released on pypi.

@ekohl ekohl closed this Mar 28, 2017
ekohl pushed a commit that referenced this pull request Jan 18, 2018
Allow creating annotated tags
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.

2 participants