[Bug 5128] New: hg verify recreates old subrepo paths after moving a subrepo

mercurial-bugs at selenic.com mercurial-bugs at selenic.com
Sun Mar 6 01:11:15 EST 2016


https://bz.mercurial-scm.org/show_bug.cgi?id=5128

            Bug ID: 5128
           Summary: hg verify recreates old subrepo paths after moving a
                    subrepo
           Product: Mercurial
           Version: 3.7.2
          Hardware: PC
                OS: Windows
            Status: UNCONFIRMED
          Severity: bug
          Priority: wish
         Component: Mercurial
          Assignee: bugzilla at selenic.com
          Reporter: fritzophrenic at gmail.com
                CC: mercurial-devel at selenic.com

hg verify seems to re-create old subrepo paths which are no longer valid.
Depending on whether I use forward or backslashes in the .hgsub file, hg verify
also gives errors. Example without errors:

    > mkdir testrepo%1
    > mkdir testrepo%1\dirA
    > mkdir testrepo%1\dirA\subrepo
    > cd testrepo%1\dirA\subrepo
    > echo hello world> file.txt
    > hg init
    > hg add file.txt
    > hg commit -m "adding file"
    > cd ..\..
    > echo dirA\subrepo = dirA\subrepo> .hgsub
    > hg init
    > hg add .hgsub
    > hg commit -m "adding subrepo"

    > echo dirB\subrepo = dirB\subrepo> .hgsub
    > move dirA dirB
    > hg commit -m "moving subrepo"
    > dir /B
    .hg
    .hgsub
    .hgsubstate
    dirB

    > hg status --all
    C .hgsub
    C .hgsubstate

    > hg status --all -S
    C .hgsub
    C .hgsubstate
    C dirB\subrepo\file.txt

    > hg verify
    > dir /B
    .hg
    .hgsub
    .hgsubstate
    dirA
    dirB

If the .hgsub file uses forward slashes instead of backslashes, then "hg
verify" additionally gives errors like this:

checking changesets
checking manifests
crosschecking files in changesets and manifests
checking files
2 files, 2 changesets, 4 total revisions
checking subrepo links
subrepo 'dirA\subrepo' not found in revision da28b94cc99d

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


More information about the Mercurial-devel mailing list