On Sat, Nov 05, 2016 at 09:40:26PM -0700, Gregory Szorc wrote: > # HG changeset patch > # User Gregory Szorc <gregory.sz...@gmail.com> > # Date 1478392394 25200 > # Sat Nov 05 17:33:14 2016 -0700 > # Node ID 0e130e8d2156d9f2523c711ef4fefe4ba33e6818 > # Parent 3d4dd237b705479f8c7475b821ae719893381fa8 > repair: clean up stale lock file from store backup
In general, this looks pretty good. I don't have time to give it a thorough going-over right now, but what I did have time to look at seemed cromulent and it's going in the right place. I'd love to hear from someone that has more experience with our transaction logic. > > So inline comment for reasons. > > diff --git a/mercurial/repair.py b/mercurial/repair.py > --- a/mercurial/repair.py > +++ b/mercurial/repair.py > @@ -716,6 +716,12 @@ def _upgraderepo(ui, srcrepo, dstrepo, r > ui.write(_('store replacement complete; repository was inconsistent for ' > '%0.1fs\n') % elapsed) > > + # The lock file from the old store won't be removed because nothing has a > + # reference to its new location. So clean it up manually. Alternatively, > we > + # could update srcrepo.svfs and other variables to point to the new > + # location. This is simpler. > + backupvfs.unlink('store/lock') > + > def upgraderepo(ui, repo, dryrun=False): > """Upgrade a repository in place.""" > # Avoid cycle: cmdutil -> repair -> localrepo -> cmdutil > diff --git a/tests/test-upgrade-repo.t b/tests/test-upgrade-repo.t > --- a/tests/test-upgrade-repo.t > +++ b/tests/test-upgrade-repo.t > @@ -209,7 +209,6 @@ old store should be backed up > 00manifest.i > data > fncache > - lock > phaseroots > undo > undo.backup.fncache > _______________________________________________ > Mercurial-devel mailing list > Mercurial-devel@mercurial-scm.org > https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel _______________________________________________ Mercurial-devel mailing list Mercurial-devel@mercurial-scm.org https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel