From: <Ro...@ro...> - 2017-10-08 15:41:01
|
On 07/10/17 09:54, Jeff Allen wrote: > It's not technically possible to merge the hg repo into the new git one derived from CPython's. I converted hg.python.org/jython-docs/devguide to git (using hg-fast-export), but the commits we would recognise as the same are not accepted as the same by git. > > Git merge relies on finding the common ancestor I believe. If we want to keep pulling from the CPython version, we have to derive our guide from that, visibly to git. (Not that I'd thought this through in advance.) Please have a look at "git replace". I have used it in the past in such situations it worked great. In my specific case I wanted to "stitch" old SVN history imported via reposurgeon to an already existing GIT-history. git-replace basically instructs git to treat one commit as equal to another one. All tools will deal with this transparently and see the new commit instead of the old commit. You might want/need to create an artificial commit to stitch the two histories together. Please note that the replace-refs are not pulled automatically on git fetch/clone, so it is still advisable to rewrite the history if there are not many other branches that rely on the repo. > I'll cherry-pick bits of text manually, which is more likely to be accurate than if I wrote them from scratch, and a bit quicker. Also, restoring the Mercurial instructions seems a good idea, rather than describing only a future world. > > Jeff Allen |