[issue2844] .hgsubstate can be double commited with a change and a delete in the same changeset

Scott Palmer bugs at mercurial.selenic.com
Mon Jun 6 10:53:18 CDT 2011


New submission from Scott Palmer <swpalmer at gmail.com>:

Schedule .hgsub and .hgsubstate for deletion and commit and you may end up
with a revision that doesn't verify.  It seems Mercurial wanted to
automatically update .hgsubstate at the same time I wanted to get rid of the
subrepos.  This only shows as a verify error after the fact.

E.g.:

D:\MyRepo>hg verify
checking changesets
checking manifests
crosschecking files in changesets and manifests
checking files
 .hgsubstate at 335: 0d0239a427dd not in manifests
2038 files, 356 changesets, 4596 total revisions
1 integrity errors encountered!
(first damaged changeset appears to be 335)

The .hgsubstate file appears twice in the change log
D:\MyRepo>hg log -r 335 -v
changeset:   335:184b2389f75e
user:        Me
date:        Tue May 24 10:58:19 2011 -0400
files:       .hgsub .hgsubstate .hgsubstate ...<way more files listed>...


Current fix for the .hgstate verify error is to:
 hg clone -r ### OriginalRepo FixedRepo
(where ## is after verify error but before tip)
 cd FixedRepo
 hg pull

But of course Mercurial should not have allowed the situation in the first
place.

----------
messages: 16467
nosy: swpalmer
priority: bug
status: unread
title: .hgsubstate can be double commited with a change and a delete in the same changeset
topic: subrepo, subrepositories

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


More information about the Mercurial-devel mailing list