annotate tests/test-status.t @ 50329:3dbc7b1ecaba stable

typing: correct the signature of error.CommandError There's a place in `mercurial.dispatch._parse()` that passes None if a parse error happens before the command can be parsed out, and casting the error to bytes works fine because the command and message fields are apparently ignored. Likewise, TortoiseHg similarly passes None for the same reason.
author Matt Harbison <matt_harbison@yahoo.com>
date Fri, 24 Mar 2023 02:22:12 -0400
parents adecb1ab4a0d
children a20df0150f82 98fc949bec14
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
48068
bf8837e3d7ce dirstate: Remove the flat Rust DirstateMap implementation
Simon Sapin <simon.sapin@octobus.net>
parents: 47683
diff changeset
1 #testcases dirstate-v1 dirstate-v2
47281
6763913fa175 dirstate-v2: Add a variant of some tests, that uses the new format
Simon Sapin <simon.sapin@octobus.net>
parents: 47193
diff changeset
2
6763913fa175 dirstate-v2: Add a variant of some tests, that uses the new format
Simon Sapin <simon.sapin@octobus.net>
parents: 47193
diff changeset
3 #if dirstate-v2
48235
5c567aca080d dirstate-v2: add an option to prevent unintentional slow dirstate-v2
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 48223
diff changeset
4 $ cat >> $HGRCPATH << EOF
5c567aca080d dirstate-v2: add an option to prevent unintentional slow dirstate-v2
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 48223
diff changeset
5 > [format]
48674
f7086f6173f8 dirstate-v2: rename the configuration to enable the format
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 48295
diff changeset
6 > use-dirstate-v2=1
48235
5c567aca080d dirstate-v2: add an option to prevent unintentional slow dirstate-v2
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 48223
diff changeset
7 > [storage]
5c567aca080d dirstate-v2: add an option to prevent unintentional slow dirstate-v2
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 48223
diff changeset
8 > dirstate-v2.slow-path=allow
5c567aca080d dirstate-v2: add an option to prevent unintentional slow dirstate-v2
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 48223
diff changeset
9 > EOF
47281
6763913fa175 dirstate-v2: Add a variant of some tests, that uses the new format
Simon Sapin <simon.sapin@octobus.net>
parents: 47193
diff changeset
10 #endif
6763913fa175 dirstate-v2: Add a variant of some tests, that uses the new format
Simon Sapin <simon.sapin@octobus.net>
parents: 47193
diff changeset
11
11782
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
12 $ hg init repo1
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
13 $ cd repo1
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
14 $ mkdir a b a/1 b/1 b/2
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
15 $ touch in_root a/in_a b/in_b a/1/in_a_1 b/1/in_b_1 b/2/in_b_2
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
16
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
17 hg status in repo root:
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
18
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
19 $ hg status
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
20 ? a/1/in_a_1
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
21 ? a/in_a
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
22 ? b/1/in_b_1
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
23 ? b/2/in_b_2
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
24 ? b/in_b
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
25 ? in_root
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
26
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
27 hg status . in repo root:
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
28
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
29 $ hg status .
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
30 ? a/1/in_a_1
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
31 ? a/in_a
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
32 ? b/1/in_b_1
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
33 ? b/2/in_b_2
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
34 ? b/in_b
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
35 ? in_root
1624
d9e576e55d81 Added test for relative paths and all status flags for 'hg status'
Thomas Arendsen Hein <thomas@intevation.de>
parents:
diff changeset
36
11782
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
37 $ hg status --cwd a
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
38 ? a/1/in_a_1
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
39 ? a/in_a
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
40 ? b/1/in_b_1
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
41 ? b/2/in_b_2
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
42 ? b/in_b
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
43 ? in_root
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
44 $ hg status --cwd a .
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
45 ? 1/in_a_1
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
46 ? in_a
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
47 $ hg status --cwd a ..
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
48 ? 1/in_a_1
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
49 ? in_a
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
50 ? ../b/1/in_b_1
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
51 ? ../b/2/in_b_2
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
52 ? ../b/in_b
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
53 ? ../in_root
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
54
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
55 $ hg status --cwd b
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
56 ? a/1/in_a_1
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
57 ? a/in_a
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
58 ? b/1/in_b_1
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
59 ? b/2/in_b_2
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
60 ? b/in_b
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
61 ? in_root
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
62 $ hg status --cwd b .
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
63 ? 1/in_b_1
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
64 ? 2/in_b_2
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
65 ? in_b
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
66 $ hg status --cwd b ..
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
67 ? ../a/1/in_a_1
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
68 ? ../a/in_a
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
69 ? 1/in_b_1
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
70 ? 2/in_b_2
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
71 ? in_b
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
72 ? ../in_root
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
73
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
74 $ hg status --cwd a/1
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
75 ? a/1/in_a_1
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
76 ? a/in_a
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
77 ? b/1/in_b_1
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
78 ? b/2/in_b_2
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
79 ? b/in_b
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
80 ? in_root
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
81 $ hg status --cwd a/1 .
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
82 ? in_a_1
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
83 $ hg status --cwd a/1 ..
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
84 ? in_a_1
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
85 ? ../in_a
1624
d9e576e55d81 Added test for relative paths and all status flags for 'hg status'
Thomas Arendsen Hein <thomas@intevation.de>
parents:
diff changeset
86
11782
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
87 $ hg status --cwd b/1
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
88 ? a/1/in_a_1
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
89 ? a/in_a
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
90 ? b/1/in_b_1
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
91 ? b/2/in_b_2
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
92 ? b/in_b
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
93 ? in_root
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
94 $ hg status --cwd b/1 .
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
95 ? in_b_1
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
96 $ hg status --cwd b/1 ..
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
97 ? in_b_1
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
98 ? ../2/in_b_2
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
99 ? ../in_b
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
100
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
101 $ hg status --cwd b/2
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
102 ? a/1/in_a_1
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
103 ? a/in_a
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
104 ? b/1/in_b_1
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
105 ? b/2/in_b_2
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
106 ? b/in_b
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
107 ? in_root
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
108 $ hg status --cwd b/2 .
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
109 ? in_b_2
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
110 $ hg status --cwd b/2 ..
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
111 ? ../1/in_b_1
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
112 ? in_b_2
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
113 ? ../in_b
19107
fcf08023c011 match: fix root calculation for combining regexps with simple paths
Mads Kiilerich <madski@unity3d.com>
parents: 17377
diff changeset
114
fcf08023c011 match: fix root calculation for combining regexps with simple paths
Mads Kiilerich <madski@unity3d.com>
parents: 17377
diff changeset
115 combining patterns with root and patterns without a root works
fcf08023c011 match: fix root calculation for combining regexps with simple paths
Mads Kiilerich <madski@unity3d.com>
parents: 17377
diff changeset
116
fcf08023c011 match: fix root calculation for combining regexps with simple paths
Mads Kiilerich <madski@unity3d.com>
parents: 17377
diff changeset
117 $ hg st a/in_a re:.*b$
fcf08023c011 match: fix root calculation for combining regexps with simple paths
Mads Kiilerich <madski@unity3d.com>
parents: 17377
diff changeset
118 ? a/in_a
fcf08023c011 match: fix root calculation for combining regexps with simple paths
Mads Kiilerich <madski@unity3d.com>
parents: 17377
diff changeset
119 ? b/in_b
fcf08023c011 match: fix root calculation for combining regexps with simple paths
Mads Kiilerich <madski@unity3d.com>
parents: 17377
diff changeset
120
32872
9fcb6df413c9 ui: add support for a tweakdefaults knob
Augie Fackler <augie@google.com>
parents: 31766
diff changeset
121 tweaking defaults works
9fcb6df413c9 ui: add support for a tweakdefaults knob
Augie Fackler <augie@google.com>
parents: 31766
diff changeset
122 $ hg status --cwd a --config ui.tweakdefaults=yes
38762
fe3ca1e6f786 ui: remove commands.status.terse=u from ui.tweakdefaults
Gregory Szorc <gregory.szorc@gmail.com>
parents: 38545
diff changeset
123 ? 1/in_a_1
fe3ca1e6f786 ui: remove commands.status.terse=u from ui.tweakdefaults
Gregory Szorc <gregory.szorc@gmail.com>
parents: 38545
diff changeset
124 ? in_a
fe3ca1e6f786 ui: remove commands.status.terse=u from ui.tweakdefaults
Gregory Szorc <gregory.szorc@gmail.com>
parents: 38545
diff changeset
125 ? ../b/1/in_b_1
fe3ca1e6f786 ui: remove commands.status.terse=u from ui.tweakdefaults
Gregory Szorc <gregory.szorc@gmail.com>
parents: 38545
diff changeset
126 ? ../b/2/in_b_2
fe3ca1e6f786 ui: remove commands.status.terse=u from ui.tweakdefaults
Gregory Szorc <gregory.szorc@gmail.com>
parents: 38545
diff changeset
127 ? ../b/in_b
32872
9fcb6df413c9 ui: add support for a tweakdefaults knob
Augie Fackler <augie@google.com>
parents: 31766
diff changeset
128 ? ../in_root
9fcb6df413c9 ui: add support for a tweakdefaults knob
Augie Fackler <augie@google.com>
parents: 31766
diff changeset
129 $ HGPLAIN=1 hg status --cwd a --config ui.tweakdefaults=yes
9fcb6df413c9 ui: add support for a tweakdefaults knob
Augie Fackler <augie@google.com>
parents: 31766
diff changeset
130 ? a/1/in_a_1 (glob)
9fcb6df413c9 ui: add support for a tweakdefaults knob
Augie Fackler <augie@google.com>
parents: 31766
diff changeset
131 ? a/in_a (glob)
9fcb6df413c9 ui: add support for a tweakdefaults knob
Augie Fackler <augie@google.com>
parents: 31766
diff changeset
132 ? b/1/in_b_1 (glob)
9fcb6df413c9 ui: add support for a tweakdefaults knob
Augie Fackler <augie@google.com>
parents: 31766
diff changeset
133 ? b/2/in_b_2 (glob)
9fcb6df413c9 ui: add support for a tweakdefaults knob
Augie Fackler <augie@google.com>
parents: 31766
diff changeset
134 ? b/in_b (glob)
9fcb6df413c9 ui: add support for a tweakdefaults knob
Augie Fackler <augie@google.com>
parents: 31766
diff changeset
135 ? in_root
9fcb6df413c9 ui: add support for a tweakdefaults knob
Augie Fackler <augie@google.com>
parents: 31766
diff changeset
136 $ HGPLAINEXCEPT=tweakdefaults hg status --cwd a --config ui.tweakdefaults=yes
38762
fe3ca1e6f786 ui: remove commands.status.terse=u from ui.tweakdefaults
Gregory Szorc <gregory.szorc@gmail.com>
parents: 38545
diff changeset
137 ? 1/in_a_1
fe3ca1e6f786 ui: remove commands.status.terse=u from ui.tweakdefaults
Gregory Szorc <gregory.szorc@gmail.com>
parents: 38545
diff changeset
138 ? in_a
fe3ca1e6f786 ui: remove commands.status.terse=u from ui.tweakdefaults
Gregory Szorc <gregory.szorc@gmail.com>
parents: 38545
diff changeset
139 ? ../b/1/in_b_1
fe3ca1e6f786 ui: remove commands.status.terse=u from ui.tweakdefaults
Gregory Szorc <gregory.szorc@gmail.com>
parents: 38545
diff changeset
140 ? ../b/2/in_b_2
fe3ca1e6f786 ui: remove commands.status.terse=u from ui.tweakdefaults
Gregory Szorc <gregory.szorc@gmail.com>
parents: 38545
diff changeset
141 ? ../b/in_b
32887
28a0e6a4e824 test-status: glob fixes for Windows
Matt Harbison <matt_harbison@yahoo.com>
parents: 32872
diff changeset
142 ? ../in_root (glob)
32872
9fcb6df413c9 ui: add support for a tweakdefaults knob
Augie Fackler <augie@google.com>
parents: 31766
diff changeset
143
31589
7e3b145f8247 status: support commands.status.relative config
Martin von Zweigbergk <martinvonz@google.com>
parents: 31423
diff changeset
144 relative paths can be requested
7e3b145f8247 status: support commands.status.relative config
Martin von Zweigbergk <martinvonz@google.com>
parents: 31423
diff changeset
145
41577
5f827e9ce870 status: if ui.relative-paths=no, don't use relative paths even with patterns
Martin von Zweigbergk <martinvonz@google.com>
parents: 41492
diff changeset
146 $ hg status --cwd a --config ui.relative-paths=yes
41492
02186c6871ac status: introduce higher-level ui.relative-paths
Martin von Zweigbergk <martinvonz@google.com>
parents: 40278
diff changeset
147 ? 1/in_a_1
02186c6871ac status: introduce higher-level ui.relative-paths
Martin von Zweigbergk <martinvonz@google.com>
parents: 40278
diff changeset
148 ? in_a
02186c6871ac status: introduce higher-level ui.relative-paths
Martin von Zweigbergk <martinvonz@google.com>
parents: 40278
diff changeset
149 ? ../b/1/in_b_1
02186c6871ac status: introduce higher-level ui.relative-paths
Martin von Zweigbergk <martinvonz@google.com>
parents: 40278
diff changeset
150 ? ../b/2/in_b_2
02186c6871ac status: introduce higher-level ui.relative-paths
Martin von Zweigbergk <martinvonz@google.com>
parents: 40278
diff changeset
151 ? ../b/in_b
02186c6871ac status: introduce higher-level ui.relative-paths
Martin von Zweigbergk <martinvonz@google.com>
parents: 40278
diff changeset
152 ? ../in_root
02186c6871ac status: introduce higher-level ui.relative-paths
Martin von Zweigbergk <martinvonz@google.com>
parents: 40278
diff changeset
153
41577
5f827e9ce870 status: if ui.relative-paths=no, don't use relative paths even with patterns
Martin von Zweigbergk <martinvonz@google.com>
parents: 41492
diff changeset
154 $ hg status --cwd a . --config ui.relative-paths=legacy
5f827e9ce870 status: if ui.relative-paths=no, don't use relative paths even with patterns
Martin von Zweigbergk <martinvonz@google.com>
parents: 41492
diff changeset
155 ? 1/in_a_1
5f827e9ce870 status: if ui.relative-paths=no, don't use relative paths even with patterns
Martin von Zweigbergk <martinvonz@google.com>
parents: 41492
diff changeset
156 ? in_a
5f827e9ce870 status: if ui.relative-paths=no, don't use relative paths even with patterns
Martin von Zweigbergk <martinvonz@google.com>
parents: 41492
diff changeset
157 $ hg status --cwd a . --config ui.relative-paths=no
5f827e9ce870 status: if ui.relative-paths=no, don't use relative paths even with patterns
Martin von Zweigbergk <martinvonz@google.com>
parents: 41492
diff changeset
158 ? a/1/in_a_1
5f827e9ce870 status: if ui.relative-paths=no, don't use relative paths even with patterns
Martin von Zweigbergk <martinvonz@google.com>
parents: 41492
diff changeset
159 ? a/in_a
5f827e9ce870 status: if ui.relative-paths=no, don't use relative paths even with patterns
Martin von Zweigbergk <martinvonz@google.com>
parents: 41492
diff changeset
160
41492
02186c6871ac status: introduce higher-level ui.relative-paths
Martin von Zweigbergk <martinvonz@google.com>
parents: 40278
diff changeset
161 commands.status.relative overrides ui.relative-paths
02186c6871ac status: introduce higher-level ui.relative-paths
Martin von Zweigbergk <martinvonz@google.com>
parents: 40278
diff changeset
162
02186c6871ac status: introduce higher-level ui.relative-paths
Martin von Zweigbergk <martinvonz@google.com>
parents: 40278
diff changeset
163 $ cat >> $HGRCPATH <<EOF
02186c6871ac status: introduce higher-level ui.relative-paths
Martin von Zweigbergk <martinvonz@google.com>
parents: 40278
diff changeset
164 > [ui]
02186c6871ac status: introduce higher-level ui.relative-paths
Martin von Zweigbergk <martinvonz@google.com>
parents: 40278
diff changeset
165 > relative-paths = False
31589
7e3b145f8247 status: support commands.status.relative config
Martin von Zweigbergk <martinvonz@google.com>
parents: 31423
diff changeset
166 > [commands]
7e3b145f8247 status: support commands.status.relative config
Martin von Zweigbergk <martinvonz@google.com>
parents: 31423
diff changeset
167 > status.relative = True
7e3b145f8247 status: support commands.status.relative config
Martin von Zweigbergk <martinvonz@google.com>
parents: 31423
diff changeset
168 > EOF
7e3b145f8247 status: support commands.status.relative config
Martin von Zweigbergk <martinvonz@google.com>
parents: 31423
diff changeset
169 $ hg status --cwd a
7e3b145f8247 status: support commands.status.relative config
Martin von Zweigbergk <martinvonz@google.com>
parents: 31423
diff changeset
170 ? 1/in_a_1
7e3b145f8247 status: support commands.status.relative config
Martin von Zweigbergk <martinvonz@google.com>
parents: 31423
diff changeset
171 ? in_a
7e3b145f8247 status: support commands.status.relative config
Martin von Zweigbergk <martinvonz@google.com>
parents: 31423
diff changeset
172 ? ../b/1/in_b_1
7e3b145f8247 status: support commands.status.relative config
Martin von Zweigbergk <martinvonz@google.com>
parents: 31423
diff changeset
173 ? ../b/2/in_b_2
7e3b145f8247 status: support commands.status.relative config
Martin von Zweigbergk <martinvonz@google.com>
parents: 31423
diff changeset
174 ? ../b/in_b
7e3b145f8247 status: support commands.status.relative config
Martin von Zweigbergk <martinvonz@google.com>
parents: 31423
diff changeset
175 ? ../in_root
7e3b145f8247 status: support commands.status.relative config
Martin von Zweigbergk <martinvonz@google.com>
parents: 31423
diff changeset
176 $ HGPLAIN=1 hg status --cwd a
31766
bdcaf612e75a tests: add globs for Windows
Matt Harbison <matt_harbison@yahoo.com>
parents: 31589
diff changeset
177 ? a/1/in_a_1 (glob)
bdcaf612e75a tests: add globs for Windows
Matt Harbison <matt_harbison@yahoo.com>
parents: 31589
diff changeset
178 ? a/in_a (glob)
bdcaf612e75a tests: add globs for Windows
Matt Harbison <matt_harbison@yahoo.com>
parents: 31589
diff changeset
179 ? b/1/in_b_1 (glob)
bdcaf612e75a tests: add globs for Windows
Matt Harbison <matt_harbison@yahoo.com>
parents: 31589
diff changeset
180 ? b/2/in_b_2 (glob)
bdcaf612e75a tests: add globs for Windows
Matt Harbison <matt_harbison@yahoo.com>
parents: 31589
diff changeset
181 ? b/in_b (glob)
31589
7e3b145f8247 status: support commands.status.relative config
Martin von Zweigbergk <martinvonz@google.com>
parents: 31423
diff changeset
182 ? in_root
7e3b145f8247 status: support commands.status.relative config
Martin von Zweigbergk <martinvonz@google.com>
parents: 31423
diff changeset
183
32872
9fcb6df413c9 ui: add support for a tweakdefaults knob
Augie Fackler <augie@google.com>
parents: 31766
diff changeset
184 if relative paths are explicitly off, tweakdefaults doesn't change it
9fcb6df413c9 ui: add support for a tweakdefaults knob
Augie Fackler <augie@google.com>
parents: 31766
diff changeset
185 $ cat >> $HGRCPATH <<EOF
9fcb6df413c9 ui: add support for a tweakdefaults knob
Augie Fackler <augie@google.com>
parents: 31766
diff changeset
186 > [commands]
9fcb6df413c9 ui: add support for a tweakdefaults knob
Augie Fackler <augie@google.com>
parents: 31766
diff changeset
187 > status.relative = False
9fcb6df413c9 ui: add support for a tweakdefaults knob
Augie Fackler <augie@google.com>
parents: 31766
diff changeset
188 > EOF
9fcb6df413c9 ui: add support for a tweakdefaults knob
Augie Fackler <augie@google.com>
parents: 31766
diff changeset
189 $ hg status --cwd a --config ui.tweakdefaults=yes
38762
fe3ca1e6f786 ui: remove commands.status.terse=u from ui.tweakdefaults
Gregory Szorc <gregory.szorc@gmail.com>
parents: 38545
diff changeset
190 ? a/1/in_a_1
fe3ca1e6f786 ui: remove commands.status.terse=u from ui.tweakdefaults
Gregory Szorc <gregory.szorc@gmail.com>
parents: 38545
diff changeset
191 ? a/in_a
fe3ca1e6f786 ui: remove commands.status.terse=u from ui.tweakdefaults
Gregory Szorc <gregory.szorc@gmail.com>
parents: 38545
diff changeset
192 ? b/1/in_b_1
fe3ca1e6f786 ui: remove commands.status.terse=u from ui.tweakdefaults
Gregory Szorc <gregory.szorc@gmail.com>
parents: 38545
diff changeset
193 ? b/2/in_b_2
fe3ca1e6f786 ui: remove commands.status.terse=u from ui.tweakdefaults
Gregory Szorc <gregory.szorc@gmail.com>
parents: 38545
diff changeset
194 ? b/in_b
32872
9fcb6df413c9 ui: add support for a tweakdefaults knob
Augie Fackler <augie@google.com>
parents: 31766
diff changeset
195 ? in_root
9fcb6df413c9 ui: add support for a tweakdefaults knob
Augie Fackler <augie@google.com>
parents: 31766
diff changeset
196
11782
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
197 $ cd ..
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
198
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
199 $ hg init repo2
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
200 $ cd repo2
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
201 $ touch modified removed deleted ignored
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
202 $ echo "^ignored$" > .hgignore
12156
4c94b6d0fb1c tests: remove unneeded -d flags
Martin Geisler <mg@lazybytes.net>
parents: 11782
diff changeset
203 $ hg ci -A -m 'initial checkin'
11782
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
204 adding .hgignore
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
205 adding deleted
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
206 adding modified
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
207 adding removed
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
208 $ touch modified added unknown ignored
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
209 $ hg add added
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
210 $ hg remove removed
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
211 $ rm deleted
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
212
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
213 hg status:
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
214
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
215 $ hg status
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
216 A added
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
217 R removed
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
218 ! deleted
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
219 ? unknown
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
220
48349
c12ed33558cb rhg: Add support for `rhg status -n`
Simon Sapin <simon.sapin@octobus.net>
parents: 48335
diff changeset
221 hg status -n:
48454
473af5cbc209 rhg: Add support for `rhg status --copies`
Simon Sapin <simon.sapin@octobus.net>
parents: 48349
diff changeset
222 $ env RHG_ON_UNSUPPORTED=abort hg status -n
48349
c12ed33558cb rhg: Add support for `rhg status -n`
Simon Sapin <simon.sapin@octobus.net>
parents: 48335
diff changeset
223 added
c12ed33558cb rhg: Add support for `rhg status -n`
Simon Sapin <simon.sapin@octobus.net>
parents: 48335
diff changeset
224 removed
c12ed33558cb rhg: Add support for `rhg status -n`
Simon Sapin <simon.sapin@octobus.net>
parents: 48335
diff changeset
225 deleted
c12ed33558cb rhg: Add support for `rhg status -n`
Simon Sapin <simon.sapin@octobus.net>
parents: 48335
diff changeset
226 unknown
c12ed33558cb rhg: Add support for `rhg status -n`
Simon Sapin <simon.sapin@octobus.net>
parents: 48335
diff changeset
227
11782
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
228 hg status modified added removed deleted unknown never-existed ignored:
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
229
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
230 $ hg status modified added removed deleted unknown never-existed ignored
15521
117f9190c1ba tests: hide 'No such file or directory' messages
Mads Kiilerich <mads@kiilerich.com>
parents: 14155
diff changeset
231 never-existed: * (glob)
11782
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
232 A added
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
233 R removed
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
234 ! deleted
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
235 ? unknown
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
236
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
237 $ hg copy modified copied
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
238
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
239 hg status -C:
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
240
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
241 $ hg status -C
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
242 A added
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
243 A copied
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
244 modified
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
245 R removed
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
246 ! deleted
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
247 ? unknown
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
248
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
249 hg status -A:
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
250
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
251 $ hg status -A
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
252 A added
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
253 A copied
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
254 modified
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
255 R removed
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
256 ! deleted
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
257 ? unknown
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
258 I ignored
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
259 C .hgignore
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
260 C modified
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
261
38545
85e3aa21bcdc status: add support for log-like template keywords and functions
Yuya Nishihara <yuya@tcha.org>
parents: 38101
diff changeset
262 $ hg status -A -T '{status} {path} {node|shortest}\n'
85e3aa21bcdc status: add support for log-like template keywords and functions
Yuya Nishihara <yuya@tcha.org>
parents: 38101
diff changeset
263 A added ffff
85e3aa21bcdc status: add support for log-like template keywords and functions
Yuya Nishihara <yuya@tcha.org>
parents: 38101
diff changeset
264 A copied ffff
85e3aa21bcdc status: add support for log-like template keywords and functions
Yuya Nishihara <yuya@tcha.org>
parents: 38101
diff changeset
265 R removed ffff
85e3aa21bcdc status: add support for log-like template keywords and functions
Yuya Nishihara <yuya@tcha.org>
parents: 38101
diff changeset
266 ! deleted ffff
85e3aa21bcdc status: add support for log-like template keywords and functions
Yuya Nishihara <yuya@tcha.org>
parents: 38101
diff changeset
267 ? unknown ffff
85e3aa21bcdc status: add support for log-like template keywords and functions
Yuya Nishihara <yuya@tcha.org>
parents: 38101
diff changeset
268 I ignored ffff
85e3aa21bcdc status: add support for log-like template keywords and functions
Yuya Nishihara <yuya@tcha.org>
parents: 38101
diff changeset
269 C .hgignore ffff
85e3aa21bcdc status: add support for log-like template keywords and functions
Yuya Nishihara <yuya@tcha.org>
parents: 38101
diff changeset
270 C modified ffff
85e3aa21bcdc status: add support for log-like template keywords and functions
Yuya Nishihara <yuya@tcha.org>
parents: 38101
diff changeset
271
22429
7a7eed5176a4 commands: add hidden -T option for files/manifest/status/tags
Matt Mackall <mpm@selenic.com>
parents: 22424
diff changeset
272 $ hg status -A -Tjson
7a7eed5176a4 commands: add hidden -T option for files/manifest/status/tags
Matt Mackall <mpm@selenic.com>
parents: 22424
diff changeset
273 [
7a7eed5176a4 commands: add hidden -T option for files/manifest/status/tags
Matt Mackall <mpm@selenic.com>
parents: 22424
diff changeset
274 {
43861
aac921f54554 status: outputting structured unfinished-operation information
Rodrigo Damazio Bovendorp <rdamazio@google.com>
parents: 42502
diff changeset
275 "itemtype": "file",
22429
7a7eed5176a4 commands: add hidden -T option for files/manifest/status/tags
Matt Mackall <mpm@selenic.com>
parents: 22424
diff changeset
276 "path": "added",
7a7eed5176a4 commands: add hidden -T option for files/manifest/status/tags
Matt Mackall <mpm@selenic.com>
parents: 22424
diff changeset
277 "status": "A"
7a7eed5176a4 commands: add hidden -T option for files/manifest/status/tags
Matt Mackall <mpm@selenic.com>
parents: 22424
diff changeset
278 },
7a7eed5176a4 commands: add hidden -T option for files/manifest/status/tags
Matt Mackall <mpm@selenic.com>
parents: 22424
diff changeset
279 {
43861
aac921f54554 status: outputting structured unfinished-operation information
Rodrigo Damazio Bovendorp <rdamazio@google.com>
parents: 42502
diff changeset
280 "itemtype": "file",
22429
7a7eed5176a4 commands: add hidden -T option for files/manifest/status/tags
Matt Mackall <mpm@selenic.com>
parents: 22424
diff changeset
281 "path": "copied",
39370
46f3ff64bea7 status: rename {copy} to {source} for compatibility with {file_copies} (BC)
Yuya Nishihara <yuya@tcha.org>
parents: 38762
diff changeset
282 "source": "modified",
22429
7a7eed5176a4 commands: add hidden -T option for files/manifest/status/tags
Matt Mackall <mpm@selenic.com>
parents: 22424
diff changeset
283 "status": "A"
7a7eed5176a4 commands: add hidden -T option for files/manifest/status/tags
Matt Mackall <mpm@selenic.com>
parents: 22424
diff changeset
284 },
7a7eed5176a4 commands: add hidden -T option for files/manifest/status/tags
Matt Mackall <mpm@selenic.com>
parents: 22424
diff changeset
285 {
43861
aac921f54554 status: outputting structured unfinished-operation information
Rodrigo Damazio Bovendorp <rdamazio@google.com>
parents: 42502
diff changeset
286 "itemtype": "file",
22429
7a7eed5176a4 commands: add hidden -T option for files/manifest/status/tags
Matt Mackall <mpm@selenic.com>
parents: 22424
diff changeset
287 "path": "removed",
7a7eed5176a4 commands: add hidden -T option for files/manifest/status/tags
Matt Mackall <mpm@selenic.com>
parents: 22424
diff changeset
288 "status": "R"
7a7eed5176a4 commands: add hidden -T option for files/manifest/status/tags
Matt Mackall <mpm@selenic.com>
parents: 22424
diff changeset
289 },
7a7eed5176a4 commands: add hidden -T option for files/manifest/status/tags
Matt Mackall <mpm@selenic.com>
parents: 22424
diff changeset
290 {
43861
aac921f54554 status: outputting structured unfinished-operation information
Rodrigo Damazio Bovendorp <rdamazio@google.com>
parents: 42502
diff changeset
291 "itemtype": "file",
22429
7a7eed5176a4 commands: add hidden -T option for files/manifest/status/tags
Matt Mackall <mpm@selenic.com>
parents: 22424
diff changeset
292 "path": "deleted",
7a7eed5176a4 commands: add hidden -T option for files/manifest/status/tags
Matt Mackall <mpm@selenic.com>
parents: 22424
diff changeset
293 "status": "!"
7a7eed5176a4 commands: add hidden -T option for files/manifest/status/tags
Matt Mackall <mpm@selenic.com>
parents: 22424
diff changeset
294 },
7a7eed5176a4 commands: add hidden -T option for files/manifest/status/tags
Matt Mackall <mpm@selenic.com>
parents: 22424
diff changeset
295 {
43861
aac921f54554 status: outputting structured unfinished-operation information
Rodrigo Damazio Bovendorp <rdamazio@google.com>
parents: 42502
diff changeset
296 "itemtype": "file",
22429
7a7eed5176a4 commands: add hidden -T option for files/manifest/status/tags
Matt Mackall <mpm@selenic.com>
parents: 22424
diff changeset
297 "path": "unknown",
7a7eed5176a4 commands: add hidden -T option for files/manifest/status/tags
Matt Mackall <mpm@selenic.com>
parents: 22424
diff changeset
298 "status": "?"
7a7eed5176a4 commands: add hidden -T option for files/manifest/status/tags
Matt Mackall <mpm@selenic.com>
parents: 22424
diff changeset
299 },
7a7eed5176a4 commands: add hidden -T option for files/manifest/status/tags
Matt Mackall <mpm@selenic.com>
parents: 22424
diff changeset
300 {
43861
aac921f54554 status: outputting structured unfinished-operation information
Rodrigo Damazio Bovendorp <rdamazio@google.com>
parents: 42502
diff changeset
301 "itemtype": "file",
22429
7a7eed5176a4 commands: add hidden -T option for files/manifest/status/tags
Matt Mackall <mpm@selenic.com>
parents: 22424
diff changeset
302 "path": "ignored",
7a7eed5176a4 commands: add hidden -T option for files/manifest/status/tags
Matt Mackall <mpm@selenic.com>
parents: 22424
diff changeset
303 "status": "I"
7a7eed5176a4 commands: add hidden -T option for files/manifest/status/tags
Matt Mackall <mpm@selenic.com>
parents: 22424
diff changeset
304 },
7a7eed5176a4 commands: add hidden -T option for files/manifest/status/tags
Matt Mackall <mpm@selenic.com>
parents: 22424
diff changeset
305 {
43861
aac921f54554 status: outputting structured unfinished-operation information
Rodrigo Damazio Bovendorp <rdamazio@google.com>
parents: 42502
diff changeset
306 "itemtype": "file",
22429
7a7eed5176a4 commands: add hidden -T option for files/manifest/status/tags
Matt Mackall <mpm@selenic.com>
parents: 22424
diff changeset
307 "path": ".hgignore",
7a7eed5176a4 commands: add hidden -T option for files/manifest/status/tags
Matt Mackall <mpm@selenic.com>
parents: 22424
diff changeset
308 "status": "C"
7a7eed5176a4 commands: add hidden -T option for files/manifest/status/tags
Matt Mackall <mpm@selenic.com>
parents: 22424
diff changeset
309 },
7a7eed5176a4 commands: add hidden -T option for files/manifest/status/tags
Matt Mackall <mpm@selenic.com>
parents: 22424
diff changeset
310 {
43861
aac921f54554 status: outputting structured unfinished-operation information
Rodrigo Damazio Bovendorp <rdamazio@google.com>
parents: 42502
diff changeset
311 "itemtype": "file",
22429
7a7eed5176a4 commands: add hidden -T option for files/manifest/status/tags
Matt Mackall <mpm@selenic.com>
parents: 22424
diff changeset
312 "path": "modified",
7a7eed5176a4 commands: add hidden -T option for files/manifest/status/tags
Matt Mackall <mpm@selenic.com>
parents: 22424
diff changeset
313 "status": "C"
7a7eed5176a4 commands: add hidden -T option for files/manifest/status/tags
Matt Mackall <mpm@selenic.com>
parents: 22424
diff changeset
314 }
7a7eed5176a4 commands: add hidden -T option for files/manifest/status/tags
Matt Mackall <mpm@selenic.com>
parents: 22424
diff changeset
315 ]
11782
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
316
22430
968247e8f4ac formatter: add pickle format
Matt Mackall <mpm@selenic.com>
parents: 22429
diff changeset
317 $ hg status -A -Tpickle > pickle
48870
df56e6bd37f6 py3: use pickle directly
Gregory Szorc <gregory.szorc@gmail.com>
parents: 48681
diff changeset
318 >>> import pickle
41844
2105ed01c431 tests: make test-status.t compatible with test-check-module-imports.t
Pulkit Goyal <pulkit@yandex-team.ru>
parents: 41735
diff changeset
319 >>> from mercurial import util
40278
125fc478719f py3: fix test-status.t
Mark Thomas <mbthomas@fb.com>
parents: 40277
diff changeset
320 >>> data = sorted((x[b'status'].decode(), x[b'path'].decode()) for x in pickle.load(open("pickle", r"rb")))
125fc478719f py3: fix test-status.t
Mark Thomas <mbthomas@fb.com>
parents: 40277
diff changeset
321 >>> for s, p in data: print("%s %s" % (s, p))
125fc478719f py3: fix test-status.t
Mark Thomas <mbthomas@fb.com>
parents: 40277
diff changeset
322 ! deleted
125fc478719f py3: fix test-status.t
Mark Thomas <mbthomas@fb.com>
parents: 40277
diff changeset
323 ? pickle
125fc478719f py3: fix test-status.t
Mark Thomas <mbthomas@fb.com>
parents: 40277
diff changeset
324 ? unknown
125fc478719f py3: fix test-status.t
Mark Thomas <mbthomas@fb.com>
parents: 40277
diff changeset
325 A added
125fc478719f py3: fix test-status.t
Mark Thomas <mbthomas@fb.com>
parents: 40277
diff changeset
326 A copied
125fc478719f py3: fix test-status.t
Mark Thomas <mbthomas@fb.com>
parents: 40277
diff changeset
327 C .hgignore
125fc478719f py3: fix test-status.t
Mark Thomas <mbthomas@fb.com>
parents: 40277
diff changeset
328 C modified
125fc478719f py3: fix test-status.t
Mark Thomas <mbthomas@fb.com>
parents: 40277
diff changeset
329 I ignored
125fc478719f py3: fix test-status.t
Mark Thomas <mbthomas@fb.com>
parents: 40277
diff changeset
330 R removed
22430
968247e8f4ac formatter: add pickle format
Matt Mackall <mpm@selenic.com>
parents: 22429
diff changeset
331 $ rm pickle
968247e8f4ac formatter: add pickle format
Matt Mackall <mpm@selenic.com>
parents: 22429
diff changeset
332
11782
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
333 $ echo "^ignoreddir$" > .hgignore
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
334 $ mkdir ignoreddir
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
335 $ touch ignoreddir/file
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
336
25515
e8075329c5fb tests: test basic template support for status
Matt Mackall <mpm@selenic.com>
parents: 24663
diff changeset
337 Test templater support:
e8075329c5fb tests: test basic template support for status
Matt Mackall <mpm@selenic.com>
parents: 24663
diff changeset
338
39370
46f3ff64bea7 status: rename {copy} to {source} for compatibility with {file_copies} (BC)
Yuya Nishihara <yuya@tcha.org>
parents: 38762
diff changeset
339 $ hg status -AT "[{status}]\t{if(source, '{source} -> ')}{path}\n"
25515
e8075329c5fb tests: test basic template support for status
Matt Mackall <mpm@selenic.com>
parents: 24663
diff changeset
340 [M] .hgignore
e8075329c5fb tests: test basic template support for status
Matt Mackall <mpm@selenic.com>
parents: 24663
diff changeset
341 [A] added
e8075329c5fb tests: test basic template support for status
Matt Mackall <mpm@selenic.com>
parents: 24663
diff changeset
342 [A] modified -> copied
e8075329c5fb tests: test basic template support for status
Matt Mackall <mpm@selenic.com>
parents: 24663
diff changeset
343 [R] removed
e8075329c5fb tests: test basic template support for status
Matt Mackall <mpm@selenic.com>
parents: 24663
diff changeset
344 [!] deleted
e8075329c5fb tests: test basic template support for status
Matt Mackall <mpm@selenic.com>
parents: 24663
diff changeset
345 [?] ignored
e8075329c5fb tests: test basic template support for status
Matt Mackall <mpm@selenic.com>
parents: 24663
diff changeset
346 [?] unknown
e8075329c5fb tests: test basic template support for status
Matt Mackall <mpm@selenic.com>
parents: 24663
diff changeset
347 [I] ignoreddir/file
e8075329c5fb tests: test basic template support for status
Matt Mackall <mpm@selenic.com>
parents: 24663
diff changeset
348 [C] modified
e8075329c5fb tests: test basic template support for status
Matt Mackall <mpm@selenic.com>
parents: 24663
diff changeset
349 $ hg status -AT default
e8075329c5fb tests: test basic template support for status
Matt Mackall <mpm@selenic.com>
parents: 24663
diff changeset
350 M .hgignore
e8075329c5fb tests: test basic template support for status
Matt Mackall <mpm@selenic.com>
parents: 24663
diff changeset
351 A added
e8075329c5fb tests: test basic template support for status
Matt Mackall <mpm@selenic.com>
parents: 24663
diff changeset
352 A copied
e8075329c5fb tests: test basic template support for status
Matt Mackall <mpm@selenic.com>
parents: 24663
diff changeset
353 modified
e8075329c5fb tests: test basic template support for status
Matt Mackall <mpm@selenic.com>
parents: 24663
diff changeset
354 R removed
e8075329c5fb tests: test basic template support for status
Matt Mackall <mpm@selenic.com>
parents: 24663
diff changeset
355 ! deleted
e8075329c5fb tests: test basic template support for status
Matt Mackall <mpm@selenic.com>
parents: 24663
diff changeset
356 ? ignored
e8075329c5fb tests: test basic template support for status
Matt Mackall <mpm@selenic.com>
parents: 24663
diff changeset
357 ? unknown
e8075329c5fb tests: test basic template support for status
Matt Mackall <mpm@selenic.com>
parents: 24663
diff changeset
358 I ignoreddir/file
e8075329c5fb tests: test basic template support for status
Matt Mackall <mpm@selenic.com>
parents: 24663
diff changeset
359 C modified
e8075329c5fb tests: test basic template support for status
Matt Mackall <mpm@selenic.com>
parents: 24663
diff changeset
360 $ hg status -T compact
e8075329c5fb tests: test basic template support for status
Matt Mackall <mpm@selenic.com>
parents: 24663
diff changeset
361 abort: "status" not in template map
e8075329c5fb tests: test basic template support for status
Matt Mackall <mpm@selenic.com>
parents: 24663
diff changeset
362 [255]
e8075329c5fb tests: test basic template support for status
Matt Mackall <mpm@selenic.com>
parents: 24663
diff changeset
363
11782
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
364 hg status ignoreddir/file:
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
365
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
366 $ hg status ignoreddir/file
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
367
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
368 hg status -i ignoreddir/file:
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
369
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
370 $ hg status -i ignoreddir/file
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
371 I ignoreddir/file
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
372 $ cd ..
6200
acc40572da5b 'hg status -q' output skips non-tracked files.
Zoran Bosnjak <zoran.bosnjak@via.si>
parents: 6033
diff changeset
373
12328
b63f6422d2a7 tests: fix a bunch of pointless #s in unified tests
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
374 Check 'status -q' and some combinations
11782
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
375
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
376 $ hg init repo3
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
377 $ cd repo3
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
378 $ touch modified removed deleted ignored
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
379 $ echo "^ignored$" > .hgignore
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
380 $ hg commit -A -m 'initial checkin'
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
381 adding .hgignore
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
382 adding deleted
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
383 adding modified
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
384 adding removed
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
385 $ touch added unknown ignored
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
386 $ hg add added
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
387 $ echo "test" >> modified
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
388 $ hg remove removed
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
389 $ rm deleted
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
390 $ hg copy modified copied
6200
acc40572da5b 'hg status -q' output skips non-tracked files.
Zoran Bosnjak <zoran.bosnjak@via.si>
parents: 6033
diff changeset
391
24419
0e41f110e69e revset: add wdir() function to specify workingctx revision by command
Yuya Nishihara <yuya@tcha.org>
parents: 23402
diff changeset
392 Specify working directory revision explicitly, that should be the same as
0e41f110e69e revset: add wdir() function to specify workingctx revision by command
Yuya Nishihara <yuya@tcha.org>
parents: 23402
diff changeset
393 "hg status"
0e41f110e69e revset: add wdir() function to specify workingctx revision by command
Yuya Nishihara <yuya@tcha.org>
parents: 23402
diff changeset
394
0e41f110e69e revset: add wdir() function to specify workingctx revision by command
Yuya Nishihara <yuya@tcha.org>
parents: 23402
diff changeset
395 $ hg status --change "wdir()"
0e41f110e69e revset: add wdir() function to specify workingctx revision by command
Yuya Nishihara <yuya@tcha.org>
parents: 23402
diff changeset
396 M modified
0e41f110e69e revset: add wdir() function to specify workingctx revision by command
Yuya Nishihara <yuya@tcha.org>
parents: 23402
diff changeset
397 A added
0e41f110e69e revset: add wdir() function to specify workingctx revision by command
Yuya Nishihara <yuya@tcha.org>
parents: 23402
diff changeset
398 A copied
0e41f110e69e revset: add wdir() function to specify workingctx revision by command
Yuya Nishihara <yuya@tcha.org>
parents: 23402
diff changeset
399 R removed
0e41f110e69e revset: add wdir() function to specify workingctx revision by command
Yuya Nishihara <yuya@tcha.org>
parents: 23402
diff changeset
400 ! deleted
0e41f110e69e revset: add wdir() function to specify workingctx revision by command
Yuya Nishihara <yuya@tcha.org>
parents: 23402
diff changeset
401 ? unknown
0e41f110e69e revset: add wdir() function to specify workingctx revision by command
Yuya Nishihara <yuya@tcha.org>
parents: 23402
diff changeset
402
12328
b63f6422d2a7 tests: fix a bunch of pointless #s in unified tests
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
403 Run status with 2 different flags.
b63f6422d2a7 tests: fix a bunch of pointless #s in unified tests
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
404 Check if result is the same or different.
b63f6422d2a7 tests: fix a bunch of pointless #s in unified tests
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
405 If result is not as expected, raise error
11782
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
406
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
407 $ assert() {
12365
22f3353bcc36 tests: cleanup exit code handling in unified tests
Matt Mackall <mpm@selenic.com>
parents: 12328
diff changeset
408 > hg status $1 > ../a
22f3353bcc36 tests: cleanup exit code handling in unified tests
Matt Mackall <mpm@selenic.com>
parents: 12328
diff changeset
409 > hg status $2 > ../b
22f3353bcc36 tests: cleanup exit code handling in unified tests
Matt Mackall <mpm@selenic.com>
parents: 12328
diff changeset
410 > if diff ../a ../b > /dev/null; then
22f3353bcc36 tests: cleanup exit code handling in unified tests
Matt Mackall <mpm@selenic.com>
parents: 12328
diff changeset
411 > out=0
22f3353bcc36 tests: cleanup exit code handling in unified tests
Matt Mackall <mpm@selenic.com>
parents: 12328
diff changeset
412 > else
11782
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
413 > out=1
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
414 > fi
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
415 > if [ $3 -eq 0 ]; then
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
416 > df="same"
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
417 > else
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
418 > df="different"
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
419 > fi
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
420 > if [ $out -ne $3 ]; then
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
421 > echo "Error on $1 and $2, should be $df."
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
422 > fi
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
423 > }
6200
acc40572da5b 'hg status -q' output skips non-tracked files.
Zoran Bosnjak <zoran.bosnjak@via.si>
parents: 6033
diff changeset
424
12328
b63f6422d2a7 tests: fix a bunch of pointless #s in unified tests
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
425 Assert flag1 flag2 [0-same | 1-different]
11782
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
426
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
427 $ assert "-q" "-mard" 0
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
428 $ assert "-A" "-marduicC" 0
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
429 $ assert "-qA" "-mardcC" 0
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
430 $ assert "-qAui" "-A" 0
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
431 $ assert "-qAu" "-marducC" 0
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
432 $ assert "-qAi" "-mardicC" 0
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
433 $ assert "-qu" "-u" 0
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
434 $ assert "-q" "-u" 1
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
435 $ assert "-m" "-a" 1
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
436 $ assert "-r" "-d" 1
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
437 $ cd ..
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
438
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
439 $ hg init repo4
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
440 $ cd repo4
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
441 $ touch modified removed deleted
12156
4c94b6d0fb1c tests: remove unneeded -d flags
Martin Geisler <mg@lazybytes.net>
parents: 11782
diff changeset
442 $ hg ci -q -A -m 'initial checkin'
11782
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
443 $ touch added unknown
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
444 $ hg add added
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
445 $ hg remove removed
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
446 $ rm deleted
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
447 $ echo x > modified
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
448 $ hg copy modified copied
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
449 $ hg ci -m 'test checkin' -d "1000001 0"
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
450 $ rm *
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
451 $ touch unrelated
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
452 $ hg ci -q -A -m 'unrelated checkin' -d "1000002 0"
6200
acc40572da5b 'hg status -q' output skips non-tracked files.
Zoran Bosnjak <zoran.bosnjak@via.si>
parents: 6033
diff changeset
453
11782
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
454 hg status --change 1:
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
455
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
456 $ hg status --change 1
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
457 M modified
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
458 A added
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
459 A copied
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
460 R removed
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
461
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
462 hg status --change 1 unrelated:
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
463
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
464 $ hg status --change 1 unrelated
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
465
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
466 hg status -C --change 1 added modified copied removed deleted:
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
467
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
468 $ hg status -C --change 1 added modified copied removed deleted
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
469 M modified
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
470 A added
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
471 A copied
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
472 modified
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
473 R removed
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
474
15578
db0e277bdd37 status: support revsets with --change
Patrick Mezard <pmezard@gmail.com>
parents: 15521
diff changeset
475 hg status -A --change 1 and revset:
11782
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
476
15578
db0e277bdd37 status: support revsets with --change
Patrick Mezard <pmezard@gmail.com>
parents: 15521
diff changeset
477 $ hg status -A --change '1|1'
11782
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
478 M modified
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
479 A added
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
480 A copied
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
481 modified
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
482 R removed
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
483 C deleted
15848
012b285cf643 filectx: fix cmp() of file starting with '\1\n'
Yuya Nishihara <yuya@tcha.org>
parents: 14155
diff changeset
484
012b285cf643 filectx: fix cmp() of file starting with '\1\n'
Yuya Nishihara <yuya@tcha.org>
parents: 14155
diff changeset
485 $ cd ..
012b285cf643 filectx: fix cmp() of file starting with '\1\n'
Yuya Nishihara <yuya@tcha.org>
parents: 14155
diff changeset
486
27668
369c8f9453c2 status: revert + flag-change == modified
Martin von Zweigbergk <martinvonz@google.com>
parents: 25515
diff changeset
487 hg status with --rev and reverted changes:
369c8f9453c2 status: revert + flag-change == modified
Martin von Zweigbergk <martinvonz@google.com>
parents: 25515
diff changeset
488
369c8f9453c2 status: revert + flag-change == modified
Martin von Zweigbergk <martinvonz@google.com>
parents: 25515
diff changeset
489 $ hg init reverted-changes-repo
369c8f9453c2 status: revert + flag-change == modified
Martin von Zweigbergk <martinvonz@google.com>
parents: 25515
diff changeset
490 $ cd reverted-changes-repo
369c8f9453c2 status: revert + flag-change == modified
Martin von Zweigbergk <martinvonz@google.com>
parents: 25515
diff changeset
491 $ echo a > file
369c8f9453c2 status: revert + flag-change == modified
Martin von Zweigbergk <martinvonz@google.com>
parents: 25515
diff changeset
492 $ hg add file
369c8f9453c2 status: revert + flag-change == modified
Martin von Zweigbergk <martinvonz@google.com>
parents: 25515
diff changeset
493 $ hg ci -m a
369c8f9453c2 status: revert + flag-change == modified
Martin von Zweigbergk <martinvonz@google.com>
parents: 25515
diff changeset
494 $ echo b > file
369c8f9453c2 status: revert + flag-change == modified
Martin von Zweigbergk <martinvonz@google.com>
parents: 25515
diff changeset
495 $ hg ci -m b
369c8f9453c2 status: revert + flag-change == modified
Martin von Zweigbergk <martinvonz@google.com>
parents: 25515
diff changeset
496
369c8f9453c2 status: revert + flag-change == modified
Martin von Zweigbergk <martinvonz@google.com>
parents: 25515
diff changeset
497 reverted file should appear clean
369c8f9453c2 status: revert + flag-change == modified
Martin von Zweigbergk <martinvonz@google.com>
parents: 25515
diff changeset
498
369c8f9453c2 status: revert + flag-change == modified
Martin von Zweigbergk <martinvonz@google.com>
parents: 25515
diff changeset
499 $ hg revert -r 0 .
369c8f9453c2 status: revert + flag-change == modified
Martin von Zweigbergk <martinvonz@google.com>
parents: 25515
diff changeset
500 reverting file
369c8f9453c2 status: revert + flag-change == modified
Martin von Zweigbergk <martinvonz@google.com>
parents: 25515
diff changeset
501 $ hg status -A --rev 0
369c8f9453c2 status: revert + flag-change == modified
Martin von Zweigbergk <martinvonz@google.com>
parents: 25515
diff changeset
502 C file
369c8f9453c2 status: revert + flag-change == modified
Martin von Zweigbergk <martinvonz@google.com>
parents: 25515
diff changeset
503
369c8f9453c2 status: revert + flag-change == modified
Martin von Zweigbergk <martinvonz@google.com>
parents: 25515
diff changeset
504 #if execbit
369c8f9453c2 status: revert + flag-change == modified
Martin von Zweigbergk <martinvonz@google.com>
parents: 25515
diff changeset
505 reverted file with changed flag should appear modified
369c8f9453c2 status: revert + flag-change == modified
Martin von Zweigbergk <martinvonz@google.com>
parents: 25515
diff changeset
506
369c8f9453c2 status: revert + flag-change == modified
Martin von Zweigbergk <martinvonz@google.com>
parents: 25515
diff changeset
507 $ chmod +x file
369c8f9453c2 status: revert + flag-change == modified
Martin von Zweigbergk <martinvonz@google.com>
parents: 25515
diff changeset
508 $ hg status -A --rev 0
369c8f9453c2 status: revert + flag-change == modified
Martin von Zweigbergk <martinvonz@google.com>
parents: 25515
diff changeset
509 M file
369c8f9453c2 status: revert + flag-change == modified
Martin von Zweigbergk <martinvonz@google.com>
parents: 25515
diff changeset
510
27743
5dcadc6c5aed test-status: stabilize for no-execbit platforms
Matt Harbison <matt_harbison@yahoo.com>
parents: 27720
diff changeset
511 $ hg revert -r 0 .
5dcadc6c5aed test-status: stabilize for no-execbit platforms
Matt Harbison <matt_harbison@yahoo.com>
parents: 27720
diff changeset
512 reverting file
27749
215b47449e47 context: check for differing flags a little earlier
Martin von Zweigbergk <martinvonz@google.com>
parents: 27747
diff changeset
513
215b47449e47 context: check for differing flags a little earlier
Martin von Zweigbergk <martinvonz@google.com>
parents: 27747
diff changeset
514 reverted and committed file with changed flag should appear modified
215b47449e47 context: check for differing flags a little earlier
Martin von Zweigbergk <martinvonz@google.com>
parents: 27747
diff changeset
515
215b47449e47 context: check for differing flags a little earlier
Martin von Zweigbergk <martinvonz@google.com>
parents: 27747
diff changeset
516 $ hg co -C .
215b47449e47 context: check for differing flags a little earlier
Martin von Zweigbergk <martinvonz@google.com>
parents: 27747
diff changeset
517 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
215b47449e47 context: check for differing flags a little earlier
Martin von Zweigbergk <martinvonz@google.com>
parents: 27747
diff changeset
518 $ chmod +x file
215b47449e47 context: check for differing flags a little earlier
Martin von Zweigbergk <martinvonz@google.com>
parents: 27747
diff changeset
519 $ hg ci -m 'change flag'
215b47449e47 context: check for differing flags a little earlier
Martin von Zweigbergk <martinvonz@google.com>
parents: 27747
diff changeset
520 $ hg status -A --rev 1 --rev 2
215b47449e47 context: check for differing flags a little earlier
Martin von Zweigbergk <martinvonz@google.com>
parents: 27747
diff changeset
521 M file
215b47449e47 context: check for differing flags a little earlier
Martin von Zweigbergk <martinvonz@google.com>
parents: 27747
diff changeset
522 $ hg diff -r 1 -r 2
215b47449e47 context: check for differing flags a little earlier
Martin von Zweigbergk <martinvonz@google.com>
parents: 27747
diff changeset
523
27668
369c8f9453c2 status: revert + flag-change == modified
Martin von Zweigbergk <martinvonz@google.com>
parents: 25515
diff changeset
524 #endif
369c8f9453c2 status: revert + flag-change == modified
Martin von Zweigbergk <martinvonz@google.com>
parents: 25515
diff changeset
525
31423
568d80b24b3a tests: properly drop back to root dir in test-status.t
Ryan McElroy <rmcelroy@fb.com>
parents: 29485
diff changeset
526 $ cd ..
568d80b24b3a tests: properly drop back to root dir in test-status.t
Ryan McElroy <rmcelroy@fb.com>
parents: 29485
diff changeset
527
15848
012b285cf643 filectx: fix cmp() of file starting with '\1\n'
Yuya Nishihara <yuya@tcha.org>
parents: 14155
diff changeset
528 hg status of binary file starting with '\1\n', a separator for metadata:
012b285cf643 filectx: fix cmp() of file starting with '\1\n'
Yuya Nishihara <yuya@tcha.org>
parents: 14155
diff changeset
529
012b285cf643 filectx: fix cmp() of file starting with '\1\n'
Yuya Nishihara <yuya@tcha.org>
parents: 14155
diff changeset
530 $ hg init repo5
012b285cf643 filectx: fix cmp() of file starting with '\1\n'
Yuya Nishihara <yuya@tcha.org>
parents: 14155
diff changeset
531 $ cd repo5
38017
6660b90805c6 py3: suppress the value returned by .write() calls
Pulkit Goyal <7895pulkit@gmail.com>
parents: 36039
diff changeset
532 >>> open("010a", r"wb").write(b"\1\nfoo") and None
15848
012b285cf643 filectx: fix cmp() of file starting with '\1\n'
Yuya Nishihara <yuya@tcha.org>
parents: 14155
diff changeset
533 $ hg ci -q -A -m 'initial checkin'
012b285cf643 filectx: fix cmp() of file starting with '\1\n'
Yuya Nishihara <yuya@tcha.org>
parents: 14155
diff changeset
534 $ hg status -A
012b285cf643 filectx: fix cmp() of file starting with '\1\n'
Yuya Nishihara <yuya@tcha.org>
parents: 14155
diff changeset
535 C 010a
012b285cf643 filectx: fix cmp() of file starting with '\1\n'
Yuya Nishihara <yuya@tcha.org>
parents: 14155
diff changeset
536
38017
6660b90805c6 py3: suppress the value returned by .write() calls
Pulkit Goyal <7895pulkit@gmail.com>
parents: 36039
diff changeset
537 >>> open("010a", r"wb").write(b"\1\nbar") and None
15848
012b285cf643 filectx: fix cmp() of file starting with '\1\n'
Yuya Nishihara <yuya@tcha.org>
parents: 14155
diff changeset
538 $ hg status -A
012b285cf643 filectx: fix cmp() of file starting with '\1\n'
Yuya Nishihara <yuya@tcha.org>
parents: 14155
diff changeset
539 M 010a
012b285cf643 filectx: fix cmp() of file starting with '\1\n'
Yuya Nishihara <yuya@tcha.org>
parents: 14155
diff changeset
540 $ hg ci -q -m 'modify 010a'
012b285cf643 filectx: fix cmp() of file starting with '\1\n'
Yuya Nishihara <yuya@tcha.org>
parents: 14155
diff changeset
541 $ hg status -A --rev 0:1
012b285cf643 filectx: fix cmp() of file starting with '\1\n'
Yuya Nishihara <yuya@tcha.org>
parents: 14155
diff changeset
542 M 010a
012b285cf643 filectx: fix cmp() of file starting with '\1\n'
Yuya Nishihara <yuya@tcha.org>
parents: 14155
diff changeset
543
012b285cf643 filectx: fix cmp() of file starting with '\1\n'
Yuya Nishihara <yuya@tcha.org>
parents: 14155
diff changeset
544 $ touch empty
012b285cf643 filectx: fix cmp() of file starting with '\1\n'
Yuya Nishihara <yuya@tcha.org>
parents: 14155
diff changeset
545 $ hg ci -q -A -m 'add another file'
012b285cf643 filectx: fix cmp() of file starting with '\1\n'
Yuya Nishihara <yuya@tcha.org>
parents: 14155
diff changeset
546 $ hg status -A --rev 1:2 010a
012b285cf643 filectx: fix cmp() of file starting with '\1\n'
Yuya Nishihara <yuya@tcha.org>
parents: 14155
diff changeset
547 C 010a
16144
4546a8513dcd localrepository: use 'changectx.dirs()' in 'status()' for directory patterns
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 16098
diff changeset
548
4546a8513dcd localrepository: use 'changectx.dirs()' in 'status()' for directory patterns
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 16098
diff changeset
549 $ cd ..
4546a8513dcd localrepository: use 'changectx.dirs()' in 'status()' for directory patterns
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 16098
diff changeset
550
4546a8513dcd localrepository: use 'changectx.dirs()' in 'status()' for directory patterns
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 16098
diff changeset
551 test "hg status" with "directory pattern" which matches against files
4546a8513dcd localrepository: use 'changectx.dirs()' in 'status()' for directory patterns
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 16098
diff changeset
552 only known on target revision.
4546a8513dcd localrepository: use 'changectx.dirs()' in 'status()' for directory patterns
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 16098
diff changeset
553
4546a8513dcd localrepository: use 'changectx.dirs()' in 'status()' for directory patterns
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 16098
diff changeset
554 $ hg init repo6
4546a8513dcd localrepository: use 'changectx.dirs()' in 'status()' for directory patterns
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 16098
diff changeset
555 $ cd repo6
4546a8513dcd localrepository: use 'changectx.dirs()' in 'status()' for directory patterns
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 16098
diff changeset
556
4546a8513dcd localrepository: use 'changectx.dirs()' in 'status()' for directory patterns
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 16098
diff changeset
557 $ echo a > a.txt
4546a8513dcd localrepository: use 'changectx.dirs()' in 'status()' for directory patterns
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 16098
diff changeset
558 $ hg add a.txt
4546a8513dcd localrepository: use 'changectx.dirs()' in 'status()' for directory patterns
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 16098
diff changeset
559 $ hg commit -m '#0'
4546a8513dcd localrepository: use 'changectx.dirs()' in 'status()' for directory patterns
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 16098
diff changeset
560 $ mkdir -p 1/2/3/4/5
4546a8513dcd localrepository: use 'changectx.dirs()' in 'status()' for directory patterns
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 16098
diff changeset
561 $ echo b > 1/2/3/4/5/b.txt
4546a8513dcd localrepository: use 'changectx.dirs()' in 'status()' for directory patterns
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 16098
diff changeset
562 $ hg add 1/2/3/4/5/b.txt
4546a8513dcd localrepository: use 'changectx.dirs()' in 'status()' for directory patterns
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 16098
diff changeset
563 $ hg commit -m '#1'
4546a8513dcd localrepository: use 'changectx.dirs()' in 'status()' for directory patterns
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 16098
diff changeset
564
4546a8513dcd localrepository: use 'changectx.dirs()' in 'status()' for directory patterns
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 16098
diff changeset
565 $ hg update -C 0 > /dev/null
4546a8513dcd localrepository: use 'changectx.dirs()' in 'status()' for directory patterns
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 16098
diff changeset
566 $ hg status -A
4546a8513dcd localrepository: use 'changectx.dirs()' in 'status()' for directory patterns
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 16098
diff changeset
567 C a.txt
4546a8513dcd localrepository: use 'changectx.dirs()' in 'status()' for directory patterns
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 16098
diff changeset
568
4546a8513dcd localrepository: use 'changectx.dirs()' in 'status()' for directory patterns
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 16098
diff changeset
569 the directory matching against specified pattern should be removed,
4546a8513dcd localrepository: use 'changectx.dirs()' in 'status()' for directory patterns
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 16098
diff changeset
570 because directory existence prevents 'dirstate.walk()' from showing
4546a8513dcd localrepository: use 'changectx.dirs()' in 'status()' for directory patterns
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 16098
diff changeset
571 warning message about such pattern.
4546a8513dcd localrepository: use 'changectx.dirs()' in 'status()' for directory patterns
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 16098
diff changeset
572
4546a8513dcd localrepository: use 'changectx.dirs()' in 'status()' for directory patterns
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 16098
diff changeset
573 $ test ! -d 1
4546a8513dcd localrepository: use 'changectx.dirs()' in 'status()' for directory patterns
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 16098
diff changeset
574 $ hg status -A --rev 1 1/2/3/4/5/b.txt
4546a8513dcd localrepository: use 'changectx.dirs()' in 'status()' for directory patterns
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 16098
diff changeset
575 R 1/2/3/4/5/b.txt
4546a8513dcd localrepository: use 'changectx.dirs()' in 'status()' for directory patterns
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 16098
diff changeset
576 $ hg status -A --rev 1 1/2/3/4/5
4546a8513dcd localrepository: use 'changectx.dirs()' in 'status()' for directory patterns
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 16098
diff changeset
577 R 1/2/3/4/5/b.txt
4546a8513dcd localrepository: use 'changectx.dirs()' in 'status()' for directory patterns
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 16098
diff changeset
578 $ hg status -A --rev 1 1/2/3
4546a8513dcd localrepository: use 'changectx.dirs()' in 'status()' for directory patterns
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 16098
diff changeset
579 R 1/2/3/4/5/b.txt
4546a8513dcd localrepository: use 'changectx.dirs()' in 'status()' for directory patterns
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 16098
diff changeset
580 $ hg status -A --rev 1 1
4546a8513dcd localrepository: use 'changectx.dirs()' in 'status()' for directory patterns
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 16098
diff changeset
581 R 1/2/3/4/5/b.txt
4546a8513dcd localrepository: use 'changectx.dirs()' in 'status()' for directory patterns
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 16098
diff changeset
582
22424
1f72226064b8 formatter: make debug style match Python syntax
Matt Mackall <mpm@selenic.com>
parents: 21972
diff changeset
583 $ hg status --config ui.formatdebug=True --rev 1 1
1f72226064b8 formatter: make debug style match Python syntax
Matt Mackall <mpm@selenic.com>
parents: 21972
diff changeset
584 status = [
40277
1159031ada1e formatter: make debug output prettier
Yuya Nishihara <yuya@tcha.org>
parents: 39370
diff changeset
585 {
43861
aac921f54554 status: outputting structured unfinished-operation information
Rodrigo Damazio Bovendorp <rdamazio@google.com>
parents: 42502
diff changeset
586 'itemtype': 'file',
40277
1159031ada1e formatter: make debug output prettier
Yuya Nishihara <yuya@tcha.org>
parents: 39370
diff changeset
587 'path': '1/2/3/4/5/b.txt',
1159031ada1e formatter: make debug output prettier
Yuya Nishihara <yuya@tcha.org>
parents: 39370
diff changeset
588 'status': 'R'
1159031ada1e formatter: make debug output prettier
Yuya Nishihara <yuya@tcha.org>
parents: 39370
diff changeset
589 },
22424
1f72226064b8 formatter: make debug style match Python syntax
Matt Mackall <mpm@selenic.com>
parents: 21972
diff changeset
590 ]
1f72226064b8 formatter: make debug style match Python syntax
Matt Mackall <mpm@selenic.com>
parents: 21972
diff changeset
591
17377
a10f7eeb2588 test-status.t: test ui.slash on Windows
Patrick Mezard <patrick@mezard.eu>
parents: 16144
diff changeset
592 #if windows
a10f7eeb2588 test-status.t: test ui.slash on Windows
Patrick Mezard <patrick@mezard.eu>
parents: 16144
diff changeset
593 $ hg --config ui.slash=false status -A --rev 1 1
a10f7eeb2588 test-status.t: test ui.slash on Windows
Patrick Mezard <patrick@mezard.eu>
parents: 16144
diff changeset
594 R 1\2\3\4\5\b.txt
a10f7eeb2588 test-status.t: test ui.slash on Windows
Patrick Mezard <patrick@mezard.eu>
parents: 16144
diff changeset
595 #endif
a10f7eeb2588 test-status.t: test ui.slash on Windows
Patrick Mezard <patrick@mezard.eu>
parents: 16144
diff changeset
596
16144
4546a8513dcd localrepository: use 'changectx.dirs()' in 'status()' for directory patterns
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 16098
diff changeset
597 $ cd ..
23402
2963d5c9d90b rename: properly report removed and added file as modified (issue4458)
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 23037
diff changeset
598
2963d5c9d90b rename: properly report removed and added file as modified (issue4458)
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 23037
diff changeset
599 Status after move overwriting a file (issue4458)
2963d5c9d90b rename: properly report removed and added file as modified (issue4458)
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 23037
diff changeset
600 =================================================
2963d5c9d90b rename: properly report removed and added file as modified (issue4458)
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 23037
diff changeset
601
2963d5c9d90b rename: properly report removed and added file as modified (issue4458)
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 23037
diff changeset
602
2963d5c9d90b rename: properly report removed and added file as modified (issue4458)
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 23037
diff changeset
603 $ hg init issue4458
2963d5c9d90b rename: properly report removed and added file as modified (issue4458)
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 23037
diff changeset
604 $ cd issue4458
2963d5c9d90b rename: properly report removed and added file as modified (issue4458)
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 23037
diff changeset
605 $ echo a > a
2963d5c9d90b rename: properly report removed and added file as modified (issue4458)
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 23037
diff changeset
606 $ echo b > b
2963d5c9d90b rename: properly report removed and added file as modified (issue4458)
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 23037
diff changeset
607 $ hg commit -Am base
2963d5c9d90b rename: properly report removed and added file as modified (issue4458)
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 23037
diff changeset
608 adding a
2963d5c9d90b rename: properly report removed and added file as modified (issue4458)
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 23037
diff changeset
609 adding b
2963d5c9d90b rename: properly report removed and added file as modified (issue4458)
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 23037
diff changeset
610
2963d5c9d90b rename: properly report removed and added file as modified (issue4458)
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 23037
diff changeset
611
2963d5c9d90b rename: properly report removed and added file as modified (issue4458)
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 23037
diff changeset
612 with --force
2963d5c9d90b rename: properly report removed and added file as modified (issue4458)
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 23037
diff changeset
613
2963d5c9d90b rename: properly report removed and added file as modified (issue4458)
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 23037
diff changeset
614 $ hg mv b --force a
2963d5c9d90b rename: properly report removed and added file as modified (issue4458)
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 23037
diff changeset
615 $ hg st --copies
2963d5c9d90b rename: properly report removed and added file as modified (issue4458)
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 23037
diff changeset
616 M a
2963d5c9d90b rename: properly report removed and added file as modified (issue4458)
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 23037
diff changeset
617 b
2963d5c9d90b rename: properly report removed and added file as modified (issue4458)
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 23037
diff changeset
618 R b
2963d5c9d90b rename: properly report removed and added file as modified (issue4458)
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 23037
diff changeset
619 $ hg revert --all
2963d5c9d90b rename: properly report removed and added file as modified (issue4458)
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 23037
diff changeset
620 reverting a
2963d5c9d90b rename: properly report removed and added file as modified (issue4458)
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 23037
diff changeset
621 undeleting b
2963d5c9d90b rename: properly report removed and added file as modified (issue4458)
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 23037
diff changeset
622 $ rm *.orig
2963d5c9d90b rename: properly report removed and added file as modified (issue4458)
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 23037
diff changeset
623
2963d5c9d90b rename: properly report removed and added file as modified (issue4458)
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 23037
diff changeset
624 without force
2963d5c9d90b rename: properly report removed and added file as modified (issue4458)
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 23037
diff changeset
625
2963d5c9d90b rename: properly report removed and added file as modified (issue4458)
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 23037
diff changeset
626 $ hg rm a
2963d5c9d90b rename: properly report removed and added file as modified (issue4458)
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 23037
diff changeset
627 $ hg st --copies
2963d5c9d90b rename: properly report removed and added file as modified (issue4458)
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 23037
diff changeset
628 R a
2963d5c9d90b rename: properly report removed and added file as modified (issue4458)
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 23037
diff changeset
629 $ hg mv b a
2963d5c9d90b rename: properly report removed and added file as modified (issue4458)
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 23037
diff changeset
630 $ hg st --copies
2963d5c9d90b rename: properly report removed and added file as modified (issue4458)
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 23037
diff changeset
631 M a
2963d5c9d90b rename: properly report removed and added file as modified (issue4458)
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 23037
diff changeset
632 b
2963d5c9d90b rename: properly report removed and added file as modified (issue4458)
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 23037
diff changeset
633 R b
2963d5c9d90b rename: properly report removed and added file as modified (issue4458)
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 23037
diff changeset
634
24663
7d01371e6358 commands: add ui.statuscopies config knob
Mathias De Maré <mathias.demare@gmail.com>
parents: 24419
diff changeset
635 using ui.statuscopies setting
7d01371e6358 commands: add ui.statuscopies config knob
Mathias De Maré <mathias.demare@gmail.com>
parents: 24419
diff changeset
636 $ hg st --config ui.statuscopies=true
7d01371e6358 commands: add ui.statuscopies config knob
Mathias De Maré <mathias.demare@gmail.com>
parents: 24419
diff changeset
637 M a
7d01371e6358 commands: add ui.statuscopies config knob
Mathias De Maré <mathias.demare@gmail.com>
parents: 24419
diff changeset
638 b
7d01371e6358 commands: add ui.statuscopies config knob
Mathias De Maré <mathias.demare@gmail.com>
parents: 24419
diff changeset
639 R b
49498
f2b1bc19ce90 status: let `--no-copies` override `ui.statuscopies`
Martin von Zweigbergk <martinvonz@google.com>
parents: 48879
diff changeset
640 $ hg st --config ui.statuscopies=true --no-copies
f2b1bc19ce90 status: let `--no-copies` override `ui.statuscopies`
Martin von Zweigbergk <martinvonz@google.com>
parents: 48879
diff changeset
641 M a
f2b1bc19ce90 status: let `--no-copies` override `ui.statuscopies`
Martin von Zweigbergk <martinvonz@google.com>
parents: 48879
diff changeset
642 R b
24663
7d01371e6358 commands: add ui.statuscopies config knob
Mathias De Maré <mathias.demare@gmail.com>
parents: 24419
diff changeset
643 $ hg st --config ui.statuscopies=false
7d01371e6358 commands: add ui.statuscopies config knob
Mathias De Maré <mathias.demare@gmail.com>
parents: 24419
diff changeset
644 M a
7d01371e6358 commands: add ui.statuscopies config knob
Mathias De Maré <mathias.demare@gmail.com>
parents: 24419
diff changeset
645 R b
49498
f2b1bc19ce90 status: let `--no-copies` override `ui.statuscopies`
Martin von Zweigbergk <martinvonz@google.com>
parents: 48879
diff changeset
646 $ hg st --config ui.statuscopies=false --copies
f2b1bc19ce90 status: let `--no-copies` override `ui.statuscopies`
Martin von Zweigbergk <martinvonz@google.com>
parents: 48879
diff changeset
647 M a
f2b1bc19ce90 status: let `--no-copies` override `ui.statuscopies`
Martin von Zweigbergk <martinvonz@google.com>
parents: 48879
diff changeset
648 b
f2b1bc19ce90 status: let `--no-copies` override `ui.statuscopies`
Martin von Zweigbergk <martinvonz@google.com>
parents: 48879
diff changeset
649 R b
35067
929858db4d22 tweakdefaults: turn on ui.statuscopies
Martin von Zweigbergk <martinvonz@google.com>
parents: 32887
diff changeset
650 $ hg st --config ui.tweakdefaults=yes
929858db4d22 tweakdefaults: turn on ui.statuscopies
Martin von Zweigbergk <martinvonz@google.com>
parents: 32887
diff changeset
651 M a
929858db4d22 tweakdefaults: turn on ui.statuscopies
Martin von Zweigbergk <martinvonz@google.com>
parents: 32887
diff changeset
652 b
929858db4d22 tweakdefaults: turn on ui.statuscopies
Martin von Zweigbergk <martinvonz@google.com>
parents: 32887
diff changeset
653 R b
24663
7d01371e6358 commands: add ui.statuscopies config knob
Mathias De Maré <mathias.demare@gmail.com>
parents: 24419
diff changeset
654
29000
2d3837a4bded log: fix status template to list copy source per dest (issue5155)
Yuya Nishihara <yuya@tcha.org>
parents: 27749
diff changeset
655 using log status template (issue5155)
2d3837a4bded log: fix status template to list copy source per dest (issue5155)
Yuya Nishihara <yuya@tcha.org>
parents: 27749
diff changeset
656 $ hg log -Tstatus -r 'wdir()' -C
2d3837a4bded log: fix status template to list copy source per dest (issue5155)
Yuya Nishihara <yuya@tcha.org>
parents: 27749
diff changeset
657 changeset: 2147483647:ffffffffffff
2d3837a4bded log: fix status template to list copy source per dest (issue5155)
Yuya Nishihara <yuya@tcha.org>
parents: 27749
diff changeset
658 parent: 0:8c55c58b4c0e
2d3837a4bded log: fix status template to list copy source per dest (issue5155)
Yuya Nishihara <yuya@tcha.org>
parents: 27749
diff changeset
659 user: test
2d3837a4bded log: fix status template to list copy source per dest (issue5155)
Yuya Nishihara <yuya@tcha.org>
parents: 27749
diff changeset
660 date: * (glob)
2d3837a4bded log: fix status template to list copy source per dest (issue5155)
Yuya Nishihara <yuya@tcha.org>
parents: 27749
diff changeset
661 files:
2d3837a4bded log: fix status template to list copy source per dest (issue5155)
Yuya Nishihara <yuya@tcha.org>
parents: 27749
diff changeset
662 M a
2d3837a4bded log: fix status template to list copy source per dest (issue5155)
Yuya Nishihara <yuya@tcha.org>
parents: 27749
diff changeset
663 b
2d3837a4bded log: fix status template to list copy source per dest (issue5155)
Yuya Nishihara <yuya@tcha.org>
parents: 27749
diff changeset
664 R b
2d3837a4bded log: fix status template to list copy source per dest (issue5155)
Yuya Nishihara <yuya@tcha.org>
parents: 27749
diff changeset
665
42501
75334e5b519e tests: demonstrate missing copy information in working copy with graphlog
Martin von Zweigbergk <martinvonz@google.com>
parents: 41844
diff changeset
666 $ hg log -GTstatus -r 'wdir()' -C
75334e5b519e tests: demonstrate missing copy information in working copy with graphlog
Martin von Zweigbergk <martinvonz@google.com>
parents: 41844
diff changeset
667 o changeset: 2147483647:ffffffffffff
75334e5b519e tests: demonstrate missing copy information in working copy with graphlog
Martin von Zweigbergk <martinvonz@google.com>
parents: 41844
diff changeset
668 | parent: 0:8c55c58b4c0e
75334e5b519e tests: demonstrate missing copy information in working copy with graphlog
Martin von Zweigbergk <martinvonz@google.com>
parents: 41844
diff changeset
669 ~ user: test
75334e5b519e tests: demonstrate missing copy information in working copy with graphlog
Martin von Zweigbergk <martinvonz@google.com>
parents: 41844
diff changeset
670 date: * (glob)
75334e5b519e tests: demonstrate missing copy information in working copy with graphlog
Martin von Zweigbergk <martinvonz@google.com>
parents: 41844
diff changeset
671 files:
75334e5b519e tests: demonstrate missing copy information in working copy with graphlog
Martin von Zweigbergk <martinvonz@google.com>
parents: 41844
diff changeset
672 M a
42502
c929f612afac logcmdutil: also check for copies in null revision and working copy
Martin von Zweigbergk <martinvonz@google.com>
parents: 42501
diff changeset
673 b
42501
75334e5b519e tests: demonstrate missing copy information in working copy with graphlog
Martin von Zweigbergk <martinvonz@google.com>
parents: 41844
diff changeset
674 R b
75334e5b519e tests: demonstrate missing copy information in working copy with graphlog
Martin von Zweigbergk <martinvonz@google.com>
parents: 41844
diff changeset
675
29000
2d3837a4bded log: fix status template to list copy source per dest (issue5155)
Yuya Nishihara <yuya@tcha.org>
parents: 27749
diff changeset
676
23402
2963d5c9d90b rename: properly report removed and added file as modified (issue4458)
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 23037
diff changeset
677 Other "bug" highlight, the revision status does not report the copy information.
2963d5c9d90b rename: properly report removed and added file as modified (issue4458)
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 23037
diff changeset
678 This is buggy behavior.
2963d5c9d90b rename: properly report removed and added file as modified (issue4458)
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 23037
diff changeset
679
2963d5c9d90b rename: properly report removed and added file as modified (issue4458)
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 23037
diff changeset
680 $ hg commit -m 'blah'
2963d5c9d90b rename: properly report removed and added file as modified (issue4458)
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 23037
diff changeset
681 $ hg st --copies --change .
2963d5c9d90b rename: properly report removed and added file as modified (issue4458)
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 23037
diff changeset
682 M a
2963d5c9d90b rename: properly report removed and added file as modified (issue4458)
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 23037
diff changeset
683 R b
2963d5c9d90b rename: properly report removed and added file as modified (issue4458)
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 23037
diff changeset
684
29000
2d3837a4bded log: fix status template to list copy source per dest (issue5155)
Yuya Nishihara <yuya@tcha.org>
parents: 27749
diff changeset
685 using log status template, the copy information is displayed correctly.
2d3837a4bded log: fix status template to list copy source per dest (issue5155)
Yuya Nishihara <yuya@tcha.org>
parents: 27749
diff changeset
686 $ hg log -Tstatus -r. -C
2d3837a4bded log: fix status template to list copy source per dest (issue5155)
Yuya Nishihara <yuya@tcha.org>
parents: 27749
diff changeset
687 changeset: 1:6685fde43d21
2d3837a4bded log: fix status template to list copy source per dest (issue5155)
Yuya Nishihara <yuya@tcha.org>
parents: 27749
diff changeset
688 tag: tip
2d3837a4bded log: fix status template to list copy source per dest (issue5155)
Yuya Nishihara <yuya@tcha.org>
parents: 27749
diff changeset
689 user: test
2d3837a4bded log: fix status template to list copy source per dest (issue5155)
Yuya Nishihara <yuya@tcha.org>
parents: 27749
diff changeset
690 date: * (glob)
2d3837a4bded log: fix status template to list copy source per dest (issue5155)
Yuya Nishihara <yuya@tcha.org>
parents: 27749
diff changeset
691 summary: blah
2d3837a4bded log: fix status template to list copy source per dest (issue5155)
Yuya Nishihara <yuya@tcha.org>
parents: 27749
diff changeset
692 files:
2d3837a4bded log: fix status template to list copy source per dest (issue5155)
Yuya Nishihara <yuya@tcha.org>
parents: 27749
diff changeset
693 M a
2d3837a4bded log: fix status template to list copy source per dest (issue5155)
Yuya Nishihara <yuya@tcha.org>
parents: 27749
diff changeset
694 b
2d3837a4bded log: fix status template to list copy source per dest (issue5155)
Yuya Nishihara <yuya@tcha.org>
parents: 27749
diff changeset
695 R b
2d3837a4bded log: fix status template to list copy source per dest (issue5155)
Yuya Nishihara <yuya@tcha.org>
parents: 27749
diff changeset
696
2d3837a4bded log: fix status template to list copy source per dest (issue5155)
Yuya Nishihara <yuya@tcha.org>
parents: 27749
diff changeset
697
23402
2963d5c9d90b rename: properly report removed and added file as modified (issue4458)
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 23037
diff changeset
698 $ cd ..
44748
a467416c493c rust-status: check for '.hg' regardless of file type (issue6300)
Raphaël Gomès <rgomes@octobus.net>
parents: 43861
diff changeset
699
a467416c493c rust-status: check for '.hg' regardless of file type (issue6300)
Raphaël Gomès <rgomes@octobus.net>
parents: 43861
diff changeset
700 Make sure .hg doesn't show up even as a symlink
a467416c493c rust-status: check for '.hg' regardless of file type (issue6300)
Raphaël Gomès <rgomes@octobus.net>
parents: 43861
diff changeset
701
a467416c493c rust-status: check for '.hg' regardless of file type (issue6300)
Raphaël Gomès <rgomes@octobus.net>
parents: 43861
diff changeset
702 $ hg init repo0
a467416c493c rust-status: check for '.hg' regardless of file type (issue6300)
Raphaël Gomès <rgomes@octobus.net>
parents: 43861
diff changeset
703 $ mkdir symlink-repo0
a467416c493c rust-status: check for '.hg' regardless of file type (issue6300)
Raphaël Gomès <rgomes@octobus.net>
parents: 43861
diff changeset
704 $ cd symlink-repo0
a467416c493c rust-status: check for '.hg' regardless of file type (issue6300)
Raphaël Gomès <rgomes@octobus.net>
parents: 43861
diff changeset
705 $ ln -s ../repo0/.hg
a467416c493c rust-status: check for '.hg' regardless of file type (issue6300)
Raphaël Gomès <rgomes@octobus.net>
parents: 43861
diff changeset
706 $ hg status
46488
40c8ae49561d status: add test that shows that the Rust implementation has a bug
Raphaël Gomès <rgomes@octobus.net>
parents: 44748
diff changeset
707
47132
65e6970042c5 status: Add tests for some more edge cases
Simon Sapin <simon.sapin@octobus.net>
parents: 47131
diff changeset
708 If the size hasn’t changed but mtime has, status needs to read the contents
65e6970042c5 status: Add tests for some more edge cases
Simon Sapin <simon.sapin@octobus.net>
parents: 47131
diff changeset
709 of the file to check whether it has changed
65e6970042c5 status: Add tests for some more edge cases
Simon Sapin <simon.sapin@octobus.net>
parents: 47131
diff changeset
710
65e6970042c5 status: Add tests for some more edge cases
Simon Sapin <simon.sapin@octobus.net>
parents: 47131
diff changeset
711 $ echo 1 > a
65e6970042c5 status: Add tests for some more edge cases
Simon Sapin <simon.sapin@octobus.net>
parents: 47131
diff changeset
712 $ echo 1 > b
65e6970042c5 status: Add tests for some more edge cases
Simon Sapin <simon.sapin@octobus.net>
parents: 47131
diff changeset
713 $ touch -t 200102030000 a b
65e6970042c5 status: Add tests for some more edge cases
Simon Sapin <simon.sapin@octobus.net>
parents: 47131
diff changeset
714 $ hg commit -Aqm '#0'
65e6970042c5 status: Add tests for some more edge cases
Simon Sapin <simon.sapin@octobus.net>
parents: 47131
diff changeset
715 $ echo 2 > a
65e6970042c5 status: Add tests for some more edge cases
Simon Sapin <simon.sapin@octobus.net>
parents: 47131
diff changeset
716 $ touch -t 200102040000 a b
65e6970042c5 status: Add tests for some more edge cases
Simon Sapin <simon.sapin@octobus.net>
parents: 47131
diff changeset
717 $ hg status
65e6970042c5 status: Add tests for some more edge cases
Simon Sapin <simon.sapin@octobus.net>
parents: 47131
diff changeset
718 M a
65e6970042c5 status: Add tests for some more edge cases
Simon Sapin <simon.sapin@octobus.net>
parents: 47131
diff changeset
719
65e6970042c5 status: Add tests for some more edge cases
Simon Sapin <simon.sapin@octobus.net>
parents: 47131
diff changeset
720 Asking specifically for the status of a deleted/removed file
65e6970042c5 status: Add tests for some more edge cases
Simon Sapin <simon.sapin@octobus.net>
parents: 47131
diff changeset
721
65e6970042c5 status: Add tests for some more edge cases
Simon Sapin <simon.sapin@octobus.net>
parents: 47131
diff changeset
722 $ rm a
65e6970042c5 status: Add tests for some more edge cases
Simon Sapin <simon.sapin@octobus.net>
parents: 47131
diff changeset
723 $ rm b
65e6970042c5 status: Add tests for some more edge cases
Simon Sapin <simon.sapin@octobus.net>
parents: 47131
diff changeset
724 $ hg status a
65e6970042c5 status: Add tests for some more edge cases
Simon Sapin <simon.sapin@octobus.net>
parents: 47131
diff changeset
725 ! a
65e6970042c5 status: Add tests for some more edge cases
Simon Sapin <simon.sapin@octobus.net>
parents: 47131
diff changeset
726 $ hg rm a
65e6970042c5 status: Add tests for some more edge cases
Simon Sapin <simon.sapin@octobus.net>
parents: 47131
diff changeset
727 $ hg rm b
65e6970042c5 status: Add tests for some more edge cases
Simon Sapin <simon.sapin@octobus.net>
parents: 47131
diff changeset
728 $ hg status a
65e6970042c5 status: Add tests for some more edge cases
Simon Sapin <simon.sapin@octobus.net>
parents: 47131
diff changeset
729 R a
47193
47ccab19bf9f dirstate-tree: Remove newly-empty nodes after removing a `DirstateEntry`
Simon Sapin <simon.sapin@octobus.net>
parents: 47180
diff changeset
730 $ hg commit -qm '#1'
47ccab19bf9f dirstate-tree: Remove newly-empty nodes after removing a `DirstateEntry`
Simon Sapin <simon.sapin@octobus.net>
parents: 47180
diff changeset
731 $ hg status a
47ccab19bf9f dirstate-tree: Remove newly-empty nodes after removing a `DirstateEntry`
Simon Sapin <simon.sapin@octobus.net>
parents: 47180
diff changeset
732 a: $ENOENT$
47132
65e6970042c5 status: Add tests for some more edge cases
Simon Sapin <simon.sapin@octobus.net>
parents: 47131
diff changeset
733
46488
40c8ae49561d status: add test that shows that the Rust implementation has a bug
Raphaël Gomès <rgomes@octobus.net>
parents: 44748
diff changeset
734 Check using include flag with pattern when status does not need to traverse
40c8ae49561d status: add test that shows that the Rust implementation has a bug
Raphaël Gomès <rgomes@octobus.net>
parents: 44748
diff changeset
735 the working directory (issue6483)
40c8ae49561d status: add test that shows that the Rust implementation has a bug
Raphaël Gomès <rgomes@octobus.net>
parents: 44748
diff changeset
736
40c8ae49561d status: add test that shows that the Rust implementation has a bug
Raphaël Gomès <rgomes@octobus.net>
parents: 44748
diff changeset
737 $ cd ..
40c8ae49561d status: add test that shows that the Rust implementation has a bug
Raphaël Gomès <rgomes@octobus.net>
parents: 44748
diff changeset
738 $ hg init issue6483
40c8ae49561d status: add test that shows that the Rust implementation has a bug
Raphaël Gomès <rgomes@octobus.net>
parents: 44748
diff changeset
739 $ cd issue6483
40c8ae49561d status: add test that shows that the Rust implementation has a bug
Raphaël Gomès <rgomes@octobus.net>
parents: 44748
diff changeset
740 $ touch a.py b.rs
40c8ae49561d status: add test that shows that the Rust implementation has a bug
Raphaël Gomès <rgomes@octobus.net>
parents: 44748
diff changeset
741 $ hg add a.py b.rs
40c8ae49561d status: add test that shows that the Rust implementation has a bug
Raphaël Gomès <rgomes@octobus.net>
parents: 44748
diff changeset
742 $ hg st -aI "*.py"
40c8ae49561d status: add test that shows that the Rust implementation has a bug
Raphaël Gomès <rgomes@octobus.net>
parents: 44748
diff changeset
743 A a.py
47316
c365850b6114 rust-status: highlight a bug in Rust-augmented status
Raphaël Gomès <rgomes@octobus.net>
parents: 46489
diff changeset
744
47131
46c6be5f1efa status: Extend issue 6483 test to exclude patterns
Simon Sapin <simon.sapin@octobus.net>
parents: 47130
diff changeset
745 Also check exclude pattern
46c6be5f1efa status: Extend issue 6483 test to exclude patterns
Simon Sapin <simon.sapin@octobus.net>
parents: 47130
diff changeset
746
46c6be5f1efa status: Extend issue 6483 test to exclude patterns
Simon Sapin <simon.sapin@octobus.net>
parents: 47130
diff changeset
747 $ hg st -aX "*.rs"
46c6be5f1efa status: Extend issue 6483 test to exclude patterns
Simon Sapin <simon.sapin@octobus.net>
parents: 47130
diff changeset
748 A a.py
46c6be5f1efa status: Extend issue 6483 test to exclude patterns
Simon Sapin <simon.sapin@octobus.net>
parents: 47130
diff changeset
749
47130
cfbbafb04037 dirstate-tree: Add a test showing that issue 6335 is fixed
Simon Sapin <simon.sapin@octobus.net>
parents: 47129
diff changeset
750 issue6335
cfbbafb04037 dirstate-tree: Add a test showing that issue 6335 is fixed
Simon Sapin <simon.sapin@octobus.net>
parents: 47129
diff changeset
751 When a directory containing a tracked file gets symlinked, as of 5.8
cfbbafb04037 dirstate-tree: Add a test showing that issue 6335 is fixed
Simon Sapin <simon.sapin@octobus.net>
parents: 47129
diff changeset
752 `hg st` only gives the correct answer about clean (or deleted) files
cfbbafb04037 dirstate-tree: Add a test showing that issue 6335 is fixed
Simon Sapin <simon.sapin@octobus.net>
parents: 47129
diff changeset
753 if also listing unknowns.
cfbbafb04037 dirstate-tree: Add a test showing that issue 6335 is fixed
Simon Sapin <simon.sapin@octobus.net>
parents: 47129
diff changeset
754 The tree-based dirstate and status algorithm fix this:
cfbbafb04037 dirstate-tree: Add a test showing that issue 6335 is fixed
Simon Sapin <simon.sapin@octobus.net>
parents: 47129
diff changeset
755
48223
b4f83c9e7905 dirstate-v2: Add support when Rust is not enabled
Simon Sapin <simon.sapin@octobus.net>
parents: 48068
diff changeset
756 #if symlink no-dirstate-v1 rust
47130
cfbbafb04037 dirstate-tree: Add a test showing that issue 6335 is fixed
Simon Sapin <simon.sapin@octobus.net>
parents: 47129
diff changeset
757
cfbbafb04037 dirstate-tree: Add a test showing that issue 6335 is fixed
Simon Sapin <simon.sapin@octobus.net>
parents: 47129
diff changeset
758 $ cd ..
cfbbafb04037 dirstate-tree: Add a test showing that issue 6335 is fixed
Simon Sapin <simon.sapin@octobus.net>
parents: 47129
diff changeset
759 $ hg init issue6335
cfbbafb04037 dirstate-tree: Add a test showing that issue 6335 is fixed
Simon Sapin <simon.sapin@octobus.net>
parents: 47129
diff changeset
760 $ cd issue6335
cfbbafb04037 dirstate-tree: Add a test showing that issue 6335 is fixed
Simon Sapin <simon.sapin@octobus.net>
parents: 47129
diff changeset
761 $ mkdir foo
cfbbafb04037 dirstate-tree: Add a test showing that issue 6335 is fixed
Simon Sapin <simon.sapin@octobus.net>
parents: 47129
diff changeset
762 $ touch foo/a
cfbbafb04037 dirstate-tree: Add a test showing that issue 6335 is fixed
Simon Sapin <simon.sapin@octobus.net>
parents: 47129
diff changeset
763 $ hg ci -Ama
cfbbafb04037 dirstate-tree: Add a test showing that issue 6335 is fixed
Simon Sapin <simon.sapin@octobus.net>
parents: 47129
diff changeset
764 adding foo/a
cfbbafb04037 dirstate-tree: Add a test showing that issue 6335 is fixed
Simon Sapin <simon.sapin@octobus.net>
parents: 47129
diff changeset
765 $ mv foo bar
cfbbafb04037 dirstate-tree: Add a test showing that issue 6335 is fixed
Simon Sapin <simon.sapin@octobus.net>
parents: 47129
diff changeset
766 $ ln -s bar foo
cfbbafb04037 dirstate-tree: Add a test showing that issue 6335 is fixed
Simon Sapin <simon.sapin@octobus.net>
parents: 47129
diff changeset
767 $ hg status
cfbbafb04037 dirstate-tree: Add a test showing that issue 6335 is fixed
Simon Sapin <simon.sapin@octobus.net>
parents: 47129
diff changeset
768 ! foo/a
cfbbafb04037 dirstate-tree: Add a test showing that issue 6335 is fixed
Simon Sapin <simon.sapin@octobus.net>
parents: 47129
diff changeset
769 ? bar/a
cfbbafb04037 dirstate-tree: Add a test showing that issue 6335 is fixed
Simon Sapin <simon.sapin@octobus.net>
parents: 47129
diff changeset
770 ? foo
cfbbafb04037 dirstate-tree: Add a test showing that issue 6335 is fixed
Simon Sapin <simon.sapin@octobus.net>
parents: 47129
diff changeset
771
48223
b4f83c9e7905 dirstate-v2: Add support when Rust is not enabled
Simon Sapin <simon.sapin@octobus.net>
parents: 48068
diff changeset
772 $ hg status -c # incorrect output without the Rust implementation
47130
cfbbafb04037 dirstate-tree: Add a test showing that issue 6335 is fixed
Simon Sapin <simon.sapin@octobus.net>
parents: 47129
diff changeset
773 $ hg status -cu
cfbbafb04037 dirstate-tree: Add a test showing that issue 6335 is fixed
Simon Sapin <simon.sapin@octobus.net>
parents: 47129
diff changeset
774 ? bar/a
cfbbafb04037 dirstate-tree: Add a test showing that issue 6335 is fixed
Simon Sapin <simon.sapin@octobus.net>
parents: 47129
diff changeset
775 ? foo
48223
b4f83c9e7905 dirstate-v2: Add support when Rust is not enabled
Simon Sapin <simon.sapin@octobus.net>
parents: 48068
diff changeset
776 $ hg status -d # incorrect output without the Rust implementation
47130
cfbbafb04037 dirstate-tree: Add a test showing that issue 6335 is fixed
Simon Sapin <simon.sapin@octobus.net>
parents: 47129
diff changeset
777 ! foo/a
cfbbafb04037 dirstate-tree: Add a test showing that issue 6335 is fixed
Simon Sapin <simon.sapin@octobus.net>
parents: 47129
diff changeset
778 $ hg status -du
cfbbafb04037 dirstate-tree: Add a test showing that issue 6335 is fixed
Simon Sapin <simon.sapin@octobus.net>
parents: 47129
diff changeset
779 ! foo/a
cfbbafb04037 dirstate-tree: Add a test showing that issue 6335 is fixed
Simon Sapin <simon.sapin@octobus.net>
parents: 47129
diff changeset
780 ? bar/a
cfbbafb04037 dirstate-tree: Add a test showing that issue 6335 is fixed
Simon Sapin <simon.sapin@octobus.net>
parents: 47129
diff changeset
781 ? foo
cfbbafb04037 dirstate-tree: Add a test showing that issue 6335 is fixed
Simon Sapin <simon.sapin@octobus.net>
parents: 47129
diff changeset
782
cfbbafb04037 dirstate-tree: Add a test showing that issue 6335 is fixed
Simon Sapin <simon.sapin@octobus.net>
parents: 47129
diff changeset
783 #endif
47180
df2bf38ac382 status: Add some more tests
Simon Sapin <simon.sapin@octobus.net>
parents: 47132
diff changeset
784
df2bf38ac382 status: Add some more tests
Simon Sapin <simon.sapin@octobus.net>
parents: 47132
diff changeset
785
df2bf38ac382 status: Add some more tests
Simon Sapin <simon.sapin@octobus.net>
parents: 47132
diff changeset
786 Create a repo with files in each possible status
df2bf38ac382 status: Add some more tests
Simon Sapin <simon.sapin@octobus.net>
parents: 47132
diff changeset
787
df2bf38ac382 status: Add some more tests
Simon Sapin <simon.sapin@octobus.net>
parents: 47132
diff changeset
788 $ cd ..
df2bf38ac382 status: Add some more tests
Simon Sapin <simon.sapin@octobus.net>
parents: 47132
diff changeset
789 $ hg init repo7
df2bf38ac382 status: Add some more tests
Simon Sapin <simon.sapin@octobus.net>
parents: 47132
diff changeset
790 $ cd repo7
df2bf38ac382 status: Add some more tests
Simon Sapin <simon.sapin@octobus.net>
parents: 47132
diff changeset
791 $ mkdir subdir
df2bf38ac382 status: Add some more tests
Simon Sapin <simon.sapin@octobus.net>
parents: 47132
diff changeset
792 $ touch clean modified deleted removed
df2bf38ac382 status: Add some more tests
Simon Sapin <simon.sapin@octobus.net>
parents: 47132
diff changeset
793 $ touch subdir/clean subdir/modified subdir/deleted subdir/removed
df2bf38ac382 status: Add some more tests
Simon Sapin <simon.sapin@octobus.net>
parents: 47132
diff changeset
794 $ echo ignored > .hgignore
df2bf38ac382 status: Add some more tests
Simon Sapin <simon.sapin@octobus.net>
parents: 47132
diff changeset
795 $ hg ci -Aqm '#0'
df2bf38ac382 status: Add some more tests
Simon Sapin <simon.sapin@octobus.net>
parents: 47132
diff changeset
796 $ echo 1 > modified
df2bf38ac382 status: Add some more tests
Simon Sapin <simon.sapin@octobus.net>
parents: 47132
diff changeset
797 $ echo 1 > subdir/modified
df2bf38ac382 status: Add some more tests
Simon Sapin <simon.sapin@octobus.net>
parents: 47132
diff changeset
798 $ rm deleted
df2bf38ac382 status: Add some more tests
Simon Sapin <simon.sapin@octobus.net>
parents: 47132
diff changeset
799 $ rm subdir/deleted
df2bf38ac382 status: Add some more tests
Simon Sapin <simon.sapin@octobus.net>
parents: 47132
diff changeset
800 $ hg rm removed
df2bf38ac382 status: Add some more tests
Simon Sapin <simon.sapin@octobus.net>
parents: 47132
diff changeset
801 $ hg rm subdir/removed
df2bf38ac382 status: Add some more tests
Simon Sapin <simon.sapin@octobus.net>
parents: 47132
diff changeset
802 $ touch unknown ignored
df2bf38ac382 status: Add some more tests
Simon Sapin <simon.sapin@octobus.net>
parents: 47132
diff changeset
803 $ touch subdir/unknown subdir/ignored
df2bf38ac382 status: Add some more tests
Simon Sapin <simon.sapin@octobus.net>
parents: 47132
diff changeset
804
df2bf38ac382 status: Add some more tests
Simon Sapin <simon.sapin@octobus.net>
parents: 47132
diff changeset
805 Check the output
df2bf38ac382 status: Add some more tests
Simon Sapin <simon.sapin@octobus.net>
parents: 47132
diff changeset
806
df2bf38ac382 status: Add some more tests
Simon Sapin <simon.sapin@octobus.net>
parents: 47132
diff changeset
807 $ hg status
df2bf38ac382 status: Add some more tests
Simon Sapin <simon.sapin@octobus.net>
parents: 47132
diff changeset
808 M modified
df2bf38ac382 status: Add some more tests
Simon Sapin <simon.sapin@octobus.net>
parents: 47132
diff changeset
809 M subdir/modified
df2bf38ac382 status: Add some more tests
Simon Sapin <simon.sapin@octobus.net>
parents: 47132
diff changeset
810 R removed
df2bf38ac382 status: Add some more tests
Simon Sapin <simon.sapin@octobus.net>
parents: 47132
diff changeset
811 R subdir/removed
df2bf38ac382 status: Add some more tests
Simon Sapin <simon.sapin@octobus.net>
parents: 47132
diff changeset
812 ! deleted
df2bf38ac382 status: Add some more tests
Simon Sapin <simon.sapin@octobus.net>
parents: 47132
diff changeset
813 ! subdir/deleted
df2bf38ac382 status: Add some more tests
Simon Sapin <simon.sapin@octobus.net>
parents: 47132
diff changeset
814 ? subdir/unknown
df2bf38ac382 status: Add some more tests
Simon Sapin <simon.sapin@octobus.net>
parents: 47132
diff changeset
815 ? unknown
df2bf38ac382 status: Add some more tests
Simon Sapin <simon.sapin@octobus.net>
parents: 47132
diff changeset
816
df2bf38ac382 status: Add some more tests
Simon Sapin <simon.sapin@octobus.net>
parents: 47132
diff changeset
817 $ hg status -mard
df2bf38ac382 status: Add some more tests
Simon Sapin <simon.sapin@octobus.net>
parents: 47132
diff changeset
818 M modified
df2bf38ac382 status: Add some more tests
Simon Sapin <simon.sapin@octobus.net>
parents: 47132
diff changeset
819 M subdir/modified
df2bf38ac382 status: Add some more tests
Simon Sapin <simon.sapin@octobus.net>
parents: 47132
diff changeset
820 R removed
df2bf38ac382 status: Add some more tests
Simon Sapin <simon.sapin@octobus.net>
parents: 47132
diff changeset
821 R subdir/removed
df2bf38ac382 status: Add some more tests
Simon Sapin <simon.sapin@octobus.net>
parents: 47132
diff changeset
822 ! deleted
df2bf38ac382 status: Add some more tests
Simon Sapin <simon.sapin@octobus.net>
parents: 47132
diff changeset
823 ! subdir/deleted
df2bf38ac382 status: Add some more tests
Simon Sapin <simon.sapin@octobus.net>
parents: 47132
diff changeset
824
df2bf38ac382 status: Add some more tests
Simon Sapin <simon.sapin@octobus.net>
parents: 47132
diff changeset
825 $ hg status -A
df2bf38ac382 status: Add some more tests
Simon Sapin <simon.sapin@octobus.net>
parents: 47132
diff changeset
826 M modified
df2bf38ac382 status: Add some more tests
Simon Sapin <simon.sapin@octobus.net>
parents: 47132
diff changeset
827 M subdir/modified
df2bf38ac382 status: Add some more tests
Simon Sapin <simon.sapin@octobus.net>
parents: 47132
diff changeset
828 R removed
df2bf38ac382 status: Add some more tests
Simon Sapin <simon.sapin@octobus.net>
parents: 47132
diff changeset
829 R subdir/removed
df2bf38ac382 status: Add some more tests
Simon Sapin <simon.sapin@octobus.net>
parents: 47132
diff changeset
830 ! deleted
df2bf38ac382 status: Add some more tests
Simon Sapin <simon.sapin@octobus.net>
parents: 47132
diff changeset
831 ! subdir/deleted
df2bf38ac382 status: Add some more tests
Simon Sapin <simon.sapin@octobus.net>
parents: 47132
diff changeset
832 ? subdir/unknown
df2bf38ac382 status: Add some more tests
Simon Sapin <simon.sapin@octobus.net>
parents: 47132
diff changeset
833 ? unknown
df2bf38ac382 status: Add some more tests
Simon Sapin <simon.sapin@octobus.net>
parents: 47132
diff changeset
834 I ignored
df2bf38ac382 status: Add some more tests
Simon Sapin <simon.sapin@octobus.net>
parents: 47132
diff changeset
835 I subdir/ignored
df2bf38ac382 status: Add some more tests
Simon Sapin <simon.sapin@octobus.net>
parents: 47132
diff changeset
836 C .hgignore
df2bf38ac382 status: Add some more tests
Simon Sapin <simon.sapin@octobus.net>
parents: 47132
diff changeset
837 C clean
df2bf38ac382 status: Add some more tests
Simon Sapin <simon.sapin@octobus.net>
parents: 47132
diff changeset
838 C subdir/clean
df2bf38ac382 status: Add some more tests
Simon Sapin <simon.sapin@octobus.net>
parents: 47132
diff changeset
839
df2bf38ac382 status: Add some more tests
Simon Sapin <simon.sapin@octobus.net>
parents: 47132
diff changeset
840 Note: `hg status some-name` creates a patternmatcher which is not supported
df2bf38ac382 status: Add some more tests
Simon Sapin <simon.sapin@octobus.net>
parents: 47132
diff changeset
841 yet by the Rust implementation of status, but includematcher is supported.
df2bf38ac382 status: Add some more tests
Simon Sapin <simon.sapin@octobus.net>
parents: 47132
diff changeset
842 --include is used below for that reason
df2bf38ac382 status: Add some more tests
Simon Sapin <simon.sapin@octobus.net>
parents: 47132
diff changeset
843
47346
5e12b6bfdd3e dirstate-tree: Fix status algorithm with unreadable directory
Simon Sapin <simon.sapin@octobus.net>
parents: 47329
diff changeset
844 #if unix-permissions
5e12b6bfdd3e dirstate-tree: Fix status algorithm with unreadable directory
Simon Sapin <simon.sapin@octobus.net>
parents: 47329
diff changeset
845
5e12b6bfdd3e dirstate-tree: Fix status algorithm with unreadable directory
Simon Sapin <simon.sapin@octobus.net>
parents: 47329
diff changeset
846 Not having permission to read a directory that contains tracked files makes
5e12b6bfdd3e dirstate-tree: Fix status algorithm with unreadable directory
Simon Sapin <simon.sapin@octobus.net>
parents: 47329
diff changeset
847 status emit a warning then behave as if the directory was empty or removed
5e12b6bfdd3e dirstate-tree: Fix status algorithm with unreadable directory
Simon Sapin <simon.sapin@octobus.net>
parents: 47329
diff changeset
848 entirely:
5e12b6bfdd3e dirstate-tree: Fix status algorithm with unreadable directory
Simon Sapin <simon.sapin@octobus.net>
parents: 47329
diff changeset
849
5e12b6bfdd3e dirstate-tree: Fix status algorithm with unreadable directory
Simon Sapin <simon.sapin@octobus.net>
parents: 47329
diff changeset
850 $ chmod 0 subdir
5e12b6bfdd3e dirstate-tree: Fix status algorithm with unreadable directory
Simon Sapin <simon.sapin@octobus.net>
parents: 47329
diff changeset
851 $ hg status --include subdir
50292
adecb1ab4a0d tests: add a rewriting step to detect EACCES errors
Arseniy Alekseyev <aalekseyev@janestreet.com>
parents: 49616
diff changeset
852 subdir: $EACCES$
47346
5e12b6bfdd3e dirstate-tree: Fix status algorithm with unreadable directory
Simon Sapin <simon.sapin@octobus.net>
parents: 47329
diff changeset
853 R subdir/removed
5e12b6bfdd3e dirstate-tree: Fix status algorithm with unreadable directory
Simon Sapin <simon.sapin@octobus.net>
parents: 47329
diff changeset
854 ! subdir/clean
5e12b6bfdd3e dirstate-tree: Fix status algorithm with unreadable directory
Simon Sapin <simon.sapin@octobus.net>
parents: 47329
diff changeset
855 ! subdir/deleted
5e12b6bfdd3e dirstate-tree: Fix status algorithm with unreadable directory
Simon Sapin <simon.sapin@octobus.net>
parents: 47329
diff changeset
856 ! subdir/modified
5e12b6bfdd3e dirstate-tree: Fix status algorithm with unreadable directory
Simon Sapin <simon.sapin@octobus.net>
parents: 47329
diff changeset
857 $ chmod 755 subdir
5e12b6bfdd3e dirstate-tree: Fix status algorithm with unreadable directory
Simon Sapin <simon.sapin@octobus.net>
parents: 47329
diff changeset
858
5e12b6bfdd3e dirstate-tree: Fix status algorithm with unreadable directory
Simon Sapin <simon.sapin@octobus.net>
parents: 47329
diff changeset
859 #endif
5e12b6bfdd3e dirstate-tree: Fix status algorithm with unreadable directory
Simon Sapin <simon.sapin@octobus.net>
parents: 47329
diff changeset
860
47180
df2bf38ac382 status: Add some more tests
Simon Sapin <simon.sapin@octobus.net>
parents: 47132
diff changeset
861 Remove a directory that contains tracked files
df2bf38ac382 status: Add some more tests
Simon Sapin <simon.sapin@octobus.net>
parents: 47132
diff changeset
862
df2bf38ac382 status: Add some more tests
Simon Sapin <simon.sapin@octobus.net>
parents: 47132
diff changeset
863 $ rm -r subdir
df2bf38ac382 status: Add some more tests
Simon Sapin <simon.sapin@octobus.net>
parents: 47132
diff changeset
864 $ hg status --include subdir
df2bf38ac382 status: Add some more tests
Simon Sapin <simon.sapin@octobus.net>
parents: 47132
diff changeset
865 R subdir/removed
df2bf38ac382 status: Add some more tests
Simon Sapin <simon.sapin@octobus.net>
parents: 47132
diff changeset
866 ! subdir/clean
df2bf38ac382 status: Add some more tests
Simon Sapin <simon.sapin@octobus.net>
parents: 47132
diff changeset
867 ! subdir/deleted
df2bf38ac382 status: Add some more tests
Simon Sapin <simon.sapin@octobus.net>
parents: 47132
diff changeset
868 ! subdir/modified
df2bf38ac382 status: Add some more tests
Simon Sapin <simon.sapin@octobus.net>
parents: 47132
diff changeset
869
df2bf38ac382 status: Add some more tests
Simon Sapin <simon.sapin@octobus.net>
parents: 47132
diff changeset
870 … and replace it by a file
df2bf38ac382 status: Add some more tests
Simon Sapin <simon.sapin@octobus.net>
parents: 47132
diff changeset
871
df2bf38ac382 status: Add some more tests
Simon Sapin <simon.sapin@octobus.net>
parents: 47132
diff changeset
872 $ touch subdir
df2bf38ac382 status: Add some more tests
Simon Sapin <simon.sapin@octobus.net>
parents: 47132
diff changeset
873 $ hg status --include subdir
df2bf38ac382 status: Add some more tests
Simon Sapin <simon.sapin@octobus.net>
parents: 47132
diff changeset
874 R subdir/removed
df2bf38ac382 status: Add some more tests
Simon Sapin <simon.sapin@octobus.net>
parents: 47132
diff changeset
875 ! subdir/clean
df2bf38ac382 status: Add some more tests
Simon Sapin <simon.sapin@octobus.net>
parents: 47132
diff changeset
876 ! subdir/deleted
df2bf38ac382 status: Add some more tests
Simon Sapin <simon.sapin@octobus.net>
parents: 47132
diff changeset
877 ! subdir/modified
df2bf38ac382 status: Add some more tests
Simon Sapin <simon.sapin@octobus.net>
parents: 47132
diff changeset
878 ? subdir
df2bf38ac382 status: Add some more tests
Simon Sapin <simon.sapin@octobus.net>
parents: 47132
diff changeset
879
df2bf38ac382 status: Add some more tests
Simon Sapin <simon.sapin@octobus.net>
parents: 47132
diff changeset
880 Replaced a deleted or removed file with a directory
df2bf38ac382 status: Add some more tests
Simon Sapin <simon.sapin@octobus.net>
parents: 47132
diff changeset
881
df2bf38ac382 status: Add some more tests
Simon Sapin <simon.sapin@octobus.net>
parents: 47132
diff changeset
882 $ mkdir deleted removed
df2bf38ac382 status: Add some more tests
Simon Sapin <simon.sapin@octobus.net>
parents: 47132
diff changeset
883 $ touch deleted/1 removed/1
df2bf38ac382 status: Add some more tests
Simon Sapin <simon.sapin@octobus.net>
parents: 47132
diff changeset
884 $ hg status --include deleted --include removed
df2bf38ac382 status: Add some more tests
Simon Sapin <simon.sapin@octobus.net>
parents: 47132
diff changeset
885 R removed
df2bf38ac382 status: Add some more tests
Simon Sapin <simon.sapin@octobus.net>
parents: 47132
diff changeset
886 ! deleted
df2bf38ac382 status: Add some more tests
Simon Sapin <simon.sapin@octobus.net>
parents: 47132
diff changeset
887 ? deleted/1
df2bf38ac382 status: Add some more tests
Simon Sapin <simon.sapin@octobus.net>
parents: 47132
diff changeset
888 ? removed/1
df2bf38ac382 status: Add some more tests
Simon Sapin <simon.sapin@octobus.net>
parents: 47132
diff changeset
889 $ hg add removed/1
df2bf38ac382 status: Add some more tests
Simon Sapin <simon.sapin@octobus.net>
parents: 47132
diff changeset
890 $ hg status --include deleted --include removed
df2bf38ac382 status: Add some more tests
Simon Sapin <simon.sapin@octobus.net>
parents: 47132
diff changeset
891 A removed/1
df2bf38ac382 status: Add some more tests
Simon Sapin <simon.sapin@octobus.net>
parents: 47132
diff changeset
892 R removed
df2bf38ac382 status: Add some more tests
Simon Sapin <simon.sapin@octobus.net>
parents: 47132
diff changeset
893 ! deleted
df2bf38ac382 status: Add some more tests
Simon Sapin <simon.sapin@octobus.net>
parents: 47132
diff changeset
894 ? deleted/1
df2bf38ac382 status: Add some more tests
Simon Sapin <simon.sapin@octobus.net>
parents: 47132
diff changeset
895
df2bf38ac382 status: Add some more tests
Simon Sapin <simon.sapin@octobus.net>
parents: 47132
diff changeset
896 Deeply nested files in an ignored directory are still listed on request
df2bf38ac382 status: Add some more tests
Simon Sapin <simon.sapin@octobus.net>
parents: 47132
diff changeset
897
df2bf38ac382 status: Add some more tests
Simon Sapin <simon.sapin@octobus.net>
parents: 47132
diff changeset
898 $ echo ignored-dir >> .hgignore
df2bf38ac382 status: Add some more tests
Simon Sapin <simon.sapin@octobus.net>
parents: 47132
diff changeset
899 $ mkdir ignored-dir
df2bf38ac382 status: Add some more tests
Simon Sapin <simon.sapin@octobus.net>
parents: 47132
diff changeset
900 $ mkdir ignored-dir/subdir
df2bf38ac382 status: Add some more tests
Simon Sapin <simon.sapin@octobus.net>
parents: 47132
diff changeset
901 $ touch ignored-dir/subdir/1
df2bf38ac382 status: Add some more tests
Simon Sapin <simon.sapin@octobus.net>
parents: 47132
diff changeset
902 $ hg status --ignored
df2bf38ac382 status: Add some more tests
Simon Sapin <simon.sapin@octobus.net>
parents: 47132
diff changeset
903 I ignored
df2bf38ac382 status: Add some more tests
Simon Sapin <simon.sapin@octobus.net>
parents: 47132
diff changeset
904 I ignored-dir/subdir/1
47329
717a94b423b9 merge with stable
Matt Harbison <matt_harbison@yahoo.com>
parents: 47281 47317
diff changeset
905
47316
c365850b6114 rust-status: highlight a bug in Rust-augmented status
Raphaël Gomès <rgomes@octobus.net>
parents: 46489
diff changeset
906 Check using include flag while listing ignored composes correctly (issue6514)
c365850b6114 rust-status: highlight a bug in Rust-augmented status
Raphaël Gomès <rgomes@octobus.net>
parents: 46489
diff changeset
907
c365850b6114 rust-status: highlight a bug in Rust-augmented status
Raphaël Gomès <rgomes@octobus.net>
parents: 46489
diff changeset
908 $ cd ..
c365850b6114 rust-status: highlight a bug in Rust-augmented status
Raphaël Gomès <rgomes@octobus.net>
parents: 46489
diff changeset
909 $ hg init issue6514
c365850b6114 rust-status: highlight a bug in Rust-augmented status
Raphaël Gomès <rgomes@octobus.net>
parents: 46489
diff changeset
910 $ cd issue6514
c365850b6114 rust-status: highlight a bug in Rust-augmented status
Raphaël Gomès <rgomes@octobus.net>
parents: 46489
diff changeset
911 $ mkdir ignored-folder
c365850b6114 rust-status: highlight a bug in Rust-augmented status
Raphaël Gomès <rgomes@octobus.net>
parents: 46489
diff changeset
912 $ touch A.hs B.hs C.hs ignored-folder/other.txt ignored-folder/ctest.hs
c365850b6114 rust-status: highlight a bug in Rust-augmented status
Raphaël Gomès <rgomes@octobus.net>
parents: 46489
diff changeset
913 $ cat >.hgignore <<EOF
c365850b6114 rust-status: highlight a bug in Rust-augmented status
Raphaël Gomès <rgomes@octobus.net>
parents: 46489
diff changeset
914 > A.hs
c365850b6114 rust-status: highlight a bug in Rust-augmented status
Raphaël Gomès <rgomes@octobus.net>
parents: 46489
diff changeset
915 > B.hs
c365850b6114 rust-status: highlight a bug in Rust-augmented status
Raphaël Gomès <rgomes@octobus.net>
parents: 46489
diff changeset
916 > ignored-folder/
c365850b6114 rust-status: highlight a bug in Rust-augmented status
Raphaël Gomès <rgomes@octobus.net>
parents: 46489
diff changeset
917 > EOF
c365850b6114 rust-status: highlight a bug in Rust-augmented status
Raphaël Gomès <rgomes@octobus.net>
parents: 46489
diff changeset
918 $ hg st -i -I 're:.*\.hs$'
c365850b6114 rust-status: highlight a bug in Rust-augmented status
Raphaël Gomès <rgomes@octobus.net>
parents: 46489
diff changeset
919 I A.hs
c365850b6114 rust-status: highlight a bug in Rust-augmented status
Raphaël Gomès <rgomes@octobus.net>
parents: 46489
diff changeset
920 I B.hs
c365850b6114 rust-status: highlight a bug in Rust-augmented status
Raphaël Gomès <rgomes@octobus.net>
parents: 46489
diff changeset
921 I ignored-folder/ctest.hs
47351
3b9914b28133 dirstate-v2: Add --dirs to debugdirstate command
Simon Sapin <simon.sapin@octobus.net>
parents: 47346
diff changeset
922
48223
b4f83c9e7905 dirstate-v2: Add support when Rust is not enabled
Simon Sapin <simon.sapin@octobus.net>
parents: 48068
diff changeset
923 #if rust dirstate-v2
47351
3b9914b28133 dirstate-v2: Add --dirs to debugdirstate command
Simon Sapin <simon.sapin@octobus.net>
parents: 47346
diff changeset
924
3b9914b28133 dirstate-v2: Add --dirs to debugdirstate command
Simon Sapin <simon.sapin@octobus.net>
parents: 47346
diff changeset
925 Check read_dir caching
3b9914b28133 dirstate-v2: Add --dirs to debugdirstate command
Simon Sapin <simon.sapin@octobus.net>
parents: 47346
diff changeset
926
3b9914b28133 dirstate-v2: Add --dirs to debugdirstate command
Simon Sapin <simon.sapin@octobus.net>
parents: 47346
diff changeset
927 $ cd ..
3b9914b28133 dirstate-v2: Add --dirs to debugdirstate command
Simon Sapin <simon.sapin@octobus.net>
parents: 47346
diff changeset
928 $ hg init repo8
3b9914b28133 dirstate-v2: Add --dirs to debugdirstate command
Simon Sapin <simon.sapin@octobus.net>
parents: 47346
diff changeset
929 $ cd repo8
3b9914b28133 dirstate-v2: Add --dirs to debugdirstate command
Simon Sapin <simon.sapin@octobus.net>
parents: 47346
diff changeset
930 $ mkdir subdir
3b9914b28133 dirstate-v2: Add --dirs to debugdirstate command
Simon Sapin <simon.sapin@octobus.net>
parents: 47346
diff changeset
931 $ touch subdir/a subdir/b
3b9914b28133 dirstate-v2: Add --dirs to debugdirstate command
Simon Sapin <simon.sapin@octobus.net>
parents: 47346
diff changeset
932 $ hg ci -Aqm '#0'
3b9914b28133 dirstate-v2: Add --dirs to debugdirstate command
Simon Sapin <simon.sapin@octobus.net>
parents: 47346
diff changeset
933
3b9914b28133 dirstate-v2: Add --dirs to debugdirstate command
Simon Sapin <simon.sapin@octobus.net>
parents: 47346
diff changeset
934 The cached mtime is initially unset
3b9914b28133 dirstate-v2: Add --dirs to debugdirstate command
Simon Sapin <simon.sapin@octobus.net>
parents: 47346
diff changeset
935
47683
284a20269a97 dirstate-v2: Separate iterators for dirfoldmap and debugdirstate
Simon Sapin <simon.sapin@octobus.net>
parents: 47352
diff changeset
936 $ hg debugdirstate --all --no-dates | grep '^ '
284a20269a97 dirstate-v2: Separate iterators for dirfoldmap and debugdirstate
Simon Sapin <simon.sapin@octobus.net>
parents: 47352
diff changeset
937 0 -1 unset subdir
47351
3b9914b28133 dirstate-v2: Add --dirs to debugdirstate command
Simon Sapin <simon.sapin@octobus.net>
parents: 47346
diff changeset
938
3b9914b28133 dirstate-v2: Add --dirs to debugdirstate command
Simon Sapin <simon.sapin@octobus.net>
parents: 47346
diff changeset
939 It is still not set when there are unknown files
3b9914b28133 dirstate-v2: Add --dirs to debugdirstate command
Simon Sapin <simon.sapin@octobus.net>
parents: 47346
diff changeset
940
3b9914b28133 dirstate-v2: Add --dirs to debugdirstate command
Simon Sapin <simon.sapin@octobus.net>
parents: 47346
diff changeset
941 $ touch subdir/unknown
3b9914b28133 dirstate-v2: Add --dirs to debugdirstate command
Simon Sapin <simon.sapin@octobus.net>
parents: 47346
diff changeset
942 $ hg status
3b9914b28133 dirstate-v2: Add --dirs to debugdirstate command
Simon Sapin <simon.sapin@octobus.net>
parents: 47346
diff changeset
943 ? subdir/unknown
47683
284a20269a97 dirstate-v2: Separate iterators for dirfoldmap and debugdirstate
Simon Sapin <simon.sapin@octobus.net>
parents: 47352
diff changeset
944 $ hg debugdirstate --all --no-dates | grep '^ '
284a20269a97 dirstate-v2: Separate iterators for dirfoldmap and debugdirstate
Simon Sapin <simon.sapin@octobus.net>
parents: 47352
diff changeset
945 0 -1 unset subdir
47351
3b9914b28133 dirstate-v2: Add --dirs to debugdirstate command
Simon Sapin <simon.sapin@octobus.net>
parents: 47346
diff changeset
946
49553
557f7e243ac9 rhg: show a bug where repeated [hg status] is needed to cache everything
Arseniy Alekseyev <aalekseyev@janestreet.com>
parents: 49498
diff changeset
947 Now the directory is eligible for caching, so its mtime is saved in the dirstate
47351
3b9914b28133 dirstate-v2: Add --dirs to debugdirstate command
Simon Sapin <simon.sapin@octobus.net>
parents: 47346
diff changeset
948
3b9914b28133 dirstate-v2: Add --dirs to debugdirstate command
Simon Sapin <simon.sapin@octobus.net>
parents: 47346
diff changeset
949 $ rm subdir/unknown
48455
04d756b7c0b5 tests: add a short `sleep` in test-status.t
Simon Sapin <simon.sapin@octobus.net>
parents: 48454
diff changeset
950 $ sleep 0.1 # ensure the kernel’s internal clock for mtimes has ticked
47351
3b9914b28133 dirstate-v2: Add --dirs to debugdirstate command
Simon Sapin <simon.sapin@octobus.net>
parents: 47346
diff changeset
951 $ hg status
47683
284a20269a97 dirstate-v2: Separate iterators for dirfoldmap and debugdirstate
Simon Sapin <simon.sapin@octobus.net>
parents: 47352
diff changeset
952 $ hg debugdirstate --all --no-dates | grep '^ '
284a20269a97 dirstate-v2: Separate iterators for dirfoldmap and debugdirstate
Simon Sapin <simon.sapin@octobus.net>
parents: 47352
diff changeset
953 0 -1 set subdir
47351
3b9914b28133 dirstate-v2: Add --dirs to debugdirstate command
Simon Sapin <simon.sapin@octobus.net>
parents: 47346
diff changeset
954
3b9914b28133 dirstate-v2: Add --dirs to debugdirstate command
Simon Sapin <simon.sapin@octobus.net>
parents: 47346
diff changeset
955 This time the command should be ever so slightly faster since it does not need `read_dir("subdir")`
3b9914b28133 dirstate-v2: Add --dirs to debugdirstate command
Simon Sapin <simon.sapin@octobus.net>
parents: 47346
diff changeset
956
3b9914b28133 dirstate-v2: Add --dirs to debugdirstate command
Simon Sapin <simon.sapin@octobus.net>
parents: 47346
diff changeset
957 $ hg status
3b9914b28133 dirstate-v2: Add --dirs to debugdirstate command
Simon Sapin <simon.sapin@octobus.net>
parents: 47346
diff changeset
958
3b9914b28133 dirstate-v2: Add --dirs to debugdirstate command
Simon Sapin <simon.sapin@octobus.net>
parents: 47346
diff changeset
959 Creating a new file changes the directory’s mtime, invalidating the cache
3b9914b28133 dirstate-v2: Add --dirs to debugdirstate command
Simon Sapin <simon.sapin@octobus.net>
parents: 47346
diff changeset
960
3b9914b28133 dirstate-v2: Add --dirs to debugdirstate command
Simon Sapin <simon.sapin@octobus.net>
parents: 47346
diff changeset
961 $ touch subdir/unknown
3b9914b28133 dirstate-v2: Add --dirs to debugdirstate command
Simon Sapin <simon.sapin@octobus.net>
parents: 47346
diff changeset
962 $ hg status
3b9914b28133 dirstate-v2: Add --dirs to debugdirstate command
Simon Sapin <simon.sapin@octobus.net>
parents: 47346
diff changeset
963 ? subdir/unknown
3b9914b28133 dirstate-v2: Add --dirs to debugdirstate command
Simon Sapin <simon.sapin@octobus.net>
parents: 47346
diff changeset
964
47352
9d58e54b5966 dirstate-v2: Drop parent directory cache when removing a dirstate node
Simon Sapin <simon.sapin@octobus.net>
parents: 47351
diff changeset
965 $ rm subdir/unknown
9d58e54b5966 dirstate-v2: Drop parent directory cache when removing a dirstate node
Simon Sapin <simon.sapin@octobus.net>
parents: 47351
diff changeset
966 $ hg status
9d58e54b5966 dirstate-v2: Drop parent directory cache when removing a dirstate node
Simon Sapin <simon.sapin@octobus.net>
parents: 47351
diff changeset
967
9d58e54b5966 dirstate-v2: Drop parent directory cache when removing a dirstate node
Simon Sapin <simon.sapin@octobus.net>
parents: 47351
diff changeset
968 Removing a node from the dirstate resets the cache for its parent directory
9d58e54b5966 dirstate-v2: Drop parent directory cache when removing a dirstate node
Simon Sapin <simon.sapin@octobus.net>
parents: 47351
diff changeset
969
9d58e54b5966 dirstate-v2: Drop parent directory cache when removing a dirstate node
Simon Sapin <simon.sapin@octobus.net>
parents: 47351
diff changeset
970 $ hg forget subdir/a
47683
284a20269a97 dirstate-v2: Separate iterators for dirfoldmap and debugdirstate
Simon Sapin <simon.sapin@octobus.net>
parents: 47352
diff changeset
971 $ hg debugdirstate --all --no-dates | grep '^ '
284a20269a97 dirstate-v2: Separate iterators for dirfoldmap and debugdirstate
Simon Sapin <simon.sapin@octobus.net>
parents: 47352
diff changeset
972 0 -1 set subdir
47352
9d58e54b5966 dirstate-v2: Drop parent directory cache when removing a dirstate node
Simon Sapin <simon.sapin@octobus.net>
parents: 47351
diff changeset
973 $ hg ci -qm '#1'
47683
284a20269a97 dirstate-v2: Separate iterators for dirfoldmap and debugdirstate
Simon Sapin <simon.sapin@octobus.net>
parents: 47352
diff changeset
974 $ hg debugdirstate --all --no-dates | grep '^ '
284a20269a97 dirstate-v2: Separate iterators for dirfoldmap and debugdirstate
Simon Sapin <simon.sapin@octobus.net>
parents: 47352
diff changeset
975 0 -1 unset subdir
47352
9d58e54b5966 dirstate-v2: Drop parent directory cache when removing a dirstate node
Simon Sapin <simon.sapin@octobus.net>
parents: 47351
diff changeset
976 $ hg status
9d58e54b5966 dirstate-v2: Drop parent directory cache when removing a dirstate node
Simon Sapin <simon.sapin@octobus.net>
parents: 47351
diff changeset
977 ? subdir/a
9d58e54b5966 dirstate-v2: Drop parent directory cache when removing a dirstate node
Simon Sapin <simon.sapin@octobus.net>
parents: 47351
diff changeset
978
49553
557f7e243ac9 rhg: show a bug where repeated [hg status] is needed to cache everything
Arseniy Alekseyev <aalekseyev@janestreet.com>
parents: 49498
diff changeset
979 Changing the hgignore rules makes us recompute the status (and rewrite the dirstate).
557f7e243ac9 rhg: show a bug where repeated [hg status] is needed to cache everything
Arseniy Alekseyev <aalekseyev@janestreet.com>
parents: 49498
diff changeset
980
557f7e243ac9 rhg: show a bug where repeated [hg status] is needed to cache everything
Arseniy Alekseyev <aalekseyev@janestreet.com>
parents: 49498
diff changeset
981 $ rm subdir/a
557f7e243ac9 rhg: show a bug where repeated [hg status] is needed to cache everything
Arseniy Alekseyev <aalekseyev@janestreet.com>
parents: 49498
diff changeset
982 $ mkdir another-subdir
557f7e243ac9 rhg: show a bug where repeated [hg status] is needed to cache everything
Arseniy Alekseyev <aalekseyev@janestreet.com>
parents: 49498
diff changeset
983 $ touch another-subdir/something-else
557f7e243ac9 rhg: show a bug where repeated [hg status] is needed to cache everything
Arseniy Alekseyev <aalekseyev@janestreet.com>
parents: 49498
diff changeset
984
49616
2af928d69e8e tests: stop creating temporary files in TESTDIR
Arseniy Alekseyev <aalekseyev@janestreet.com>
parents: 49555
diff changeset
985 $ cat > "$TESTTMP"/extra-hgignore <<EOF
49553
557f7e243ac9 rhg: show a bug where repeated [hg status] is needed to cache everything
Arseniy Alekseyev <aalekseyev@janestreet.com>
parents: 49498
diff changeset
986 > something-else
557f7e243ac9 rhg: show a bug where repeated [hg status] is needed to cache everything
Arseniy Alekseyev <aalekseyev@janestreet.com>
parents: 49498
diff changeset
987 > EOF
557f7e243ac9 rhg: show a bug where repeated [hg status] is needed to cache everything
Arseniy Alekseyev <aalekseyev@janestreet.com>
parents: 49498
diff changeset
988
49616
2af928d69e8e tests: stop creating temporary files in TESTDIR
Arseniy Alekseyev <aalekseyev@janestreet.com>
parents: 49555
diff changeset
989 $ hg status --config ui.ignore.global="$TESTTMP"/extra-hgignore
49553
557f7e243ac9 rhg: show a bug where repeated [hg status] is needed to cache everything
Arseniy Alekseyev <aalekseyev@janestreet.com>
parents: 49498
diff changeset
990 $ hg debugdirstate --all --no-dates | grep '^ '
557f7e243ac9 rhg: show a bug where repeated [hg status] is needed to cache everything
Arseniy Alekseyev <aalekseyev@janestreet.com>
parents: 49498
diff changeset
991 0 -1 set subdir
557f7e243ac9 rhg: show a bug where repeated [hg status] is needed to cache everything
Arseniy Alekseyev <aalekseyev@janestreet.com>
parents: 49498
diff changeset
992
557f7e243ac9 rhg: show a bug where repeated [hg status] is needed to cache everything
Arseniy Alekseyev <aalekseyev@janestreet.com>
parents: 49498
diff changeset
993 $ hg status
557f7e243ac9 rhg: show a bug where repeated [hg status] is needed to cache everything
Arseniy Alekseyev <aalekseyev@janestreet.com>
parents: 49498
diff changeset
994 ? another-subdir/something-else
557f7e243ac9 rhg: show a bug where repeated [hg status] is needed to cache everything
Arseniy Alekseyev <aalekseyev@janestreet.com>
parents: 49498
diff changeset
995
49555
8ee3889bab92 rust-status: save new dircache even if just invalidated
Raphaël Gomès <rgomes@octobus.net>
parents: 49553
diff changeset
996 One invocation of status is enough to populate the cache even if it's invalidated
8ee3889bab92 rust-status: save new dircache even if just invalidated
Raphaël Gomès <rgomes@octobus.net>
parents: 49553
diff changeset
997 in the same run.
49553
557f7e243ac9 rhg: show a bug where repeated [hg status] is needed to cache everything
Arseniy Alekseyev <aalekseyev@janestreet.com>
parents: 49498
diff changeset
998
557f7e243ac9 rhg: show a bug where repeated [hg status] is needed to cache everything
Arseniy Alekseyev <aalekseyev@janestreet.com>
parents: 49498
diff changeset
999 $ hg debugdirstate --all --no-dates | grep '^ '
557f7e243ac9 rhg: show a bug where repeated [hg status] is needed to cache everything
Arseniy Alekseyev <aalekseyev@janestreet.com>
parents: 49498
diff changeset
1000 0 -1 set subdir
557f7e243ac9 rhg: show a bug where repeated [hg status] is needed to cache everything
Arseniy Alekseyev <aalekseyev@janestreet.com>
parents: 49498
diff changeset
1001
47351
3b9914b28133 dirstate-v2: Add --dirs to debugdirstate command
Simon Sapin <simon.sapin@octobus.net>
parents: 47346
diff changeset
1002 #endif