# HG changeset patch # User Gregory Szorc # Date 1480041929 28800 # Node ID f2c069bf78ee859b80dbf9047384bb8d6c23e79f # Parent 2603d04889e15fb4a468aeaa97971028d20ef027 repair: clean up stale lock file from store backup Since we did a directory rename on the stores, the source repository's lock path now references the dest repository's lock path and the dest repository's lock path now references a non-existent filename. So releasing the lock on the source will unlock the dest and releasing the lock on the dest will no-op because it fails due to file not found. So we clean up the dest's lock manually. diff -r 2603d04889e1 -r f2c069bf78ee mercurial/repair.py --- a/mercurial/repair.py Thu Nov 24 18:34:50 2016 -0800 +++ b/mercurial/repair.py Thu Nov 24 18:45:29 2016 -0800 @@ -918,6 +918,12 @@ 'again\n')) scmutil.writerequires(srcrepo.vfs, requirements) + # 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') + return backuppath def upgraderepo(ui, repo, run=False, optimize=None): diff -r 2603d04889e1 -r f2c069bf78ee tests/test-upgrade-repo.t --- a/tests/test-upgrade-repo.t Thu Nov 24 18:34:50 2016 -0800 +++ b/tests/test-upgrade-repo.t Thu Nov 24 18:45:29 2016 -0800 @@ -303,7 +303,6 @@ 00manifest.i data fncache - lock phaseroots undo undo.backup.fncache