[Bug 4525] New: Update fails when a folder is substituted with a subrepository using the same directory name
mercurial-bugs at selenic.com
mercurial-bugs at selenic.com
Tue Feb 3 14:35:51 UTC 2015
http://bz.selenic.com/show_bug.cgi?id=4525
Priority: normal
Bug ID: 4525
CC: mercurial-devel at selenic.com
Assignee: bugzilla at selenic.com
Summary: Update fails when a folder is substituted with a
subrepository using the same directory name
Severity: bug
Classification: Unclassified
OS: All
Reporter: mukha.victor at gmail.com
Hardware: PC
Status: UNCONFIRMED
Version: 3.2.4
Component: Mercurial
Product: Mercurial
Consider the following workflow:
1. Say we have a file in a directory called "nested":
$ hg init
$ mkdir nested
$ touch nested/file
$ hg add nested/file
$ hg commit -m "Added a file to main repo"
2. Now we want to substitute it with a nested subrepository which also contains
'file':
$ hg rm nested/
$ hg commit -m "Removed the nested folder"
$ echo nested = nested > .hgsub
$ hg add .hgsub
$ hg clone https://path.to.subrepository nested
$ hg commit -m "Substituted old folder with subrepository"
3. Now suppose that someone pulls the changes, being on revision 1 ("Added a
file to main repo").
Trying to update directly to latest revision will fail with the following
message:
"abort: path 'nested/file' is inside nested repo 'nested'"
However, updating subsequently (first, to rev.2, then to rev.3) works just
fine.
Can this be fixed somehow? Is there any other way to substitute existing
directory with a subrepo using the same name, which will avoid this update
problem?
--
You are receiving this mail because:
You are on the CC list for the bug.
More information about the Mercurial-devel
mailing list