# HG changeset patch # User Gregory Szorc # Date 2018-04-05 04:09:47 # Node ID 814e080a121593399e9992ab8c8a75adf50da798 # Parent 9d4f09bfe3ec142120a32b81abafc69994556469 commands: document the layering violation in `manifest --all` This commit fixes the last test failures when using the simple store extension! It turns out that `hg manifest --all` locks the repo and scans for revlogs. This feature was added by 71938479eff9 in 2011. I am debating changing the behavior. But that can occur in another commit. As part of debugging this, I realized that test-manifest.t is the only meaningful tester of `hg manifest --all` and that test was improperly disabled when bundlerepos aren't supported. The test is testing manifest behavior, not whether you can `hg pull` from a bundle. So I changed the test to `hg unbundle` instead. FWIW, I wasted a non-trivial amount of time tracking down this failure. I thought the issue involved Git, which is why I refactored the test to be more deterministic. Never in my mind would I have guessed that code in `hg manifest` would scan revlogs. I should have looked there to begin with. Doh. Differential Revision: https://phab.mercurial-scm.org/D3118 diff --git a/mercurial/commands.py b/mercurial/commands.py --- a/mercurial/commands.py +++ b/mercurial/commands.py @@ -3492,6 +3492,8 @@ def manifest(ui, repo, node=None, rev=No raise error.Abort(_("can't specify a revision with --all")) res = [] + # TODO this is a massive layering violation. It assumes the repo is + # backed by revlogs with a well-defined naming scheme. prefix = "data/" suffix = ".i" plen = len(prefix) diff --git a/tests/test-convert-git.t b/tests/test-convert-git.t --- a/tests/test-convert-git.t +++ b/tests/test-convert-git.t @@ -878,7 +878,7 @@ skip submodules in the conversion $ hg convert -q git-repo6 no-submodules --config convert.git.skipsubmodules=True $ hg -R no-submodules manifest --all - .gitmodules-renamed + .gitmodules-renamed (no-reposimplestore !) convert using a different remote prefix $ git init git-repo7 diff --git a/tests/test-manifest.t b/tests/test-manifest.t --- a/tests/test-manifest.t +++ b/tests/test-manifest.t @@ -1,5 +1,3 @@ -#require repobundlerepo - Source bundle was generated with the following script: # hg init @@ -12,7 +10,13 @@ Source bundle was generated with the fol # hg ci -Amb -d'1 0' $ hg init - $ hg -q pull "$TESTDIR/bundles/test-manifest.hg" + $ hg unbundle "$TESTDIR/bundles/test-manifest.hg" + adding changesets + adding manifests + adding file changes + added 2 changesets with 3 changes to 3 files + new changesets b73562a03cfe:5bdc995175ba + (run 'hg update' to get a working copy) The next call is expected to return nothing: @@ -64,9 +68,9 @@ The next call is expected to return noth l $ hg manifest --all - a - b/a - l + a (no-reposimplestore !) + b/a (no-reposimplestore !) + l (no-reposimplestore !) The next two calls are expected to abort: