[issue1852] subrepos with relative paths always push/pull relative to default, even when pushing to a different path

Steve Losh bugs at mercurial.selenic.com
Sat Oct 3 12:53:10 UTC 2009


New submission from Steve Losh <steve at stevelosh.com>:

If you use a relative path for a subrepo in .hgsub:

    subrepo = ../subrepo

And if you have two paths set up in mainrepo/.hg/hgrc:

    [paths]
    default = ssh://server1/repos/mainrepo
    mirror = ssh://mirror/repos/mainrepo

Then running "hg push mirror" in the main repo will attempt to:

  * Push subrepo to ssh://server1/repos/mainrepo/../subrepo/
  * Push mainrepo to ssh://mirror/repos/mainrepo/

If there were changesets to the subrepo that are not present on mirror yet, 
and if the 
mainrepo's .hgsubstate was updated to reference one of them, then 
mirror/mainrepo is now is a 
broken state because the subrepo changes were never pushed to 
mirror/mainrepo.

This happens when manually specifying a path with the command as well:

$ hg paths
default = ssh://hg@bitbucket.org/sjl/hgtip/

$ hg push -v ssh://webf/repos/hgtip
running ssh webf "hg -R repos/hgtip serve --stdio"
pushing to ssh://webf/repos/hgtip
pushing subrepo content/tips
running ssh hg at bitbucket.org "hg -R sjl/hgtip/../hgtip-content serve --
stdio"
...

----------
messages: 10621
nosy: sjl
priority: bug
status: unread
title: subrepos with relative paths always push/pull relative to default, even when pushing to a different path

____________________________________________________
Mercurial issue tracker <bugs at mercurial.selenic.com>
<http://mercurial.selenic.com/bts/issue1852>
____________________________________________________



More information about the Mercurial-devel mailing list