annotate tests/test-manifest.t @ 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 45a4799174a1
children 7b7ca9ba2de5
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
12328
b63f6422d2a7 tests: fix a bunch of pointless #s in unified tests
Matt Mackall <mpm@selenic.com>
parents: 12316
diff changeset
1 Source bundle was generated with the following script:
b63f6422d2a7 tests: fix a bunch of pointless #s in unified tests
Matt Mackall <mpm@selenic.com>
parents: 12316
diff changeset
2
5406
f11554a097c8 test-manifest: test symlink and exec bit display
Patrick Mezard <pmezard@gmail.com>
parents: 5155
diff changeset
3 # hg init
f11554a097c8 test-manifest: test symlink and exec bit display
Patrick Mezard <pmezard@gmail.com>
parents: 5155
diff changeset
4 # echo a > a
f11554a097c8 test-manifest: test symlink and exec bit display
Patrick Mezard <pmezard@gmail.com>
parents: 5155
diff changeset
5 # ln -s a l
f11554a097c8 test-manifest: test symlink and exec bit display
Patrick Mezard <pmezard@gmail.com>
parents: 5155
diff changeset
6 # hg ci -Ama -d'0 0'
f11554a097c8 test-manifest: test symlink and exec bit display
Patrick Mezard <pmezard@gmail.com>
parents: 5155
diff changeset
7 # mkdir b
f11554a097c8 test-manifest: test symlink and exec bit display
Patrick Mezard <pmezard@gmail.com>
parents: 5155
diff changeset
8 # echo a > b/a
f11554a097c8 test-manifest: test symlink and exec bit display
Patrick Mezard <pmezard@gmail.com>
parents: 5155
diff changeset
9 # chmod +x b/a
f11554a097c8 test-manifest: test symlink and exec bit display
Patrick Mezard <pmezard@gmail.com>
parents: 5155
diff changeset
10 # hg ci -Amb -d'1 0'
f11554a097c8 test-manifest: test symlink and exec bit display
Patrick Mezard <pmezard@gmail.com>
parents: 5155
diff changeset
11
12253
e5aee120287b tests: unify test-manifest*
Adrian Buehlmann <adrian@cadifra.com>
parents: 6737
diff changeset
12 $ hg init
37437
814e080a1215 commands: document the layering violation in `manifest --all`
Gregory Szorc <gregory.szorc@gmail.com>
parents: 37346
diff changeset
13 $ hg unbundle "$TESTDIR/bundles/test-manifest.hg"
814e080a1215 commands: document the layering violation in `manifest --all`
Gregory Szorc <gregory.szorc@gmail.com>
parents: 37346
diff changeset
14 adding changesets
814e080a1215 commands: document the layering violation in `manifest --all`
Gregory Szorc <gregory.szorc@gmail.com>
parents: 37346
diff changeset
15 adding manifests
814e080a1215 commands: document the layering violation in `manifest --all`
Gregory Szorc <gregory.szorc@gmail.com>
parents: 37346
diff changeset
16 adding file changes
814e080a1215 commands: document the layering violation in `manifest --all`
Gregory Szorc <gregory.szorc@gmail.com>
parents: 37346
diff changeset
17 added 2 changesets with 3 changes to 3 files
814e080a1215 commands: document the layering violation in `manifest --all`
Gregory Szorc <gregory.szorc@gmail.com>
parents: 37346
diff changeset
18 new changesets b73562a03cfe:5bdc995175ba
814e080a1215 commands: document the layering violation in `manifest --all`
Gregory Szorc <gregory.szorc@gmail.com>
parents: 37346
diff changeset
19 (run 'hg update' to get a working copy)
12253
e5aee120287b tests: unify test-manifest*
Adrian Buehlmann <adrian@cadifra.com>
parents: 6737
diff changeset
20
e5aee120287b tests: unify test-manifest*
Adrian Buehlmann <adrian@cadifra.com>
parents: 6737
diff changeset
21 The next call is expected to return nothing:
e5aee120287b tests: unify test-manifest*
Adrian Buehlmann <adrian@cadifra.com>
parents: 6737
diff changeset
22
e5aee120287b tests: unify test-manifest*
Adrian Buehlmann <adrian@cadifra.com>
parents: 6737
diff changeset
23 $ hg manifest
e5aee120287b tests: unify test-manifest*
Adrian Buehlmann <adrian@cadifra.com>
parents: 6737
diff changeset
24
e5aee120287b tests: unify test-manifest*
Adrian Buehlmann <adrian@cadifra.com>
parents: 6737
diff changeset
25 $ hg co
e5aee120287b tests: unify test-manifest*
Adrian Buehlmann <adrian@cadifra.com>
parents: 6737
diff changeset
26 3 files updated, 0 files merged, 0 files removed, 0 files unresolved
5406
f11554a097c8 test-manifest: test symlink and exec bit display
Patrick Mezard <pmezard@gmail.com>
parents: 5155
diff changeset
27
12253
e5aee120287b tests: unify test-manifest*
Adrian Buehlmann <adrian@cadifra.com>
parents: 6737
diff changeset
28 $ hg manifest
e5aee120287b tests: unify test-manifest*
Adrian Buehlmann <adrian@cadifra.com>
parents: 6737
diff changeset
29 a
e5aee120287b tests: unify test-manifest*
Adrian Buehlmann <adrian@cadifra.com>
parents: 6737
diff changeset
30 b/a
e5aee120287b tests: unify test-manifest*
Adrian Buehlmann <adrian@cadifra.com>
parents: 6737
diff changeset
31 l
e5aee120287b tests: unify test-manifest*
Adrian Buehlmann <adrian@cadifra.com>
parents: 6737
diff changeset
32
22423
edf07a804ac4 files: add new command unifying locate and manifest functionality
Matt Mackall <mpm@selenic.com>
parents: 16907
diff changeset
33 $ hg files -vr .
edf07a804ac4 files: add new command unifying locate and manifest functionality
Matt Mackall <mpm@selenic.com>
parents: 16907
diff changeset
34 2 a
35393
4441705b7111 tests: remove (glob) annotations that were only for '\' matches
Matt Harbison <matt_harbison@yahoo.com>
parents: 23348
diff changeset
35 2 x b/a
22423
edf07a804ac4 files: add new command unifying locate and manifest functionality
Matt Mackall <mpm@selenic.com>
parents: 16907
diff changeset
36 1 l l
edf07a804ac4 files: add new command unifying locate and manifest functionality
Matt Mackall <mpm@selenic.com>
parents: 16907
diff changeset
37 $ hg files -r . -X b
edf07a804ac4 files: add new command unifying locate and manifest functionality
Matt Mackall <mpm@selenic.com>
parents: 16907
diff changeset
38 a
edf07a804ac4 files: add new command unifying locate and manifest functionality
Matt Mackall <mpm@selenic.com>
parents: 16907
diff changeset
39 l
edf07a804ac4 files: add new command unifying locate and manifest functionality
Matt Mackall <mpm@selenic.com>
parents: 16907
diff changeset
40
12253
e5aee120287b tests: unify test-manifest*
Adrian Buehlmann <adrian@cadifra.com>
parents: 6737
diff changeset
41 $ hg manifest -v
e5aee120287b tests: unify test-manifest*
Adrian Buehlmann <adrian@cadifra.com>
parents: 6737
diff changeset
42 644 a
e5aee120287b tests: unify test-manifest*
Adrian Buehlmann <adrian@cadifra.com>
parents: 6737
diff changeset
43 755 * b/a
e5aee120287b tests: unify test-manifest*
Adrian Buehlmann <adrian@cadifra.com>
parents: 6737
diff changeset
44 644 @ l
e5aee120287b tests: unify test-manifest*
Adrian Buehlmann <adrian@cadifra.com>
parents: 6737
diff changeset
45
e5aee120287b tests: unify test-manifest*
Adrian Buehlmann <adrian@cadifra.com>
parents: 6737
diff changeset
46 $ hg manifest --debug
e5aee120287b tests: unify test-manifest*
Adrian Buehlmann <adrian@cadifra.com>
parents: 6737
diff changeset
47 b789fdd96dc2f3bd229c1dd8eedf0fc60e2b68e3 644 a
e5aee120287b tests: unify test-manifest*
Adrian Buehlmann <adrian@cadifra.com>
parents: 6737
diff changeset
48 b789fdd96dc2f3bd229c1dd8eedf0fc60e2b68e3 755 * b/a
e5aee120287b tests: unify test-manifest*
Adrian Buehlmann <adrian@cadifra.com>
parents: 6737
diff changeset
49 047b75c6d7a3ef6a2243bd0e99f94f6ea6683597 644 @ l
6737
7239e06e58e9 context: consistently return p1 context for None
Matt Mackall <mpm@selenic.com>
parents: 5406
diff changeset
50
12253
e5aee120287b tests: unify test-manifest*
Adrian Buehlmann <adrian@cadifra.com>
parents: 6737
diff changeset
51 $ hg manifest -r 0
e5aee120287b tests: unify test-manifest*
Adrian Buehlmann <adrian@cadifra.com>
parents: 6737
diff changeset
52 a
e5aee120287b tests: unify test-manifest*
Adrian Buehlmann <adrian@cadifra.com>
parents: 6737
diff changeset
53 l
e5aee120287b tests: unify test-manifest*
Adrian Buehlmann <adrian@cadifra.com>
parents: 6737
diff changeset
54
e5aee120287b tests: unify test-manifest*
Adrian Buehlmann <adrian@cadifra.com>
parents: 6737
diff changeset
55 $ hg manifest -r 1
e5aee120287b tests: unify test-manifest*
Adrian Buehlmann <adrian@cadifra.com>
parents: 6737
diff changeset
56 a
e5aee120287b tests: unify test-manifest*
Adrian Buehlmann <adrian@cadifra.com>
parents: 6737
diff changeset
57 b/a
e5aee120287b tests: unify test-manifest*
Adrian Buehlmann <adrian@cadifra.com>
parents: 6737
diff changeset
58 l
e5aee120287b tests: unify test-manifest*
Adrian Buehlmann <adrian@cadifra.com>
parents: 6737
diff changeset
59
e5aee120287b tests: unify test-manifest*
Adrian Buehlmann <adrian@cadifra.com>
parents: 6737
diff changeset
60 $ hg manifest -r tip
e5aee120287b tests: unify test-manifest*
Adrian Buehlmann <adrian@cadifra.com>
parents: 6737
diff changeset
61 a
e5aee120287b tests: unify test-manifest*
Adrian Buehlmann <adrian@cadifra.com>
parents: 6737
diff changeset
62 b/a
e5aee120287b tests: unify test-manifest*
Adrian Buehlmann <adrian@cadifra.com>
parents: 6737
diff changeset
63 l
5155
13d23d66a6cd manifest: accept -r for rev specification
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
64
12253
e5aee120287b tests: unify test-manifest*
Adrian Buehlmann <adrian@cadifra.com>
parents: 6737
diff changeset
65 $ hg manifest tip
e5aee120287b tests: unify test-manifest*
Adrian Buehlmann <adrian@cadifra.com>
parents: 6737
diff changeset
66 a
e5aee120287b tests: unify test-manifest*
Adrian Buehlmann <adrian@cadifra.com>
parents: 6737
diff changeset
67 b/a
e5aee120287b tests: unify test-manifest*
Adrian Buehlmann <adrian@cadifra.com>
parents: 6737
diff changeset
68 l
e5aee120287b tests: unify test-manifest*
Adrian Buehlmann <adrian@cadifra.com>
parents: 6737
diff changeset
69
14399
71938479eff9 add new option --all to manifest command
Adrian Buehlmann <adrian@cadifra.com>
parents: 14116
diff changeset
70 $ hg manifest --all
37437
814e080a1215 commands: document the layering violation in `manifest --all`
Gregory Szorc <gregory.szorc@gmail.com>
parents: 37346
diff changeset
71 a (no-reposimplestore !)
814e080a1215 commands: document the layering violation in `manifest --all`
Gregory Szorc <gregory.szorc@gmail.com>
parents: 37346
diff changeset
72 b/a (no-reposimplestore !)
814e080a1215 commands: document the layering violation in `manifest --all`
Gregory Szorc <gregory.szorc@gmail.com>
parents: 37346
diff changeset
73 l (no-reposimplestore !)
12253
e5aee120287b tests: unify test-manifest*
Adrian Buehlmann <adrian@cadifra.com>
parents: 6737
diff changeset
74
e5aee120287b tests: unify test-manifest*
Adrian Buehlmann <adrian@cadifra.com>
parents: 6737
diff changeset
75 The next two calls are expected to abort:
5155
13d23d66a6cd manifest: accept -r for rev specification
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
76
12253
e5aee120287b tests: unify test-manifest*
Adrian Buehlmann <adrian@cadifra.com>
parents: 6737
diff changeset
77 $ hg manifest -r 2
e5aee120287b tests: unify test-manifest*
Adrian Buehlmann <adrian@cadifra.com>
parents: 6737
diff changeset
78 abort: unknown revision '2'!
12316
4134686b83e1 tests: add exit codes to unified tests
Matt Mackall <mpm@selenic.com>
parents: 12253
diff changeset
79 [255]
12253
e5aee120287b tests: unify test-manifest*
Adrian Buehlmann <adrian@cadifra.com>
parents: 6737
diff changeset
80
e5aee120287b tests: unify test-manifest*
Adrian Buehlmann <adrian@cadifra.com>
parents: 6737
diff changeset
81 $ hg manifest -r tip tip
e5aee120287b tests: unify test-manifest*
Adrian Buehlmann <adrian@cadifra.com>
parents: 6737
diff changeset
82 abort: please specify just one revision
12316
4134686b83e1 tests: add exit codes to unified tests
Matt Mackall <mpm@selenic.com>
parents: 12253
diff changeset
83 [255]