Mercurial > hg
comparison mercurial/commands.py @ 37437:814e080a1215
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
author | Gregory Szorc <gregory.szorc@gmail.com> |
---|---|
date | Wed, 04 Apr 2018 21:09:47 -0700 |
parents | d5e1678026fd |
children | 7b7ca9ba2de5 |
comparison
equal
deleted
inserted
replaced
37436:9d4f09bfe3ec | 37437:814e080a1215 |
---|---|
3490 if opts.get('all'): | 3490 if opts.get('all'): |
3491 if rev or node: | 3491 if rev or node: |
3492 raise error.Abort(_("can't specify a revision with --all")) | 3492 raise error.Abort(_("can't specify a revision with --all")) |
3493 | 3493 |
3494 res = [] | 3494 res = [] |
3495 # TODO this is a massive layering violation. It assumes the repo is | |
3496 # backed by revlogs with a well-defined naming scheme. | |
3495 prefix = "data/" | 3497 prefix = "data/" |
3496 suffix = ".i" | 3498 suffix = ".i" |
3497 plen = len(prefix) | 3499 plen = len(prefix) |
3498 slen = len(suffix) | 3500 slen = len(suffix) |
3499 with repo.lock(): | 3501 with repo.lock(): |