[PATCH] subrepo: Update .hgsubstate in case of deleted subrepo
Saint Germain
saintger at gmail.com
Sun Feb 21 16:42:45 CST 2010
On Fri, 19 Feb 2010 22:30:17 +0100, Dirkjan Ochtman
<dirkjan at ochtman.nl> wrote :
> > The question I have is: "What happens when person A
> > deletes .hgsubstate and .hgsub and then tried to merge with person
> > B who has added a new subrepo to .hgsub (and
> > therefore .hgsubstate)?"
>
> I think it asks, but of course it's relatively easy to check this.
>
> Cheers,
>
> Dirkjan
Hello,
I was surprised, but it seems that whether deleting .hgsub/.hgsubstate
or not, it is not possible to push a new subrepo to a main repo:
hg init main
cd main
hg init nested
echo test > nested/foo
hg -R nested add
hg -R nested ci -m test
echo nested = nested > .hgsub
hg add .hgsub
hg ci -m "Add nested"
cd ..
hg clone main main2
cd main2
hg init nested2
echo test > nested2/foo
hg -R nested2 add
hg -R nested2 ci -m test
echo nested2 = nested2 >> .hgsub
hg ci -m "Add nested2"
hg push ../main
However if the new subrepo is manually cloned to the correct place
(from main2/nested2 to main/nested). Then when trying to push main2 to
main (or to pull main2 from main), it is aborted because it creates a
new head.
Regards,
More information about the Mercurial-devel
mailing list