4 ms·
GitHub's Hg-Git mercurial plugin
- jokull 17y agoThis is how GitHub is going to win BitBucket. Maybe.
- tumult 17y agoWhy does one have to defeat the other?
- jokull 17y agoDon't have to. My guess is that one is going to come out on top eventually.
- bayareaguy 17y agoI still find BitBucket more useful since GitHub has no free plan that offers secure transfers.
- jherdman 17y agoWow. These guys are on top of their game. I'm impressed! I've been using Mercurial at work, and generally Git at home. This could definitely simplify my toolbox a bit. I need to spend some more time with Git, but right now Mercurial is edging out for me.
- pieter 17y agoPresumably this changes the hashes? Is there some tool that converts git sha's to hg sha's, so you can still do something like `hg log <some git sha someone gave you>`? I guess that sort of stuff will cause the most confusion, just like local revision numbers can cause confusion (with hg and bazaar).
- deleted 17y ago[deleted]
- schacon 17y agoThere is a mapping from Git SHAs to Hg SHAs. Technically we could add a command to run an Hg log from a Git SHA since we have a one to one mapping, but it's generally easier to not have to really know what the Git stuff is. You should be able to work in Hg with all your normal workflow, but push and pull from a server with a git+ssh protocol instead of an Hg server. It should be mostly transparent for the Hg user, and a developer using a Git client should not be able to tell that commits authored by an Hg developer was even using Hg. The data stored by both systems are not hugely different.
- pieter 17y agoOK, but what about sha's you get from others? Someone references a sha in an email, or on IRC, or you find a reference to something in a bug report, or a gitweb search..
- jhawk28 17y agoI wonder if this is related to the GSOC 2009 project? http://socghop.appspot.com/student_project/show/google/gsoc2009/hg/t124022472367 http://socghop.appspot.com/student_project/show/google/gsoc2...
- schacon 17y agoIt is not related. I happened to really get going on this project at roughly the same time as the GSOC stuff came out, but the student that was working on that seems to have stopped.
- maw 17y agoSlick, but isn't it only half the job? If I use mercurial to clone from a git repo, is there a way to publish the work I do on top using mercurial in a way accessible to git users? Still, this is a step towards it not mattering which tool you use if you want or need to collaborate with others—definitely a good thing.
- schacon 17y agoYes, you can push to a Git repository and hg-git will convert the hg commits you did in the meantime to Git objects and push them upstream. The tool is losslessly bi-directional. Developers using Git or Hg clients can push and pull from a Git server without necessarily knowing what client the other developers are using.
- utx00 17y agowhat if someone changes git history? some rebasing or something like that? how does it affect downstream hg clients? thanks.
- ubernostrum 17y ago"what if someone changes git history? some rebasing or something like that? how does it affect downstream hg clients?" I was under the impression that even among Git users, editing the history of something you've already pushed to others/allowed others to pull from is to be punished by public humiliation.
- tomjen 17y agoNow we only need one that go the other way so I don't have to use git to clone stuff from github.