Closed dusty-phillips closed 11 years ago
The travis build is fixed for 2.2.2, but it's still failing for 1.9.1. I also fixed a braindead bug that meant the tag commits were always pushed to default instead of the branch being tagged. I'm a lot happier with this PR now, but I'd still like some feedback.
Pushing heavyweight tags is now supported, and Travis is finally content. While feedback would still be nice, I am comfortable merging this pull request; anything wrong can be addressed in future.
I'm constructing this pull request to address #44. I would like some feedback, as I'm not confident this design is completely robust, or even the correct plan of attack at all.
I'm inclined to include it into the next release, though, so we can say, "now supports pushing tags" even if it doesn't support all the edge cases.
What edge cases? I think it works flawlessly if you git tag and git push --tags right away, with no other commits. But if you delay between the tag and push, then the date of the commit message in hg won't be directly matching to the date you made the tag. This doesn't matter with lightweight tags since they don't appear to store a date anyway. Heavyweight tags are the other edge case; I haven't tested that at all. Also, git push --tags origin may or may not work; I've created one test case that passes, but I'm not sure it's tested enough.
Additionally, I'm not very fond of the code in here. It was copied out of mercurial because mercurial's crap-ass API didn't separate logic enough for me to call it in separate steps. And the copied code is ugly. But I don't know if anything prettier would work.
Edit: According to Travis, it also doesn't work on Mercurial 2.2.2 or older.