annotate tests/test-status.t @ 39561:d06834e0f48e

wireprotov2peer: stream decoded responses Previously, wire protocol version 2 would buffer all response data. Only once all data was received did we CBOR decode it and resolve the future associated with the command. This was obviously not desirable. In future commits that introduce large response payloads, this caused significant memory bloat and slowed down client operations due to waiting on the server. This commit refactors the response handling code so that response data can be streamed. Command response objects now contain a buffered CBOR decoder. As new data arrives, it is fed into the decoder. Decoded objects are made available to the generator as they are decoded. Because there is a separate thread processing incoming frames and feeding data into the response object, there is the potential for race conditions when mutating response objects. So a lock has been added to guard access to critical state variables. Because the generator emitting decoded objects needs to wait on those objects to become available, we've added an Event for the generator to wait on so it doesn't busy loop. This does mean there is the potential for deadlocks. And I'm pretty sure they can occur in some scenarios. We already have a handful of TODOs around this. But I've added some more. Fixing this will likely require moving the background thread receiving frames into clienthandler. We likely would have done this anyway when implementing the client bits for the SSH transport. Test output changes because the initial CBOR map holding the overall response state is now always handled internally by the response object. Differential Revision: https://phab.mercurial-scm.org/D4474
author Gregory Szorc <gregory.szorc@gmail.com>
date Wed, 29 Aug 2018 15:17:11 -0700
parents 46f3ff64bea7
children 1159031ada1e
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
11782
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
1 $ hg init repo1
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
2 $ cd repo1
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
3 $ mkdir a b a/1 b/1 b/2
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
4 $ 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
5
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
6 hg status in repo root:
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
7
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
8 $ hg status
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
9 ? a/1/in_a_1
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
10 ? a/in_a
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
11 ? b/1/in_b_1
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
12 ? b/2/in_b_2
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
13 ? b/in_b
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
14 ? in_root
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
15
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
16 hg status . in repo root:
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
17
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
18 $ hg status .
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
19 ? a/1/in_a_1
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
20 ? a/in_a
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
21 ? b/1/in_b_1
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
22 ? b/2/in_b_2
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
23 ? b/in_b
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
24 ? 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
25
11782
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
26 $ hg status --cwd a
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
27 ? a/1/in_a_1
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
28 ? a/in_a
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
29 ? b/1/in_b_1
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
30 ? b/2/in_b_2
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
31 ? b/in_b
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
32 ? in_root
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
33 $ hg status --cwd a .
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
34 ? 1/in_a_1
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
35 ? in_a
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
36 $ hg status --cwd a ..
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
37 ? 1/in_a_1
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
38 ? in_a
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
39 ? ../b/1/in_b_1
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
40 ? ../b/2/in_b_2
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
41 ? ../b/in_b
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
42 ? ../in_root
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
43
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
44 $ hg status --cwd b
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
45 ? a/1/in_a_1
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
46 ? a/in_a
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
47 ? b/1/in_b_1
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
48 ? b/2/in_b_2
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
49 ? b/in_b
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
50 ? in_root
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
51 $ hg status --cwd b .
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
52 ? 1/in_b_1
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
53 ? 2/in_b_2
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
54 ? in_b
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 ? 1/in_b_1
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
59 ? 2/in_b_2
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
60 ? 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
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
63 $ hg status --cwd a/1
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
64 ? a/1/in_a_1
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
65 ? a/in_a
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
66 ? b/1/in_b_1
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
67 ? b/2/in_b_2
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
68 ? b/in_b
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
69 ? in_root
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
70 $ hg status --cwd a/1 .
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
71 ? in_a_1
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
72 $ hg status --cwd a/1 ..
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
73 ? in_a_1
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
74 ? ../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
75
11782
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
76 $ hg status --cwd b/1
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
77 ? a/1/in_a_1
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
78 ? a/in_a
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
79 ? b/1/in_b_1
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
80 ? b/2/in_b_2
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
81 ? b/in_b
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
82 ? in_root
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
83 $ hg status --cwd b/1 .
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
84 ? in_b_1
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
85 $ hg status --cwd b/1 ..
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
86 ? in_b_1
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
87 ? ../2/in_b_2
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
88 ? ../in_b
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
89
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
90 $ hg status --cwd b/2
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
91 ? a/1/in_a_1
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
92 ? a/in_a
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
93 ? b/1/in_b_1
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
94 ? b/2/in_b_2
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
95 ? b/in_b
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
96 ? in_root
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
97 $ hg status --cwd b/2 .
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
98 ? in_b_2
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
99 $ hg status --cwd b/2 ..
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
100 ? ../1/in_b_1
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
101 ? in_b_2
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
102 ? ../in_b
19107
fcf08023c011 match: fix root calculation for combining regexps with simple paths
Mads Kiilerich <madski@unity3d.com>
parents: 17377
diff changeset
103
fcf08023c011 match: fix root calculation for combining regexps with simple paths
Mads Kiilerich <madski@unity3d.com>
parents: 17377
diff changeset
104 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
105
fcf08023c011 match: fix root calculation for combining regexps with simple paths
Mads Kiilerich <madski@unity3d.com>
parents: 17377
diff changeset
106 $ 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
107 ? a/in_a
fcf08023c011 match: fix root calculation for combining regexps with simple paths
Mads Kiilerich <madski@unity3d.com>
parents: 17377
diff changeset
108 ? b/in_b
fcf08023c011 match: fix root calculation for combining regexps with simple paths
Mads Kiilerich <madski@unity3d.com>
parents: 17377
diff changeset
109
32872
9fcb6df413c9 ui: add support for a tweakdefaults knob
Augie Fackler <augie@google.com>
parents: 31766
diff changeset
110 tweaking defaults works
9fcb6df413c9 ui: add support for a tweakdefaults knob
Augie Fackler <augie@google.com>
parents: 31766
diff changeset
111 $ 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
112 ? 1/in_a_1
fe3ca1e6f786 ui: remove commands.status.terse=u from ui.tweakdefaults
Gregory Szorc <gregory.szorc@gmail.com>
parents: 38545
diff changeset
113 ? in_a
fe3ca1e6f786 ui: remove commands.status.terse=u from ui.tweakdefaults
Gregory Szorc <gregory.szorc@gmail.com>
parents: 38545
diff changeset
114 ? ../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
115 ? ../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
116 ? ../b/in_b
32872
9fcb6df413c9 ui: add support for a tweakdefaults knob
Augie Fackler <augie@google.com>
parents: 31766
diff changeset
117 ? ../in_root
9fcb6df413c9 ui: add support for a tweakdefaults knob
Augie Fackler <augie@google.com>
parents: 31766
diff changeset
118 $ 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
119 ? a/1/in_a_1 (glob)
9fcb6df413c9 ui: add support for a tweakdefaults knob
Augie Fackler <augie@google.com>
parents: 31766
diff changeset
120 ? a/in_a (glob)
9fcb6df413c9 ui: add support for a tweakdefaults knob
Augie Fackler <augie@google.com>
parents: 31766
diff changeset
121 ? b/1/in_b_1 (glob)
9fcb6df413c9 ui: add support for a tweakdefaults knob
Augie Fackler <augie@google.com>
parents: 31766
diff changeset
122 ? b/2/in_b_2 (glob)
9fcb6df413c9 ui: add support for a tweakdefaults knob
Augie Fackler <augie@google.com>
parents: 31766
diff changeset
123 ? b/in_b (glob)
9fcb6df413c9 ui: add support for a tweakdefaults knob
Augie Fackler <augie@google.com>
parents: 31766
diff changeset
124 ? in_root
9fcb6df413c9 ui: add support for a tweakdefaults knob
Augie Fackler <augie@google.com>
parents: 31766
diff changeset
125 $ 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
126 ? 1/in_a_1
fe3ca1e6f786 ui: remove commands.status.terse=u from ui.tweakdefaults
Gregory Szorc <gregory.szorc@gmail.com>
parents: 38545
diff changeset
127 ? in_a
fe3ca1e6f786 ui: remove commands.status.terse=u from ui.tweakdefaults
Gregory Szorc <gregory.szorc@gmail.com>
parents: 38545
diff changeset
128 ? ../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
129 ? ../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
130 ? ../b/in_b
32887
28a0e6a4e824 test-status: glob fixes for Windows
Matt Harbison <matt_harbison@yahoo.com>
parents: 32872
diff changeset
131 ? ../in_root (glob)
32872
9fcb6df413c9 ui: add support for a tweakdefaults knob
Augie Fackler <augie@google.com>
parents: 31766
diff changeset
132
31589
7e3b145f8247 status: support commands.status.relative config
Martin von Zweigbergk <martinvonz@google.com>
parents: 31423
diff changeset
133 relative paths can be requested
7e3b145f8247 status: support commands.status.relative config
Martin von Zweigbergk <martinvonz@google.com>
parents: 31423
diff changeset
134
7e3b145f8247 status: support commands.status.relative config
Martin von Zweigbergk <martinvonz@google.com>
parents: 31423
diff changeset
135 $ cat >> $HGRCPATH <<EOF
7e3b145f8247 status: support commands.status.relative config
Martin von Zweigbergk <martinvonz@google.com>
parents: 31423
diff changeset
136 > [commands]
7e3b145f8247 status: support commands.status.relative config
Martin von Zweigbergk <martinvonz@google.com>
parents: 31423
diff changeset
137 > status.relative = True
7e3b145f8247 status: support commands.status.relative config
Martin von Zweigbergk <martinvonz@google.com>
parents: 31423
diff changeset
138 > EOF
7e3b145f8247 status: support commands.status.relative config
Martin von Zweigbergk <martinvonz@google.com>
parents: 31423
diff changeset
139 $ hg status --cwd a
7e3b145f8247 status: support commands.status.relative config
Martin von Zweigbergk <martinvonz@google.com>
parents: 31423
diff changeset
140 ? 1/in_a_1
7e3b145f8247 status: support commands.status.relative config
Martin von Zweigbergk <martinvonz@google.com>
parents: 31423
diff changeset
141 ? in_a
7e3b145f8247 status: support commands.status.relative config
Martin von Zweigbergk <martinvonz@google.com>
parents: 31423
diff changeset
142 ? ../b/1/in_b_1
7e3b145f8247 status: support commands.status.relative config
Martin von Zweigbergk <martinvonz@google.com>
parents: 31423
diff changeset
143 ? ../b/2/in_b_2
7e3b145f8247 status: support commands.status.relative config
Martin von Zweigbergk <martinvonz@google.com>
parents: 31423
diff changeset
144 ? ../b/in_b
7e3b145f8247 status: support commands.status.relative config
Martin von Zweigbergk <martinvonz@google.com>
parents: 31423
diff changeset
145 ? ../in_root
7e3b145f8247 status: support commands.status.relative config
Martin von Zweigbergk <martinvonz@google.com>
parents: 31423
diff changeset
146 $ HGPLAIN=1 hg status --cwd a
31766
bdcaf612e75a tests: add globs for Windows
Matt Harbison <matt_harbison@yahoo.com>
parents: 31589
diff changeset
147 ? a/1/in_a_1 (glob)
bdcaf612e75a tests: add globs for Windows
Matt Harbison <matt_harbison@yahoo.com>
parents: 31589
diff changeset
148 ? a/in_a (glob)
bdcaf612e75a tests: add globs for Windows
Matt Harbison <matt_harbison@yahoo.com>
parents: 31589
diff changeset
149 ? b/1/in_b_1 (glob)
bdcaf612e75a tests: add globs for Windows
Matt Harbison <matt_harbison@yahoo.com>
parents: 31589
diff changeset
150 ? b/2/in_b_2 (glob)
bdcaf612e75a tests: add globs for Windows
Matt Harbison <matt_harbison@yahoo.com>
parents: 31589
diff changeset
151 ? b/in_b (glob)
31589
7e3b145f8247 status: support commands.status.relative config
Martin von Zweigbergk <martinvonz@google.com>
parents: 31423
diff changeset
152 ? in_root
7e3b145f8247 status: support commands.status.relative config
Martin von Zweigbergk <martinvonz@google.com>
parents: 31423
diff changeset
153
32872
9fcb6df413c9 ui: add support for a tweakdefaults knob
Augie Fackler <augie@google.com>
parents: 31766
diff changeset
154 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
155 $ cat >> $HGRCPATH <<EOF
9fcb6df413c9 ui: add support for a tweakdefaults knob
Augie Fackler <augie@google.com>
parents: 31766
diff changeset
156 > [commands]
9fcb6df413c9 ui: add support for a tweakdefaults knob
Augie Fackler <augie@google.com>
parents: 31766
diff changeset
157 > status.relative = False
9fcb6df413c9 ui: add support for a tweakdefaults knob
Augie Fackler <augie@google.com>
parents: 31766
diff changeset
158 > EOF
9fcb6df413c9 ui: add support for a tweakdefaults knob
Augie Fackler <augie@google.com>
parents: 31766
diff changeset
159 $ 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
160 ? 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
161 ? a/in_a
fe3ca1e6f786 ui: remove commands.status.terse=u from ui.tweakdefaults
Gregory Szorc <gregory.szorc@gmail.com>
parents: 38545
diff changeset
162 ? 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
163 ? 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
164 ? b/in_b
32872
9fcb6df413c9 ui: add support for a tweakdefaults knob
Augie Fackler <augie@google.com>
parents: 31766
diff changeset
165 ? in_root
9fcb6df413c9 ui: add support for a tweakdefaults knob
Augie Fackler <augie@google.com>
parents: 31766
diff changeset
166
11782
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
167 $ cd ..
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
168
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
169 $ hg init repo2
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
170 $ cd repo2
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
171 $ touch modified removed deleted ignored
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
172 $ echo "^ignored$" > .hgignore
12156
4c94b6d0fb1c tests: remove unneeded -d flags
Martin Geisler <mg@lazybytes.net>
parents: 11782
diff changeset
173 $ hg ci -A -m 'initial checkin'
11782
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
174 adding .hgignore
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
175 adding deleted
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
176 adding modified
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
177 adding removed
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
178 $ touch modified added unknown ignored
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
179 $ hg add added
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
180 $ hg remove removed
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
181 $ rm deleted
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
182
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
183 hg status:
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
184
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
185 $ hg status
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
186 A added
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
187 R removed
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
188 ! deleted
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
189 ? unknown
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
190
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
191 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
192
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
193 $ 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
194 never-existed: * (glob)
11782
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
195 A added
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
196 R removed
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
197 ! deleted
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
198 ? unknown
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
199
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
200 $ hg copy modified copied
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
201
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
202 hg status -C:
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
203
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
204 $ hg status -C
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
205 A added
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
206 A copied
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
207 modified
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
208 R removed
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
209 ! deleted
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
210 ? unknown
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
211
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
212 hg status -A:
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
213
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
214 $ hg status -A
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
215 A added
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
216 A copied
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
217 modified
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
218 R removed
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
219 ! deleted
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
220 ? unknown
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
221 I ignored
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
222 C .hgignore
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
223 C modified
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
224
38545
85e3aa21bcdc status: add support for log-like template keywords and functions
Yuya Nishihara <yuya@tcha.org>
parents: 38101
diff changeset
225 $ 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
226 A added ffff
85e3aa21bcdc status: add support for log-like template keywords and functions
Yuya Nishihara <yuya@tcha.org>
parents: 38101
diff changeset
227 A copied ffff
85e3aa21bcdc status: add support for log-like template keywords and functions
Yuya Nishihara <yuya@tcha.org>
parents: 38101
diff changeset
228 R removed ffff
85e3aa21bcdc status: add support for log-like template keywords and functions
Yuya Nishihara <yuya@tcha.org>
parents: 38101
diff changeset
229 ! deleted ffff
85e3aa21bcdc status: add support for log-like template keywords and functions
Yuya Nishihara <yuya@tcha.org>
parents: 38101
diff changeset
230 ? unknown ffff
85e3aa21bcdc status: add support for log-like template keywords and functions
Yuya Nishihara <yuya@tcha.org>
parents: 38101
diff changeset
231 I ignored ffff
85e3aa21bcdc status: add support for log-like template keywords and functions
Yuya Nishihara <yuya@tcha.org>
parents: 38101
diff changeset
232 C .hgignore ffff
85e3aa21bcdc status: add support for log-like template keywords and functions
Yuya Nishihara <yuya@tcha.org>
parents: 38101
diff changeset
233 C modified ffff
85e3aa21bcdc status: add support for log-like template keywords and functions
Yuya Nishihara <yuya@tcha.org>
parents: 38101
diff changeset
234
22429
7a7eed5176a4 commands: add hidden -T option for files/manifest/status/tags
Matt Mackall <mpm@selenic.com>
parents: 22424
diff changeset
235 $ hg status -A -Tjson
7a7eed5176a4 commands: add hidden -T option for files/manifest/status/tags
Matt Mackall <mpm@selenic.com>
parents: 22424
diff changeset
236 [
7a7eed5176a4 commands: add hidden -T option for files/manifest/status/tags
Matt Mackall <mpm@selenic.com>
parents: 22424
diff changeset
237 {
7a7eed5176a4 commands: add hidden -T option for files/manifest/status/tags
Matt Mackall <mpm@selenic.com>
parents: 22424
diff changeset
238 "path": "added",
7a7eed5176a4 commands: add hidden -T option for files/manifest/status/tags
Matt Mackall <mpm@selenic.com>
parents: 22424
diff changeset
239 "status": "A"
7a7eed5176a4 commands: add hidden -T option for files/manifest/status/tags
Matt Mackall <mpm@selenic.com>
parents: 22424
diff changeset
240 },
7a7eed5176a4 commands: add hidden -T option for files/manifest/status/tags
Matt Mackall <mpm@selenic.com>
parents: 22424
diff changeset
241 {
7a7eed5176a4 commands: add hidden -T option for files/manifest/status/tags
Matt Mackall <mpm@selenic.com>
parents: 22424
diff changeset
242 "path": "copied",
39370
46f3ff64bea7 status: rename {copy} to {source} for compatibility with {file_copies} (BC)
Yuya Nishihara <yuya@tcha.org>
parents: 38762
diff changeset
243 "source": "modified",
22429
7a7eed5176a4 commands: add hidden -T option for files/manifest/status/tags
Matt Mackall <mpm@selenic.com>
parents: 22424
diff changeset
244 "status": "A"
7a7eed5176a4 commands: add hidden -T option for files/manifest/status/tags
Matt Mackall <mpm@selenic.com>
parents: 22424
diff changeset
245 },
7a7eed5176a4 commands: add hidden -T option for files/manifest/status/tags
Matt Mackall <mpm@selenic.com>
parents: 22424
diff changeset
246 {
7a7eed5176a4 commands: add hidden -T option for files/manifest/status/tags
Matt Mackall <mpm@selenic.com>
parents: 22424
diff changeset
247 "path": "removed",
7a7eed5176a4 commands: add hidden -T option for files/manifest/status/tags
Matt Mackall <mpm@selenic.com>
parents: 22424
diff changeset
248 "status": "R"
7a7eed5176a4 commands: add hidden -T option for files/manifest/status/tags
Matt Mackall <mpm@selenic.com>
parents: 22424
diff changeset
249 },
7a7eed5176a4 commands: add hidden -T option for files/manifest/status/tags
Matt Mackall <mpm@selenic.com>
parents: 22424
diff changeset
250 {
7a7eed5176a4 commands: add hidden -T option for files/manifest/status/tags
Matt Mackall <mpm@selenic.com>
parents: 22424
diff changeset
251 "path": "deleted",
7a7eed5176a4 commands: add hidden -T option for files/manifest/status/tags
Matt Mackall <mpm@selenic.com>
parents: 22424
diff changeset
252 "status": "!"
7a7eed5176a4 commands: add hidden -T option for files/manifest/status/tags
Matt Mackall <mpm@selenic.com>
parents: 22424
diff changeset
253 },
7a7eed5176a4 commands: add hidden -T option for files/manifest/status/tags
Matt Mackall <mpm@selenic.com>
parents: 22424
diff changeset
254 {
7a7eed5176a4 commands: add hidden -T option for files/manifest/status/tags
Matt Mackall <mpm@selenic.com>
parents: 22424
diff changeset
255 "path": "unknown",
7a7eed5176a4 commands: add hidden -T option for files/manifest/status/tags
Matt Mackall <mpm@selenic.com>
parents: 22424
diff changeset
256 "status": "?"
7a7eed5176a4 commands: add hidden -T option for files/manifest/status/tags
Matt Mackall <mpm@selenic.com>
parents: 22424
diff changeset
257 },
7a7eed5176a4 commands: add hidden -T option for files/manifest/status/tags
Matt Mackall <mpm@selenic.com>
parents: 22424
diff changeset
258 {
7a7eed5176a4 commands: add hidden -T option for files/manifest/status/tags
Matt Mackall <mpm@selenic.com>
parents: 22424
diff changeset
259 "path": "ignored",
7a7eed5176a4 commands: add hidden -T option for files/manifest/status/tags
Matt Mackall <mpm@selenic.com>
parents: 22424
diff changeset
260 "status": "I"
7a7eed5176a4 commands: add hidden -T option for files/manifest/status/tags
Matt Mackall <mpm@selenic.com>
parents: 22424
diff changeset
261 },
7a7eed5176a4 commands: add hidden -T option for files/manifest/status/tags
Matt Mackall <mpm@selenic.com>
parents: 22424
diff changeset
262 {
7a7eed5176a4 commands: add hidden -T option for files/manifest/status/tags
Matt Mackall <mpm@selenic.com>
parents: 22424
diff changeset
263 "path": ".hgignore",
7a7eed5176a4 commands: add hidden -T option for files/manifest/status/tags
Matt Mackall <mpm@selenic.com>
parents: 22424
diff changeset
264 "status": "C"
7a7eed5176a4 commands: add hidden -T option for files/manifest/status/tags
Matt Mackall <mpm@selenic.com>
parents: 22424
diff changeset
265 },
7a7eed5176a4 commands: add hidden -T option for files/manifest/status/tags
Matt Mackall <mpm@selenic.com>
parents: 22424
diff changeset
266 {
7a7eed5176a4 commands: add hidden -T option for files/manifest/status/tags
Matt Mackall <mpm@selenic.com>
parents: 22424
diff changeset
267 "path": "modified",
7a7eed5176a4 commands: add hidden -T option for files/manifest/status/tags
Matt Mackall <mpm@selenic.com>
parents: 22424
diff changeset
268 "status": "C"
7a7eed5176a4 commands: add hidden -T option for files/manifest/status/tags
Matt Mackall <mpm@selenic.com>
parents: 22424
diff changeset
269 }
7a7eed5176a4 commands: add hidden -T option for files/manifest/status/tags
Matt Mackall <mpm@selenic.com>
parents: 22424
diff changeset
270 ]
11782
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
271
22430
968247e8f4ac formatter: add pickle format
Matt Mackall <mpm@selenic.com>
parents: 22429
diff changeset
272 $ hg status -A -Tpickle > pickle
29485
6a98f9408a50 py3: make files use absolute_import and print_function
Pulkit Goyal <7895pulkit@gmail.com>
parents: 29000
diff changeset
273 >>> from __future__ import print_function
22430
968247e8f4ac formatter: add pickle format
Matt Mackall <mpm@selenic.com>
parents: 22429
diff changeset
274 >>> import pickle
29485
6a98f9408a50 py3: make files use absolute_import and print_function
Pulkit Goyal <7895pulkit@gmail.com>
parents: 29000
diff changeset
275 >>> print(sorted((x['status'], x['path']) for x in pickle.load(open("pickle"))))
22430
968247e8f4ac formatter: add pickle format
Matt Mackall <mpm@selenic.com>
parents: 22429
diff changeset
276 [('!', 'deleted'), ('?', 'pickle'), ('?', 'unknown'), ('A', 'added'), ('A', 'copied'), ('C', '.hgignore'), ('C', 'modified'), ('I', 'ignored'), ('R', 'removed')]
968247e8f4ac formatter: add pickle format
Matt Mackall <mpm@selenic.com>
parents: 22429
diff changeset
277 $ rm pickle
968247e8f4ac formatter: add pickle format
Matt Mackall <mpm@selenic.com>
parents: 22429
diff changeset
278
11782
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
279 $ echo "^ignoreddir$" > .hgignore
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
280 $ mkdir ignoreddir
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
281 $ touch ignoreddir/file
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
282
25515
e8075329c5fb tests: test basic template support for status
Matt Mackall <mpm@selenic.com>
parents: 24663
diff changeset
283 Test templater support:
e8075329c5fb tests: test basic template support for status
Matt Mackall <mpm@selenic.com>
parents: 24663
diff changeset
284
39370
46f3ff64bea7 status: rename {copy} to {source} for compatibility with {file_copies} (BC)
Yuya Nishihara <yuya@tcha.org>
parents: 38762
diff changeset
285 $ 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
286 [M] .hgignore
e8075329c5fb tests: test basic template support for status
Matt Mackall <mpm@selenic.com>
parents: 24663
diff changeset
287 [A] added
e8075329c5fb tests: test basic template support for status
Matt Mackall <mpm@selenic.com>
parents: 24663
diff changeset
288 [A] modified -> copied
e8075329c5fb tests: test basic template support for status
Matt Mackall <mpm@selenic.com>
parents: 24663
diff changeset
289 [R] removed
e8075329c5fb tests: test basic template support for status
Matt Mackall <mpm@selenic.com>
parents: 24663
diff changeset
290 [!] deleted
e8075329c5fb tests: test basic template support for status
Matt Mackall <mpm@selenic.com>
parents: 24663
diff changeset
291 [?] ignored
e8075329c5fb tests: test basic template support for status
Matt Mackall <mpm@selenic.com>
parents: 24663
diff changeset
292 [?] unknown
e8075329c5fb tests: test basic template support for status
Matt Mackall <mpm@selenic.com>
parents: 24663
diff changeset
293 [I] ignoreddir/file
e8075329c5fb tests: test basic template support for status
Matt Mackall <mpm@selenic.com>
parents: 24663
diff changeset
294 [C] modified
e8075329c5fb tests: test basic template support for status
Matt Mackall <mpm@selenic.com>
parents: 24663
diff changeset
295 $ hg status -AT default
e8075329c5fb tests: test basic template support for status
Matt Mackall <mpm@selenic.com>
parents: 24663
diff changeset
296 M .hgignore
e8075329c5fb tests: test basic template support for status
Matt Mackall <mpm@selenic.com>
parents: 24663
diff changeset
297 A added
e8075329c5fb tests: test basic template support for status
Matt Mackall <mpm@selenic.com>
parents: 24663
diff changeset
298 A copied
e8075329c5fb tests: test basic template support for status
Matt Mackall <mpm@selenic.com>
parents: 24663
diff changeset
299 modified
e8075329c5fb tests: test basic template support for status
Matt Mackall <mpm@selenic.com>
parents: 24663
diff changeset
300 R removed
e8075329c5fb tests: test basic template support for status
Matt Mackall <mpm@selenic.com>
parents: 24663
diff changeset
301 ! deleted
e8075329c5fb tests: test basic template support for status
Matt Mackall <mpm@selenic.com>
parents: 24663
diff changeset
302 ? ignored
e8075329c5fb tests: test basic template support for status
Matt Mackall <mpm@selenic.com>
parents: 24663
diff changeset
303 ? unknown
e8075329c5fb tests: test basic template support for status
Matt Mackall <mpm@selenic.com>
parents: 24663
diff changeset
304 I ignoreddir/file
e8075329c5fb tests: test basic template support for status
Matt Mackall <mpm@selenic.com>
parents: 24663
diff changeset
305 C modified
e8075329c5fb tests: test basic template support for status
Matt Mackall <mpm@selenic.com>
parents: 24663
diff changeset
306 $ hg status -T compact
e8075329c5fb tests: test basic template support for status
Matt Mackall <mpm@selenic.com>
parents: 24663
diff changeset
307 abort: "status" not in template map
e8075329c5fb tests: test basic template support for status
Matt Mackall <mpm@selenic.com>
parents: 24663
diff changeset
308 [255]
e8075329c5fb tests: test basic template support for status
Matt Mackall <mpm@selenic.com>
parents: 24663
diff changeset
309
11782
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
310 hg status ignoreddir/file:
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
311
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
312 $ hg status ignoreddir/file
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
313
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
314 hg status -i ignoreddir/file:
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
315
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
316 $ hg status -i ignoreddir/file
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
317 I ignoreddir/file
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
318 $ cd ..
6200
acc40572da5b 'hg status -q' output skips non-tracked files.
Zoran Bosnjak <zoran.bosnjak@via.si>
parents: 6033
diff changeset
319
12328
b63f6422d2a7 tests: fix a bunch of pointless #s in unified tests
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
320 Check 'status -q' and some combinations
11782
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
321
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
322 $ hg init repo3
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
323 $ cd repo3
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
324 $ touch modified removed deleted ignored
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
325 $ echo "^ignored$" > .hgignore
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
326 $ hg commit -A -m 'initial checkin'
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
327 adding .hgignore
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
328 adding deleted
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
329 adding modified
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
330 adding removed
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
331 $ touch added unknown ignored
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
332 $ hg add added
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
333 $ echo "test" >> modified
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
334 $ hg remove removed
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
335 $ rm deleted
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
336 $ hg copy modified copied
6200
acc40572da5b 'hg status -q' output skips non-tracked files.
Zoran Bosnjak <zoran.bosnjak@via.si>
parents: 6033
diff changeset
337
24419
0e41f110e69e revset: add wdir() function to specify workingctx revision by command
Yuya Nishihara <yuya@tcha.org>
parents: 23402
diff changeset
338 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
339 "hg status"
0e41f110e69e revset: add wdir() function to specify workingctx revision by command
Yuya Nishihara <yuya@tcha.org>
parents: 23402
diff changeset
340
0e41f110e69e revset: add wdir() function to specify workingctx revision by command
Yuya Nishihara <yuya@tcha.org>
parents: 23402
diff changeset
341 $ hg status --change "wdir()"
0e41f110e69e revset: add wdir() function to specify workingctx revision by command
Yuya Nishihara <yuya@tcha.org>
parents: 23402
diff changeset
342 M modified
0e41f110e69e revset: add wdir() function to specify workingctx revision by command
Yuya Nishihara <yuya@tcha.org>
parents: 23402
diff changeset
343 A added
0e41f110e69e revset: add wdir() function to specify workingctx revision by command
Yuya Nishihara <yuya@tcha.org>
parents: 23402
diff changeset
344 A copied
0e41f110e69e revset: add wdir() function to specify workingctx revision by command
Yuya Nishihara <yuya@tcha.org>
parents: 23402
diff changeset
345 R removed
0e41f110e69e revset: add wdir() function to specify workingctx revision by command
Yuya Nishihara <yuya@tcha.org>
parents: 23402
diff changeset
346 ! deleted
0e41f110e69e revset: add wdir() function to specify workingctx revision by command
Yuya Nishihara <yuya@tcha.org>
parents: 23402
diff changeset
347 ? unknown
0e41f110e69e revset: add wdir() function to specify workingctx revision by command
Yuya Nishihara <yuya@tcha.org>
parents: 23402
diff changeset
348
12328
b63f6422d2a7 tests: fix a bunch of pointless #s in unified tests
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
349 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
350 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
351 If result is not as expected, raise error
11782
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
352
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
353 $ assert() {
12365
22f3353bcc36 tests: cleanup exit code handling in unified tests
Matt Mackall <mpm@selenic.com>
parents: 12328
diff changeset
354 > hg status $1 > ../a
22f3353bcc36 tests: cleanup exit code handling in unified tests
Matt Mackall <mpm@selenic.com>
parents: 12328
diff changeset
355 > hg status $2 > ../b
22f3353bcc36 tests: cleanup exit code handling in unified tests
Matt Mackall <mpm@selenic.com>
parents: 12328
diff changeset
356 > 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
357 > out=0
22f3353bcc36 tests: cleanup exit code handling in unified tests
Matt Mackall <mpm@selenic.com>
parents: 12328
diff changeset
358 > else
11782
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
359 > out=1
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
360 > fi
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
361 > if [ $3 -eq 0 ]; then
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
362 > df="same"
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
363 > else
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
364 > df="different"
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
365 > fi
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
366 > if [ $out -ne $3 ]; then
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
367 > echo "Error on $1 and $2, should be $df."
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
368 > fi
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
369 > }
6200
acc40572da5b 'hg status -q' output skips non-tracked files.
Zoran Bosnjak <zoran.bosnjak@via.si>
parents: 6033
diff changeset
370
12328
b63f6422d2a7 tests: fix a bunch of pointless #s in unified tests
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
371 Assert flag1 flag2 [0-same | 1-different]
11782
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
372
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
373 $ assert "-q" "-mard" 0
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
374 $ assert "-A" "-marduicC" 0
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
375 $ assert "-qA" "-mardcC" 0
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
376 $ assert "-qAui" "-A" 0
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
377 $ assert "-qAu" "-marducC" 0
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
378 $ assert "-qAi" "-mardicC" 0
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
379 $ assert "-qu" "-u" 0
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
380 $ assert "-q" "-u" 1
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
381 $ assert "-m" "-a" 1
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
382 $ assert "-r" "-d" 1
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
383 $ cd ..
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
384
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
385 $ hg init repo4
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
386 $ cd repo4
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
387 $ touch modified removed deleted
12156
4c94b6d0fb1c tests: remove unneeded -d flags
Martin Geisler <mg@lazybytes.net>
parents: 11782
diff changeset
388 $ hg ci -q -A -m 'initial checkin'
11782
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
389 $ touch added unknown
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
390 $ hg add added
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
391 $ hg remove removed
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
392 $ rm deleted
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
393 $ echo x > modified
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
394 $ hg copy modified copied
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
395 $ hg ci -m 'test checkin' -d "1000001 0"
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
396 $ rm *
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
397 $ touch unrelated
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
398 $ 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
399
11782
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
400 hg status --change 1:
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
401
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
402 $ hg status --change 1
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
403 M modified
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
404 A added
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
405 A copied
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
406 R removed
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
407
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
408 hg status --change 1 unrelated:
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
409
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
410 $ hg status --change 1 unrelated
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
411
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
412 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
413
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
414 $ 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
415 M modified
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
416 A added
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
417 A copied
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
418 modified
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
419 R removed
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
420
15578
db0e277bdd37 status: support revsets with --change
Patrick Mezard <pmezard@gmail.com>
parents: 15521
diff changeset
421 hg status -A --change 1 and revset:
11782
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
422
15578
db0e277bdd37 status: support revsets with --change
Patrick Mezard <pmezard@gmail.com>
parents: 15521
diff changeset
423 $ hg status -A --change '1|1'
11782
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
424 M modified
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
425 A added
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
426 A copied
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
427 modified
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
428 R removed
992506c14217 tests: unify test-status
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10014
diff changeset
429 C deleted
15848
012b285cf643 filectx: fix cmp() of file starting with '\1\n'
Yuya Nishihara <yuya@tcha.org>
parents: 14155
diff changeset
430
012b285cf643 filectx: fix cmp() of file starting with '\1\n'
Yuya Nishihara <yuya@tcha.org>
parents: 14155
diff changeset
431 $ cd ..
012b285cf643 filectx: fix cmp() of file starting with '\1\n'
Yuya Nishihara <yuya@tcha.org>
parents: 14155
diff changeset
432
27668
369c8f9453c2 status: revert + flag-change == modified
Martin von Zweigbergk <martinvonz@google.com>
parents: 25515
diff changeset
433 hg status with --rev and reverted changes:
369c8f9453c2 status: revert + flag-change == modified
Martin von Zweigbergk <martinvonz@google.com>
parents: 25515
diff changeset
434
369c8f9453c2 status: revert + flag-change == modified
Martin von Zweigbergk <martinvonz@google.com>
parents: 25515
diff changeset
435 $ hg init reverted-changes-repo
369c8f9453c2 status: revert + flag-change == modified
Martin von Zweigbergk <martinvonz@google.com>
parents: 25515
diff changeset
436 $ cd reverted-changes-repo
369c8f9453c2 status: revert + flag-change == modified
Martin von Zweigbergk <martinvonz@google.com>
parents: 25515
diff changeset
437 $ echo a > file
369c8f9453c2 status: revert + flag-change == modified
Martin von Zweigbergk <martinvonz@google.com>
parents: 25515
diff changeset
438 $ hg add file
369c8f9453c2 status: revert + flag-change == modified
Martin von Zweigbergk <martinvonz@google.com>
parents: 25515
diff changeset
439 $ hg ci -m a
369c8f9453c2 status: revert + flag-change == modified
Martin von Zweigbergk <martinvonz@google.com>
parents: 25515
diff changeset
440 $ echo b > file
369c8f9453c2 status: revert + flag-change == modified
Martin von Zweigbergk <martinvonz@google.com>
parents: 25515
diff changeset
441 $ hg ci -m b
369c8f9453c2 status: revert + flag-change == modified
Martin von Zweigbergk <martinvonz@google.com>
parents: 25515
diff changeset
442
369c8f9453c2 status: revert + flag-change == modified
Martin von Zweigbergk <martinvonz@google.com>
parents: 25515
diff changeset
443 reverted file should appear clean
369c8f9453c2 status: revert + flag-change == modified
Martin von Zweigbergk <martinvonz@google.com>
parents: 25515
diff changeset
444
369c8f9453c2 status: revert + flag-change == modified
Martin von Zweigbergk <martinvonz@google.com>
parents: 25515
diff changeset
445 $ hg revert -r 0 .
369c8f9453c2 status: revert + flag-change == modified
Martin von Zweigbergk <martinvonz@google.com>
parents: 25515
diff changeset
446 reverting file
369c8f9453c2 status: revert + flag-change == modified
Martin von Zweigbergk <martinvonz@google.com>
parents: 25515
diff changeset
447 $ hg status -A --rev 0
369c8f9453c2 status: revert + flag-change == modified
Martin von Zweigbergk <martinvonz@google.com>
parents: 25515
diff changeset
448 C file
369c8f9453c2 status: revert + flag-change == modified
Martin von Zweigbergk <martinvonz@google.com>
parents: 25515
diff changeset
449
369c8f9453c2 status: revert + flag-change == modified
Martin von Zweigbergk <martinvonz@google.com>
parents: 25515
diff changeset
450 #if execbit
369c8f9453c2 status: revert + flag-change == modified
Martin von Zweigbergk <martinvonz@google.com>
parents: 25515
diff changeset
451 reverted file with changed flag should appear modified
369c8f9453c2 status: revert + flag-change == modified
Martin von Zweigbergk <martinvonz@google.com>
parents: 25515
diff changeset
452
369c8f9453c2 status: revert + flag-change == modified
Martin von Zweigbergk <martinvonz@google.com>
parents: 25515
diff changeset
453 $ chmod +x file
369c8f9453c2 status: revert + flag-change == modified
Martin von Zweigbergk <martinvonz@google.com>
parents: 25515
diff changeset
454 $ hg status -A --rev 0
369c8f9453c2 status: revert + flag-change == modified
Martin von Zweigbergk <martinvonz@google.com>
parents: 25515
diff changeset
455 M file
369c8f9453c2 status: revert + flag-change == modified
Martin von Zweigbergk <martinvonz@google.com>
parents: 25515
diff changeset
456
27743
5dcadc6c5aed test-status: stabilize for no-execbit platforms
Matt Harbison <matt_harbison@yahoo.com>
parents: 27720
diff changeset
457 $ hg revert -r 0 .
5dcadc6c5aed test-status: stabilize for no-execbit platforms
Matt Harbison <matt_harbison@yahoo.com>
parents: 27720
diff changeset
458 reverting file
27749
215b47449e47 context: check for differing flags a little earlier
Martin von Zweigbergk <martinvonz@google.com>
parents: 27747
diff changeset
459
215b47449e47 context: check for differing flags a little earlier
Martin von Zweigbergk <martinvonz@google.com>
parents: 27747
diff changeset
460 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
461
215b47449e47 context: check for differing flags a little earlier
Martin von Zweigbergk <martinvonz@google.com>
parents: 27747
diff changeset
462 $ hg co -C .
215b47449e47 context: check for differing flags a little earlier
Martin von Zweigbergk <martinvonz@google.com>
parents: 27747
diff changeset
463 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
464 $ chmod +x file
215b47449e47 context: check for differing flags a little earlier
Martin von Zweigbergk <martinvonz@google.com>
parents: 27747
diff changeset
465 $ hg ci -m 'change flag'
215b47449e47 context: check for differing flags a little earlier
Martin von Zweigbergk <martinvonz@google.com>
parents: 27747
diff changeset
466 $ 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
467 M file
215b47449e47 context: check for differing flags a little earlier
Martin von Zweigbergk <martinvonz@google.com>
parents: 27747
diff changeset
468 $ 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
469
27668
369c8f9453c2 status: revert + flag-change == modified
Martin von Zweigbergk <martinvonz@google.com>
parents: 25515
diff changeset
470 #endif
369c8f9453c2 status: revert + flag-change == modified
Martin von Zweigbergk <martinvonz@google.com>
parents: 25515
diff changeset
471
31423
568d80b24b3a tests: properly drop back to root dir in test-status.t
Ryan McElroy <rmcelroy@fb.com>
parents: 29485
diff changeset
472 $ cd ..
568d80b24b3a tests: properly drop back to root dir in test-status.t
Ryan McElroy <rmcelroy@fb.com>
parents: 29485
diff changeset
473
15848
012b285cf643 filectx: fix cmp() of file starting with '\1\n'
Yuya Nishihara <yuya@tcha.org>
parents: 14155
diff changeset
474 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
475
012b285cf643 filectx: fix cmp() of file starting with '\1\n'
Yuya Nishihara <yuya@tcha.org>
parents: 14155
diff changeset
476 $ hg init repo5
012b285cf643 filectx: fix cmp() of file starting with '\1\n'
Yuya Nishihara <yuya@tcha.org>
parents: 14155
diff changeset
477 $ cd repo5
38017
6660b90805c6 py3: suppress the value returned by .write() calls
Pulkit Goyal <7895pulkit@gmail.com>
parents: 36039
diff changeset
478 >>> 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
479 $ 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
480 $ hg status -A
012b285cf643 filectx: fix cmp() of file starting with '\1\n'
Yuya Nishihara <yuya@tcha.org>
parents: 14155
diff changeset
481 C 010a
012b285cf643 filectx: fix cmp() of file starting with '\1\n'
Yuya Nishihara <yuya@tcha.org>
parents: 14155
diff changeset
482
38017
6660b90805c6 py3: suppress the value returned by .write() calls
Pulkit Goyal <7895pulkit@gmail.com>
parents: 36039
diff changeset
483 >>> 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
484 $ hg status -A
012b285cf643 filectx: fix cmp() of file starting with '\1\n'
Yuya Nishihara <yuya@tcha.org>
parents: 14155
diff changeset
485 M 010a
012b285cf643 filectx: fix cmp() of file starting with '\1\n'
Yuya Nishihara <yuya@tcha.org>
parents: 14155
diff changeset
486 $ 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
487 $ 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
488 M 010a
012b285cf643 filectx: fix cmp() of file starting with '\1\n'
Yuya Nishihara <yuya@tcha.org>
parents: 14155
diff changeset
489
012b285cf643 filectx: fix cmp() of file starting with '\1\n'
Yuya Nishihara <yuya@tcha.org>
parents: 14155
diff changeset
490 $ touch empty
012b285cf643 filectx: fix cmp() of file starting with '\1\n'
Yuya Nishihara <yuya@tcha.org>
parents: 14155
diff changeset
491 $ 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
492 $ 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
493 C 010a
16144
4546a8513dcd localrepository: use 'changectx.dirs()' in 'status()' for directory patterns
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 16098
diff changeset
494
4546a8513dcd localrepository: use 'changectx.dirs()' in 'status()' for directory patterns
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 16098
diff changeset
495 $ cd ..
4546a8513dcd localrepository: use 'changectx.dirs()' in 'status()' for directory patterns
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 16098
diff changeset
496
4546a8513dcd localrepository: use 'changectx.dirs()' in 'status()' for directory patterns
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 16098
diff changeset
497 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
498 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
499
4546a8513dcd localrepository: use 'changectx.dirs()' in 'status()' for directory patterns
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 16098
diff changeset
500 $ hg init repo6
4546a8513dcd localrepository: use 'changectx.dirs()' in 'status()' for directory patterns
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 16098
diff changeset
501 $ cd repo6
4546a8513dcd localrepository: use 'changectx.dirs()' in 'status()' for directory patterns
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 16098
diff changeset
502
4546a8513dcd localrepository: use 'changectx.dirs()' in 'status()' for directory patterns
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 16098
diff changeset
503 $ 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
504 $ 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
505 $ 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
506 $ 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
507 $ 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
508 $ 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
509 $ 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
510
4546a8513dcd localrepository: use 'changectx.dirs()' in 'status()' for directory patterns
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 16098
diff changeset
511 $ 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
512 $ hg status -A
4546a8513dcd localrepository: use 'changectx.dirs()' in 'status()' for directory patterns
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 16098
diff changeset
513 C a.txt
4546a8513dcd localrepository: use 'changectx.dirs()' in 'status()' for directory patterns
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 16098
diff changeset
514
4546a8513dcd localrepository: use 'changectx.dirs()' in 'status()' for directory patterns
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 16098
diff changeset
515 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
516 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
517 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
518
4546a8513dcd localrepository: use 'changectx.dirs()' in 'status()' for directory patterns
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 16098
diff changeset
519 $ test ! -d 1
4546a8513dcd localrepository: use 'changectx.dirs()' in 'status()' for directory patterns
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 16098
diff changeset
520 $ 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
521 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
522 $ 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
523 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
524 $ 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
525 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
526 $ 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
527 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
528
22424
1f72226064b8 formatter: make debug style match Python syntax
Matt Mackall <mpm@selenic.com>
parents: 21972
diff changeset
529 $ 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
530 status = [
1f72226064b8 formatter: make debug style match Python syntax
Matt Mackall <mpm@selenic.com>
parents: 21972
diff changeset
531 {*'path': '1/2/3/4/5/b.txt'*}, (glob)
1f72226064b8 formatter: make debug style match Python syntax
Matt Mackall <mpm@selenic.com>
parents: 21972
diff changeset
532 ]
1f72226064b8 formatter: make debug style match Python syntax
Matt Mackall <mpm@selenic.com>
parents: 21972
diff changeset
533
17377
a10f7eeb2588 test-status.t: test ui.slash on Windows
Patrick Mezard <patrick@mezard.eu>
parents: 16144
diff changeset
534 #if windows
a10f7eeb2588 test-status.t: test ui.slash on Windows
Patrick Mezard <patrick@mezard.eu>
parents: 16144
diff changeset
535 $ 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
536 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
537 #endif
a10f7eeb2588 test-status.t: test ui.slash on Windows
Patrick Mezard <patrick@mezard.eu>
parents: 16144
diff changeset
538
16144
4546a8513dcd localrepository: use 'changectx.dirs()' in 'status()' for directory patterns
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 16098
diff changeset
539 $ 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
540
2963d5c9d90b rename: properly report removed and added file as modified (issue4458)
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 23037
diff changeset
541 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
542 =================================================
2963d5c9d90b rename: properly report removed and added file as modified (issue4458)
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 23037
diff changeset
543
2963d5c9d90b rename: properly report removed and added file as modified (issue4458)
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 23037
diff changeset
544
2963d5c9d90b rename: properly report removed and added file as modified (issue4458)
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 23037
diff changeset
545 $ 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
546 $ 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
547 $ 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
548 $ 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
549 $ 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
550 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
551 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
552
2963d5c9d90b rename: properly report removed and added file as modified (issue4458)
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 23037
diff changeset
553
2963d5c9d90b rename: properly report removed and added file as modified (issue4458)
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 23037
diff changeset
554 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
555
2963d5c9d90b rename: properly report removed and added file as modified (issue4458)
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 23037
diff changeset
556 $ 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
557 $ 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
558 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
559 b
2963d5c9d90b rename: properly report removed and added file as modified (issue4458)
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 23037
diff changeset
560 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
561 $ 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
562 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
563 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
564 $ 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
565
2963d5c9d90b rename: properly report removed and added file as modified (issue4458)
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 23037
diff changeset
566 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
567
2963d5c9d90b rename: properly report removed and added file as modified (issue4458)
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 23037
diff changeset
568 $ 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
569 $ 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
570 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
571 $ 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
572 $ 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
573 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
574 b
2963d5c9d90b rename: properly report removed and added file as modified (issue4458)
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 23037
diff changeset
575 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
576
24663
7d01371e6358 commands: add ui.statuscopies config knob
Mathias De Maré <mathias.demare@gmail.com>
parents: 24419
diff changeset
577 using ui.statuscopies setting
7d01371e6358 commands: add ui.statuscopies config knob
Mathias De Maré <mathias.demare@gmail.com>
parents: 24419
diff changeset
578 $ hg st --config ui.statuscopies=true
7d01371e6358 commands: add ui.statuscopies config knob
Mathias De Maré <mathias.demare@gmail.com>
parents: 24419
diff changeset
579 M a
7d01371e6358 commands: add ui.statuscopies config knob
Mathias De Maré <mathias.demare@gmail.com>
parents: 24419
diff changeset
580 b
7d01371e6358 commands: add ui.statuscopies config knob
Mathias De Maré <mathias.demare@gmail.com>
parents: 24419
diff changeset
581 R b
7d01371e6358 commands: add ui.statuscopies config knob
Mathias De Maré <mathias.demare@gmail.com>
parents: 24419
diff changeset
582 $ hg st --config ui.statuscopies=false
7d01371e6358 commands: add ui.statuscopies config knob
Mathias De Maré <mathias.demare@gmail.com>
parents: 24419
diff changeset
583 M a
7d01371e6358 commands: add ui.statuscopies config knob
Mathias De Maré <mathias.demare@gmail.com>
parents: 24419
diff changeset
584 R b
35067
929858db4d22 tweakdefaults: turn on ui.statuscopies
Martin von Zweigbergk <martinvonz@google.com>
parents: 32887
diff changeset
585 $ hg st --config ui.tweakdefaults=yes
929858db4d22 tweakdefaults: turn on ui.statuscopies
Martin von Zweigbergk <martinvonz@google.com>
parents: 32887
diff changeset
586 M a
929858db4d22 tweakdefaults: turn on ui.statuscopies
Martin von Zweigbergk <martinvonz@google.com>
parents: 32887
diff changeset
587 b
929858db4d22 tweakdefaults: turn on ui.statuscopies
Martin von Zweigbergk <martinvonz@google.com>
parents: 32887
diff changeset
588 R b
24663
7d01371e6358 commands: add ui.statuscopies config knob
Mathias De Maré <mathias.demare@gmail.com>
parents: 24419
diff changeset
589
29000
2d3837a4bded log: fix status template to list copy source per dest (issue5155)
Yuya Nishihara <yuya@tcha.org>
parents: 27749
diff changeset
590 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
591 $ 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
592 changeset: 2147483647:ffffffffffff
2d3837a4bded log: fix status template to list copy source per dest (issue5155)
Yuya Nishihara <yuya@tcha.org>
parents: 27749
diff changeset
593 parent: 0:8c55c58b4c0e
2d3837a4bded log: fix status template to list copy source per dest (issue5155)
Yuya Nishihara <yuya@tcha.org>
parents: 27749
diff changeset
594 user: test
2d3837a4bded log: fix status template to list copy source per dest (issue5155)
Yuya Nishihara <yuya@tcha.org>
parents: 27749
diff changeset
595 date: * (glob)
2d3837a4bded log: fix status template to list copy source per dest (issue5155)
Yuya Nishihara <yuya@tcha.org>
parents: 27749
diff changeset
596 files:
2d3837a4bded log: fix status template to list copy source per dest (issue5155)
Yuya Nishihara <yuya@tcha.org>
parents: 27749
diff changeset
597 M a
2d3837a4bded log: fix status template to list copy source per dest (issue5155)
Yuya Nishihara <yuya@tcha.org>
parents: 27749
diff changeset
598 b
2d3837a4bded log: fix status template to list copy source per dest (issue5155)
Yuya Nishihara <yuya@tcha.org>
parents: 27749
diff changeset
599 R b
2d3837a4bded log: fix status template to list copy source per dest (issue5155)
Yuya Nishihara <yuya@tcha.org>
parents: 27749
diff changeset
600
2d3837a4bded log: fix status template to list copy source per dest (issue5155)
Yuya Nishihara <yuya@tcha.org>
parents: 27749
diff changeset
601
23402
2963d5c9d90b rename: properly report removed and added file as modified (issue4458)
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 23037
diff changeset
602 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
603 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
604
2963d5c9d90b rename: properly report removed and added file as modified (issue4458)
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 23037
diff changeset
605 $ 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
606 $ 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
607 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
608 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
609
29000
2d3837a4bded log: fix status template to list copy source per dest (issue5155)
Yuya Nishihara <yuya@tcha.org>
parents: 27749
diff changeset
610 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
611 $ 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
612 changeset: 1:6685fde43d21
2d3837a4bded log: fix status template to list copy source per dest (issue5155)
Yuya Nishihara <yuya@tcha.org>
parents: 27749
diff changeset
613 tag: tip
2d3837a4bded log: fix status template to list copy source per dest (issue5155)
Yuya Nishihara <yuya@tcha.org>
parents: 27749
diff changeset
614 user: test
2d3837a4bded log: fix status template to list copy source per dest (issue5155)
Yuya Nishihara <yuya@tcha.org>
parents: 27749
diff changeset
615 date: * (glob)
2d3837a4bded log: fix status template to list copy source per dest (issue5155)
Yuya Nishihara <yuya@tcha.org>
parents: 27749
diff changeset
616 summary: blah
2d3837a4bded log: fix status template to list copy source per dest (issue5155)
Yuya Nishihara <yuya@tcha.org>
parents: 27749
diff changeset
617 files:
2d3837a4bded log: fix status template to list copy source per dest (issue5155)
Yuya Nishihara <yuya@tcha.org>
parents: 27749
diff changeset
618 M a
2d3837a4bded log: fix status template to list copy source per dest (issue5155)
Yuya Nishihara <yuya@tcha.org>
parents: 27749
diff changeset
619 b
2d3837a4bded log: fix status template to list copy source per dest (issue5155)
Yuya Nishihara <yuya@tcha.org>
parents: 27749
diff changeset
620 R b
2d3837a4bded log: fix status template to list copy source per dest (issue5155)
Yuya Nishihara <yuya@tcha.org>
parents: 27749
diff changeset
621
2d3837a4bded log: fix status template to list copy source per dest (issue5155)
Yuya Nishihara <yuya@tcha.org>
parents: 27749
diff changeset
622
23402
2963d5c9d90b rename: properly report removed and added file as modified (issue4458)
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 23037
diff changeset
623 $ cd ..