# HG changeset patch # User Martin von Zweigbergk # Date 2016-02-03 01:31:17 # Node ID bb45190a54b754dafa66b24c2414d33401c0596e # Parent ed94b24a3bb2285c8c421b2389f821f88da82a5d treemanifests: fix local clone When doing a local clone with treemanifests, the .hg/store/meta/ directory currently does not get copied. To fix it, all we need to do is to add it to the list of directories to copy. diff --git a/mercurial/store.py b/mercurial/store.py --- a/mercurial/store.py +++ b/mercurial/store.py @@ -290,7 +290,7 @@ def _calcmode(vfs): mode = None return mode -_data = ('data 00manifest.d 00manifest.i 00changelog.d 00changelog.i' +_data = ('data meta 00manifest.d 00manifest.i 00changelog.d 00changelog.i' ' phaseroots obsstore') class basicstore(object): @@ -504,7 +504,7 @@ class fncachestore(basicstore): raise def copylist(self): - d = ('data dh fncache phaseroots obsstore' + d = ('data meta dh fncache phaseroots obsstore' ' 00manifest.d 00manifest.i 00changelog.d 00changelog.i') return (['requires', '00changelog.i'] + ['store/' + f for f in d.split()]) diff --git a/tests/test-treemanifest.t b/tests/test-treemanifest.t --- a/tests/test-treemanifest.t +++ b/tests/test-treemanifest.t @@ -513,3 +513,56 @@ Verify passes. checking files 8 files, 3 changesets, 10 total revisions $ cd .. + +Create clones using old repo formats to use in later tests + $ hg clone --config format.usestore=False \ + > --config experimental.changegroup3=True \ + > http://localhost:$HGPORT2 deeprepo-basicstore + requesting all changes + adding changesets + adding manifests + adding file changes + added 3 changesets with 10 changes to 8 files + updating to branch default + 8 files updated, 0 files merged, 0 files removed, 0 files unresolved + $ grep store deeprepo-basicstore/.hg/requires + [1] + $ hg clone --config format.usefncache=False \ + > --config experimental.changegroup3=True \ + > http://localhost:$HGPORT2 deeprepo-encodedstore + requesting all changes + adding changesets + adding manifests + adding file changes + added 3 changesets with 10 changes to 8 files + updating to branch default + 8 files updated, 0 files merged, 0 files removed, 0 files unresolved + $ grep fncache deeprepo-encodedstore/.hg/requires + [1] + +Local clone with basicstore + $ hg clone -U deeprepo-basicstore local-clone-basicstore + $ hg -R local-clone-basicstore verify + checking changesets + checking manifests + crosschecking files in changesets and manifests + checking files + 8 files, 3 changesets, 10 total revisions + +Local clone with encodedstore + $ hg clone -U deeprepo-encodedstore local-clone-encodedstore + $ hg -R local-clone-encodedstore verify + checking changesets + checking manifests + crosschecking files in changesets and manifests + checking files + 8 files, 3 changesets, 10 total revisions + +Local clone with fncachestore + $ hg clone -U deeprepo local-clone-fncachestore + $ hg -R local-clone-fncachestore verify + checking changesets + checking manifests + crosschecking files in changesets and manifests + checking files + 8 files, 3 changesets, 10 total revisions