[Bug 3939] New: Handling removed subrepositories

mercurial-bugs at selenic.com mercurial-bugs at selenic.com
Mon May 20 23:00:14 CDT 2013


http://bz.selenic.com/show_bug.cgi?id=3939

          Priority: normal
            Bug ID: 3939
                CC: mercurial-devel at selenic.com
          Assignee: bugzilla at selenic.com
           Summary: Handling removed subrepositories
          Severity: bug
    Classification: Unclassified
                OS: All
          Reporter: zerkms at zerkms.ru
          Hardware: All
            Status: UNCONFIRMED
           Version: 2.6
         Component: Mercurial
           Product: Mercurial

The error summary: if we want to reuse the directory with the same name as we
had the subrepo after we remove subrepo - then `hg update` won't be possible
without user interaction.

Scenario:

sub$ mkdir main
sub$ mkdir nested

sub$ cd nested/

sub/nested$ touch 1
sub/nested$ hg init
sub/nested$ hg add 1
sub/nested$ hg commit -m "Initial commit"
sub/nested$ echo foo > 1
sub/nested$ hg commit -m "another commit"

sub/nested$ cd ../main/

sub/main$ hg init
sub/main$ touch main
sub/main$ hg add main
sub/main$ hg commit -m "initial commit"

sub/main$ echo "sub = /home/vmadmin/tmp/sub/nested" > .hgsub
sub/main$ hg clone /home/vmadmin/tmp/sub/nested sub
updating to branch default
1 files updated, 0 files merged, 0 files removed, 0 files unresolved
sub/main$ hg commit -m "added subrepo"


sub/main$ echo "" > .hgsub
sub/main$ hg commit -m "removed subrepo"


sub/main$ rm -rf sub/.hg/
sub/main$ hg add sub/1
sub/main$ hg commit -m "added a file from subrepo"


sub/main$ hg up 1
cloning subrepo sub from /home/vmadmin/tmp/sub/nested
2 files updated, 0 files merged, 1 files removed, 0 files unresolved
sub/main$ hg up
abort: path 'sub/1' is inside nested repo 'sub'

-- 
You are receiving this mail because:
You are on the CC list for the bug.


More information about the Mercurial-devel mailing list