dusty-phillips / gitifyhg

Tools for using git as a client to mercurial repositories
GNU General Public License v3.0
62 stars 17 forks source link

Tags that already exist upstream are retagged when running git push --tags #46

Closed dusty-phillips closed 11 years ago

dusty-phillips commented 11 years ago

I tried the new tagging feature in production and discovered that git push --tags creates commits for all the tags, not just the new ones it has created locally.

dusty-phillips commented 11 years ago

Part of the problem is that when we read the previous .hgtags from the repo, we always get an empty file because the repo is never updated from revision 0. I think we need to do the equivalent of hg catting the file at the tip or branchtip revision instead.

alexsydell commented 11 years ago

Would running 'hg tags' (there's probably an equivalent hg api function) work?

dusty-phillips commented 11 years ago

My original attempt used repo.tag(), but that just attached a new tag to the zeroth commit and also didn't load new tags. The mercurial API is truly crap.

jedbrown commented 11 years ago

On the crap API, my impression is that most of its failings are really due to exposing implementation details of revlog, which is perhaps "convenient" for mostly-linear development, but really awkward (and sometimes a performance issue) for more concurrent and more "mutable" workflows. Exposing that stupid sequence number was a monumental mistake.

dusty-phillips commented 11 years ago

Well, to be charitable, they never claimed to implement a public API. But considering that the core product is insufficient and relies on extensions to supply basic utility, the lack of a public API is definitely not a feature.