[Bug 3478] New: Subrepos and secret changesets interact badly
bugzilla-daemon at bz.selenic.com
bugzilla-daemon at bz.selenic.com
Fri Jun 1 01:02:10 UTC 2012
http://bz.selenic.com/show_bug.cgi?id=3478
Priority: normal
Bug ID: 3478
CC: mercurial-devel at selenic.com
Assignee: bugzilla at selenic.com
Summary: Subrepos and secret changesets interact badly
Severity: bug
Classification: Unclassified
OS: Windows
Reporter: pub08-hg at davor.org
Hardware: PC
Status: UNCONFIRMED
Version: 2.2.1
Component: Mercurial
Product: Mercurial
Created attachment 1672
--> http://bz.selenic.com/attachment.cgi?id=1672&action=edit
Bug-reproducer script
1. In a subrepo, mark the working directory's parent as "secret". (I'll call
that cset "S").
2. In the main repo, commit.
3. Do "hg push" in the main repo. This appears to succeed.
4. Try to "hg pull -u" from the main repo to a different clone. This dies of
"abort: unknown revision 'S'".
The problem is that, being secret, cset S doesn't get pushed at step (3), which
leaves a dangling .hgsubstate reference in the main repo.
(A simple "hg clone main main-copy" after step (2) will fail in the same way.
This is the case demonstrated by the reproducer script. But the "hg push" case
is more serious, as it bollixes the team's central repo while appearing to
succeed.)
A partial fix would be, at step (2) above, to notice that one of the referenced
subrepo csets is "secret", and thus mark the new main-repo cset as "secret"
too.
That fix is only partial because one can still get into this situation with a
bit more work -- just reverse the first two steps. But I think the order shown
above is the common case, and is thus worth catching.
--
You are receiving this mail because:
You are on the CC list for the bug.
More information about the Mercurial-devel
mailing list