subrepo grand plan

Dominik Psenner dpsenner at
Thu Oct 20 08:50:16 CDT 2011

>> d) make commit subrepo aware
>> This may sound silly, but as far as I understood subrepositories, a
>> repository tracks subsets of its subrepository changeset hashes.
>> commit to a parent repo then behave like this?
>> Assuming to have following repositories:
>> P := parent repo
>> A := subrepo A
>> B := subrepo B
>> A commit to the parent repository P executes:
>> hg commit A # commit file changes
>> hg commit B # commit file changes
>> cat tip(A) > .hgsubstate
>> cat tip(B) >> .hgsubstate
>> hg commit P # commit new head with valid hash subset and file changes
>That is how subrepositories work today :)

I just got lost. :-) 

As far as I'm concerned subrepos should behave recursive where it makes
sense and it is important that mercurial is consistent about this. I would
expect that status shows me explicitly all changes, including changes in
subrepos. Further I would expect that update updates the repository P as it
is written down in .hgsubstate. Diff on the other hand should show all
changes, including the changes within subrepos, etc.


More information about the Mercurial-devel mailing list