modifying converted repos and github pull requests

Bryan Murdock bmurdock at gmail.com
Fri Oct 4 21:35:54 UTC 2019


On Fri, Oct 4, 2019 at 6:01 AM Benito van der Zander <benito at benibela.de> wrote:
>
> Hi,
>
> I keep all my projects in one big mercurial repo. It contains public and private projects, so to publish changes to the public projects, I split it with hg convert into smaller repos - one for each project - and then uploading them on github with hg-git. When I make changes in the big repo, I run hg convert and the git export again, which works well.
>
> Is it possible to make changes to the smaller repos directly without breaking later converts.
> Like removing a file that was included in the wrong subproject?
> Do you just need to replace the hash of the old tip with the hash of the new tip in shamap ?

That sounds like it should work.  It's easy to test on a throwaway
clone of a small repo, isn't it?

> How can I merge pull requests from github to the big repository?

This sounds harder, due to the problems you describe below.  Convert
is pretty much a one-way tool.  I think that if there are changes that
you want in both the big and small repo you are always going to have
to commit them to the big repo first.  That would mean making a patch
from the github PR, applying that patch to the big repo, and then
using covert to get it from the big repo to the small repo.  I don't
know, maybe others will have better ideas.

> When I just copy paste the changes in the big repo, the resulting commit after the conversions has a different hash and github shows it as unmerged.
> If I merge it in the small repo, it might confuse hg convert, and is still not in the big repo.

Bryan



More information about the Mercurial mailing list