Mercurial > hg
annotate tests/test-revert.t @ 50329:3dbc7b1ecaba stable
typing: correct the signature of error.CommandError
There's a place in `mercurial.dispatch._parse()` that passes None if a parse
error happens before the command can be parsed out, and casting the error to
bytes works fine because the command and message fields are apparently ignored.
Likewise, TortoiseHg similarly passes None for the same reason.
author | Matt Harbison <matt_harbison@yahoo.com> |
---|---|
date | Fri, 24 Mar 2023 02:22:12 -0400 |
parents | 42d2b31cee0b |
children |
rev | line source |
---|---|
12106
969176bec217
tests: unify test-revert
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
6110
diff
changeset
|
1 $ hg init repo |
969176bec217
tests: unify test-revert
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
6110
diff
changeset
|
2 $ cd repo |
969176bec217
tests: unify test-revert
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
6110
diff
changeset
|
3 $ echo 123 > a |
969176bec217
tests: unify test-revert
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
6110
diff
changeset
|
4 $ echo 123 > c |
969176bec217
tests: unify test-revert
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
6110
diff
changeset
|
5 $ echo 123 > e |
969176bec217
tests: unify test-revert
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
6110
diff
changeset
|
6 $ hg add a c e |
12156
4c94b6d0fb1c
tests: remove unneeded -d flags
Martin Geisler <mg@lazybytes.net>
parents:
12106
diff
changeset
|
7 $ hg commit -m "first" a c e |
14745
cae09a39b2d2
test-revert: add case for nothing changed
Adrian Buehlmann <adrian@cadifra.com>
parents:
14726
diff
changeset
|
8 |
cae09a39b2d2
test-revert: add case for nothing changed
Adrian Buehlmann <adrian@cadifra.com>
parents:
14726
diff
changeset
|
9 nothing changed |
cae09a39b2d2
test-revert: add case for nothing changed
Adrian Buehlmann <adrian@cadifra.com>
parents:
14726
diff
changeset
|
10 |
cae09a39b2d2
test-revert: add case for nothing changed
Adrian Buehlmann <adrian@cadifra.com>
parents:
14726
diff
changeset
|
11 $ hg revert |
cae09a39b2d2
test-revert: add case for nothing changed
Adrian Buehlmann <adrian@cadifra.com>
parents:
14726
diff
changeset
|
12 abort: no files or directories specified |
14755
6ba51c81ff75
revert: improve hints on abort when reverting to parent without --all
Adrian Buehlmann <adrian@cadifra.com>
parents:
14745
diff
changeset
|
13 (use --all to revert all files) |
45827
8d72e29ad1e0
errors: introduce InputError and use it from commands and cmdutil
Martin von Zweigbergk <martinvonz@google.com>
parents:
44724
diff
changeset
|
14 [10] |
14767
aab323df2c44
test-revert: add revert --all case when nothing changed
Adrian Buehlmann <adrian@cadifra.com>
parents:
14755
diff
changeset
|
15 $ hg revert --all |
14745
cae09a39b2d2
test-revert: add case for nothing changed
Adrian Buehlmann <adrian@cadifra.com>
parents:
14726
diff
changeset
|
16 |
22099
9ed5e1053303
test-revert: improve comment
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21579
diff
changeset
|
17 Introduce some changes and revert them |
9ed5e1053303
test-revert: improve comment
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21579
diff
changeset
|
18 -------------------------------------- |
9ed5e1053303
test-revert: improve comment
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21579
diff
changeset
|
19 |
12106
969176bec217
tests: unify test-revert
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
6110
diff
changeset
|
20 $ echo 123 > b |
969176bec217
tests: unify test-revert
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
6110
diff
changeset
|
21 |
969176bec217
tests: unify test-revert
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
6110
diff
changeset
|
22 $ hg status |
969176bec217
tests: unify test-revert
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
6110
diff
changeset
|
23 ? b |
969176bec217
tests: unify test-revert
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
6110
diff
changeset
|
24 $ echo 12 > c |
969176bec217
tests: unify test-revert
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
6110
diff
changeset
|
25 |
969176bec217
tests: unify test-revert
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
6110
diff
changeset
|
26 $ hg status |
969176bec217
tests: unify test-revert
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
6110
diff
changeset
|
27 M c |
969176bec217
tests: unify test-revert
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
6110
diff
changeset
|
28 ? b |
969176bec217
tests: unify test-revert
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
6110
diff
changeset
|
29 $ hg add b |
969176bec217
tests: unify test-revert
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
6110
diff
changeset
|
30 |
969176bec217
tests: unify test-revert
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
6110
diff
changeset
|
31 $ hg status |
969176bec217
tests: unify test-revert
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
6110
diff
changeset
|
32 M c |
969176bec217
tests: unify test-revert
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
6110
diff
changeset
|
33 A b |
969176bec217
tests: unify test-revert
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
6110
diff
changeset
|
34 $ hg rm a |
969176bec217
tests: unify test-revert
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
6110
diff
changeset
|
35 |
969176bec217
tests: unify test-revert
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
6110
diff
changeset
|
36 $ hg status |
969176bec217
tests: unify test-revert
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
6110
diff
changeset
|
37 M c |
969176bec217
tests: unify test-revert
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
6110
diff
changeset
|
38 A b |
969176bec217
tests: unify test-revert
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
6110
diff
changeset
|
39 R a |
22099
9ed5e1053303
test-revert: improve comment
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21579
diff
changeset
|
40 |
9ed5e1053303
test-revert: improve comment
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21579
diff
changeset
|
41 revert removal of a file |
9ed5e1053303
test-revert: improve comment
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21579
diff
changeset
|
42 |
12106
969176bec217
tests: unify test-revert
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
6110
diff
changeset
|
43 $ hg revert a |
969176bec217
tests: unify test-revert
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
6110
diff
changeset
|
44 $ hg status |
969176bec217
tests: unify test-revert
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
6110
diff
changeset
|
45 M c |
969176bec217
tests: unify test-revert
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
6110
diff
changeset
|
46 A b |
22099
9ed5e1053303
test-revert: improve comment
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21579
diff
changeset
|
47 |
9ed5e1053303
test-revert: improve comment
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21579
diff
changeset
|
48 revert addition of a file |
9ed5e1053303
test-revert: improve comment
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21579
diff
changeset
|
49 |
12106
969176bec217
tests: unify test-revert
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
6110
diff
changeset
|
50 $ hg revert b |
969176bec217
tests: unify test-revert
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
6110
diff
changeset
|
51 $ hg status |
969176bec217
tests: unify test-revert
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
6110
diff
changeset
|
52 M c |
969176bec217
tests: unify test-revert
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
6110
diff
changeset
|
53 ? b |
22099
9ed5e1053303
test-revert: improve comment
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21579
diff
changeset
|
54 |
9ed5e1053303
test-revert: improve comment
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21579
diff
changeset
|
55 revert modification of a file (--no-backup) |
9ed5e1053303
test-revert: improve comment
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21579
diff
changeset
|
56 |
12106
969176bec217
tests: unify test-revert
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
6110
diff
changeset
|
57 $ hg revert --no-backup c |
969176bec217
tests: unify test-revert
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
6110
diff
changeset
|
58 $ hg status |
969176bec217
tests: unify test-revert
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
6110
diff
changeset
|
59 ? b |
22099
9ed5e1053303
test-revert: improve comment
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21579
diff
changeset
|
60 |
9ed5e1053303
test-revert: improve comment
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21579
diff
changeset
|
61 revert deletion (! status) of a added file |
9ed5e1053303
test-revert: improve comment
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21579
diff
changeset
|
62 ------------------------------------------ |
9ed5e1053303
test-revert: improve comment
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21579
diff
changeset
|
63 |
12106
969176bec217
tests: unify test-revert
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
6110
diff
changeset
|
64 $ hg add b |
969176bec217
tests: unify test-revert
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
6110
diff
changeset
|
65 |
969176bec217
tests: unify test-revert
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
6110
diff
changeset
|
66 $ hg status b |
969176bec217
tests: unify test-revert
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
6110
diff
changeset
|
67 A b |
969176bec217
tests: unify test-revert
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
6110
diff
changeset
|
68 $ rm b |
969176bec217
tests: unify test-revert
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
6110
diff
changeset
|
69 $ hg status b |
969176bec217
tests: unify test-revert
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
6110
diff
changeset
|
70 ! b |
969176bec217
tests: unify test-revert
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
6110
diff
changeset
|
71 $ hg revert -v b |
969176bec217
tests: unify test-revert
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
6110
diff
changeset
|
72 forgetting b |
969176bec217
tests: unify test-revert
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
6110
diff
changeset
|
73 $ hg status b |
15521
117f9190c1ba
tests: hide 'No such file or directory' messages
Mads Kiilerich <mads@kiilerich.com>
parents:
15447
diff
changeset
|
74 b: * (glob) |
12106
969176bec217
tests: unify test-revert
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
6110
diff
changeset
|
75 |
44724
5c2a4f37eace
tests: deal with "ls" vs "ls -A" difference on 2BSD derived systems
Joerg Sonnenberger <joerg@bec.de>
parents:
41605
diff
changeset
|
76 $ ls -A |
5c2a4f37eace
tests: deal with "ls" vs "ls -A" difference on 2BSD derived systems
Joerg Sonnenberger <joerg@bec.de>
parents:
41605
diff
changeset
|
77 .hg |
12106
969176bec217
tests: unify test-revert
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
6110
diff
changeset
|
78 a |
969176bec217
tests: unify test-revert
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
6110
diff
changeset
|
79 c |
969176bec217
tests: unify test-revert
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
6110
diff
changeset
|
80 e |
969176bec217
tests: unify test-revert
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
6110
diff
changeset
|
81 |
22099
9ed5e1053303
test-revert: improve comment
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21579
diff
changeset
|
82 Test creation of backup (.orig) files |
9ed5e1053303
test-revert: improve comment
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21579
diff
changeset
|
83 ------------------------------------- |
12106
969176bec217
tests: unify test-revert
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
6110
diff
changeset
|
84 |
969176bec217
tests: unify test-revert
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
6110
diff
changeset
|
85 $ echo z > e |
969176bec217
tests: unify test-revert
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
6110
diff
changeset
|
86 $ hg revert --all -v |
969176bec217
tests: unify test-revert
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
6110
diff
changeset
|
87 saving current version of e as e.orig |
969176bec217
tests: unify test-revert
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
6110
diff
changeset
|
88 reverting e |
969176bec217
tests: unify test-revert
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
6110
diff
changeset
|
89 |
26938
080276d377d9
revert: allow configuring the .orig file location
Christian Delahousse <cdelahousse@fb.com>
parents:
25753
diff
changeset
|
90 Test creation of backup (.orig) file in configured file location |
080276d377d9
revert: allow configuring the .orig file location
Christian Delahousse <cdelahousse@fb.com>
parents:
25753
diff
changeset
|
91 ---------------------------------------------------------------- |
080276d377d9
revert: allow configuring the .orig file location
Christian Delahousse <cdelahousse@fb.com>
parents:
25753
diff
changeset
|
92 |
080276d377d9
revert: allow configuring the .orig file location
Christian Delahousse <cdelahousse@fb.com>
parents:
25753
diff
changeset
|
93 $ echo z > e |
080276d377d9
revert: allow configuring the .orig file location
Christian Delahousse <cdelahousse@fb.com>
parents:
25753
diff
changeset
|
94 $ hg revert --all -v --config 'ui.origbackuppath=.hg/origbackups' |
35393
4441705b7111
tests: remove (glob) annotations that were only for '\' matches
Matt Harbison <matt_harbison@yahoo.com>
parents:
34146
diff
changeset
|
95 creating directory: $TESTTMP/repo/.hg/origbackups |
41591
4d4842445afc
revert: always show relative path to .orig backup
Martin von Zweigbergk <martinvonz@google.com>
parents:
39740
diff
changeset
|
96 saving current version of e as .hg/origbackups/e |
26938
080276d377d9
revert: allow configuring the .orig file location
Christian Delahousse <cdelahousse@fb.com>
parents:
25753
diff
changeset
|
97 reverting e |
080276d377d9
revert: allow configuring the .orig file location
Christian Delahousse <cdelahousse@fb.com>
parents:
25753
diff
changeset
|
98 $ rm -rf .hg/origbackups |
080276d377d9
revert: allow configuring the .orig file location
Christian Delahousse <cdelahousse@fb.com>
parents:
25753
diff
changeset
|
99 |
22099
9ed5e1053303
test-revert: improve comment
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21579
diff
changeset
|
100 revert on clean file (no change) |
9ed5e1053303
test-revert: improve comment
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21579
diff
changeset
|
101 -------------------------------- |
12106
969176bec217
tests: unify test-revert
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
6110
diff
changeset
|
102 |
969176bec217
tests: unify test-revert
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
6110
diff
changeset
|
103 $ hg revert a |
969176bec217
tests: unify test-revert
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
6110
diff
changeset
|
104 no changes needed to a |
969176bec217
tests: unify test-revert
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
6110
diff
changeset
|
105 |
22099
9ed5e1053303
test-revert: improve comment
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21579
diff
changeset
|
106 revert on an untracked file |
9ed5e1053303
test-revert: improve comment
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21579
diff
changeset
|
107 --------------------------- |
12106
969176bec217
tests: unify test-revert
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
6110
diff
changeset
|
108 |
969176bec217
tests: unify test-revert
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
6110
diff
changeset
|
109 $ echo q > q |
969176bec217
tests: unify test-revert
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
6110
diff
changeset
|
110 $ hg revert q |
969176bec217
tests: unify test-revert
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
6110
diff
changeset
|
111 file not managed: q |
969176bec217
tests: unify test-revert
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
6110
diff
changeset
|
112 $ rm q |
969176bec217
tests: unify test-revert
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
6110
diff
changeset
|
113 |
22099
9ed5e1053303
test-revert: improve comment
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21579
diff
changeset
|
114 revert on file that does not exists |
9ed5e1053303
test-revert: improve comment
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21579
diff
changeset
|
115 ----------------------------------- |
12106
969176bec217
tests: unify test-revert
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
6110
diff
changeset
|
116 |
969176bec217
tests: unify test-revert
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
6110
diff
changeset
|
117 $ hg revert notfound |
12156
4c94b6d0fb1c
tests: remove unneeded -d flags
Martin Geisler <mg@lazybytes.net>
parents:
12106
diff
changeset
|
118 notfound: no such file in rev 334a9e57682c |
12106
969176bec217
tests: unify test-revert
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
6110
diff
changeset
|
119 $ touch d |
969176bec217
tests: unify test-revert
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
6110
diff
changeset
|
120 $ hg add d |
969176bec217
tests: unify test-revert
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
6110
diff
changeset
|
121 $ hg rm a |
12156
4c94b6d0fb1c
tests: remove unneeded -d flags
Martin Geisler <mg@lazybytes.net>
parents:
12106
diff
changeset
|
122 $ hg commit -m "second" |
12106
969176bec217
tests: unify test-revert
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
6110
diff
changeset
|
123 $ echo z > z |
969176bec217
tests: unify test-revert
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
6110
diff
changeset
|
124 $ hg add z |
969176bec217
tests: unify test-revert
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
6110
diff
changeset
|
125 $ hg st |
969176bec217
tests: unify test-revert
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
6110
diff
changeset
|
126 A z |
969176bec217
tests: unify test-revert
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
6110
diff
changeset
|
127 ? e.orig |
969176bec217
tests: unify test-revert
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
6110
diff
changeset
|
128 |
22099
9ed5e1053303
test-revert: improve comment
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21579
diff
changeset
|
129 revert to another revision (--rev) |
9ed5e1053303
test-revert: improve comment
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21579
diff
changeset
|
130 ---------------------------------- |
12106
969176bec217
tests: unify test-revert
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
6110
diff
changeset
|
131 |
969176bec217
tests: unify test-revert
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
6110
diff
changeset
|
132 $ hg revert --all -r0 |
39405
cb70501d8b71
revert: fix the inconsistency of status msgs in --interactive mode
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
35393
diff
changeset
|
133 forgetting z |
12106
969176bec217
tests: unify test-revert
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
6110
diff
changeset
|
134 removing d |
39405
cb70501d8b71
revert: fix the inconsistency of status msgs in --interactive mode
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
35393
diff
changeset
|
135 adding a |
12106
969176bec217
tests: unify test-revert
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
6110
diff
changeset
|
136 |
22099
9ed5e1053303
test-revert: improve comment
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21579
diff
changeset
|
137 revert explicitly to parent (--rev) |
9ed5e1053303
test-revert: improve comment
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21579
diff
changeset
|
138 ----------------------------------- |
12106
969176bec217
tests: unify test-revert
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
6110
diff
changeset
|
139 |
969176bec217
tests: unify test-revert
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
6110
diff
changeset
|
140 $ hg revert --all -rtip |
969176bec217
tests: unify test-revert
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
6110
diff
changeset
|
141 forgetting a |
969176bec217
tests: unify test-revert
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
6110
diff
changeset
|
142 undeleting d |
969176bec217
tests: unify test-revert
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
6110
diff
changeset
|
143 $ rm a *.orig |
969176bec217
tests: unify test-revert
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
6110
diff
changeset
|
144 |
22099
9ed5e1053303
test-revert: improve comment
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21579
diff
changeset
|
145 revert to another revision (--rev) and exact match |
9ed5e1053303
test-revert: improve comment
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21579
diff
changeset
|
146 -------------------------------------------------- |
9ed5e1053303
test-revert: improve comment
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21579
diff
changeset
|
147 |
9ed5e1053303
test-revert: improve comment
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21579
diff
changeset
|
148 exact match are more silent |
1447
508a3f559553
revert added and removed files to their normal state before reverting
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
diff
changeset
|
149 |
12106
969176bec217
tests: unify test-revert
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
6110
diff
changeset
|
150 $ hg revert -r0 a |
969176bec217
tests: unify test-revert
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
6110
diff
changeset
|
151 $ hg st a |
969176bec217
tests: unify test-revert
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
6110
diff
changeset
|
152 A a |
969176bec217
tests: unify test-revert
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
6110
diff
changeset
|
153 $ hg rm d |
969176bec217
tests: unify test-revert
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
6110
diff
changeset
|
154 $ hg st d |
969176bec217
tests: unify test-revert
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
6110
diff
changeset
|
155 R d |
969176bec217
tests: unify test-revert
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
6110
diff
changeset
|
156 |
22156
03a45eff9d2b
revert: issue "no changes needed" message for files missing on both side
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
22144
diff
changeset
|
157 should keep d removed |
12106
969176bec217
tests: unify test-revert
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
6110
diff
changeset
|
158 |
969176bec217
tests: unify test-revert
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
6110
diff
changeset
|
159 $ hg revert -r0 d |
22156
03a45eff9d2b
revert: issue "no changes needed" message for files missing on both side
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
22144
diff
changeset
|
160 no changes needed to d |
12106
969176bec217
tests: unify test-revert
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
6110
diff
changeset
|
161 $ hg st d |
969176bec217
tests: unify test-revert
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
6110
diff
changeset
|
162 R d |
2157
1e82f2337498
make test-revert check executable bit.
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
2043
diff
changeset
|
163 |
12106
969176bec217
tests: unify test-revert
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
6110
diff
changeset
|
164 $ hg update -C |
969176bec217
tests: unify test-revert
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
6110
diff
changeset
|
165 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
22099
9ed5e1053303
test-revert: improve comment
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21579
diff
changeset
|
166 |
9ed5e1053303
test-revert: improve comment
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21579
diff
changeset
|
167 revert of exec bit |
9ed5e1053303
test-revert: improve comment
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21579
diff
changeset
|
168 ------------------ |
9ed5e1053303
test-revert: improve comment
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21579
diff
changeset
|
169 |
16886
8c1cf3e3fe42
test-revert: enable for Windows
Adrian Buehlmann <adrian@cadifra.com>
parents:
15521
diff
changeset
|
170 #if execbit |
12106
969176bec217
tests: unify test-revert
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
6110
diff
changeset
|
171 $ chmod +x c |
969176bec217
tests: unify test-revert
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
6110
diff
changeset
|
172 $ hg revert --all |
969176bec217
tests: unify test-revert
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
6110
diff
changeset
|
173 reverting c |
969176bec217
tests: unify test-revert
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
6110
diff
changeset
|
174 |
969176bec217
tests: unify test-revert
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
6110
diff
changeset
|
175 $ test -x c || echo non-executable |
969176bec217
tests: unify test-revert
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
6110
diff
changeset
|
176 non-executable |
969176bec217
tests: unify test-revert
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
6110
diff
changeset
|
177 |
969176bec217
tests: unify test-revert
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
6110
diff
changeset
|
178 $ chmod +x c |
12156
4c94b6d0fb1c
tests: remove unneeded -d flags
Martin Geisler <mg@lazybytes.net>
parents:
12106
diff
changeset
|
179 $ hg commit -m exe |
2157
1e82f2337498
make test-revert check executable bit.
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
2043
diff
changeset
|
180 |
12106
969176bec217
tests: unify test-revert
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
6110
diff
changeset
|
181 $ chmod -x c |
969176bec217
tests: unify test-revert
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
6110
diff
changeset
|
182 $ hg revert --all |
969176bec217
tests: unify test-revert
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
6110
diff
changeset
|
183 reverting c |
969176bec217
tests: unify test-revert
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
6110
diff
changeset
|
184 |
969176bec217
tests: unify test-revert
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
6110
diff
changeset
|
185 $ test -x c && echo executable |
969176bec217
tests: unify test-revert
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
6110
diff
changeset
|
186 executable |
16886
8c1cf3e3fe42
test-revert: enable for Windows
Adrian Buehlmann <adrian@cadifra.com>
parents:
15521
diff
changeset
|
187 #endif |
12106
969176bec217
tests: unify test-revert
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
6110
diff
changeset
|
188 |
25753
fe03f522dda9
context: write dirstate out explicitly after marking files as clean
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
25382
diff
changeset
|
189 Test that files reverted to other than the parent are treated as |
fe03f522dda9
context: write dirstate out explicitly after marking files as clean
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
25382
diff
changeset
|
190 "modified", even if none of mode, size and timestamp of it isn't |
fe03f522dda9
context: write dirstate out explicitly after marking files as clean
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
25382
diff
changeset
|
191 changed on the filesystem (see also issue4583). |
fe03f522dda9
context: write dirstate out explicitly after marking files as clean
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
25382
diff
changeset
|
192 |
fe03f522dda9
context: write dirstate out explicitly after marking files as clean
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
25382
diff
changeset
|
193 $ echo 321 > e |
fe03f522dda9
context: write dirstate out explicitly after marking files as clean
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
25382
diff
changeset
|
194 $ hg diff --git |
fe03f522dda9
context: write dirstate out explicitly after marking files as clean
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
25382
diff
changeset
|
195 diff --git a/e b/e |
fe03f522dda9
context: write dirstate out explicitly after marking files as clean
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
25382
diff
changeset
|
196 --- a/e |
fe03f522dda9
context: write dirstate out explicitly after marking files as clean
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
25382
diff
changeset
|
197 +++ b/e |
fe03f522dda9
context: write dirstate out explicitly after marking files as clean
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
25382
diff
changeset
|
198 @@ -1,1 +1,1 @@ |
fe03f522dda9
context: write dirstate out explicitly after marking files as clean
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
25382
diff
changeset
|
199 -123 |
fe03f522dda9
context: write dirstate out explicitly after marking files as clean
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
25382
diff
changeset
|
200 +321 |
fe03f522dda9
context: write dirstate out explicitly after marking files as clean
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
25382
diff
changeset
|
201 $ hg commit -m 'ambiguity from size' |
fe03f522dda9
context: write dirstate out explicitly after marking files as clean
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
25382
diff
changeset
|
202 |
fe03f522dda9
context: write dirstate out explicitly after marking files as clean
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
25382
diff
changeset
|
203 $ cat e |
fe03f522dda9
context: write dirstate out explicitly after marking files as clean
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
25382
diff
changeset
|
204 321 |
fe03f522dda9
context: write dirstate out explicitly after marking files as clean
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
25382
diff
changeset
|
205 $ touch -t 200001010000 e |
fe03f522dda9
context: write dirstate out explicitly after marking files as clean
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
25382
diff
changeset
|
206 $ hg debugrebuildstate |
fe03f522dda9
context: write dirstate out explicitly after marking files as clean
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
25382
diff
changeset
|
207 |
fe03f522dda9
context: write dirstate out explicitly after marking files as clean
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
25382
diff
changeset
|
208 $ cat >> .hg/hgrc <<EOF |
fe03f522dda9
context: write dirstate out explicitly after marking files as clean
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
25382
diff
changeset
|
209 > [fakedirstatewritetime] |
fe03f522dda9
context: write dirstate out explicitly after marking files as clean
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
25382
diff
changeset
|
210 > # emulate invoking dirstate.write() via repo.status() |
fe03f522dda9
context: write dirstate out explicitly after marking files as clean
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
25382
diff
changeset
|
211 > # at 2000-01-01 00:00 |
fe03f522dda9
context: write dirstate out explicitly after marking files as clean
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
25382
diff
changeset
|
212 > fakenow = 200001010000 |
fe03f522dda9
context: write dirstate out explicitly after marking files as clean
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
25382
diff
changeset
|
213 > |
fe03f522dda9
context: write dirstate out explicitly after marking files as clean
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
25382
diff
changeset
|
214 > [extensions] |
fe03f522dda9
context: write dirstate out explicitly after marking files as clean
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
25382
diff
changeset
|
215 > fakedirstatewritetime = $TESTDIR/fakedirstatewritetime.py |
fe03f522dda9
context: write dirstate out explicitly after marking files as clean
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
25382
diff
changeset
|
216 > EOF |
fe03f522dda9
context: write dirstate out explicitly after marking files as clean
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
25382
diff
changeset
|
217 $ hg revert -r 0 e |
fe03f522dda9
context: write dirstate out explicitly after marking files as clean
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
25382
diff
changeset
|
218 $ cat >> .hg/hgrc <<EOF |
fe03f522dda9
context: write dirstate out explicitly after marking files as clean
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
25382
diff
changeset
|
219 > [extensions] |
fe03f522dda9
context: write dirstate out explicitly after marking files as clean
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
25382
diff
changeset
|
220 > fakedirstatewritetime = ! |
fe03f522dda9
context: write dirstate out explicitly after marking files as clean
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
25382
diff
changeset
|
221 > EOF |
fe03f522dda9
context: write dirstate out explicitly after marking files as clean
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
25382
diff
changeset
|
222 |
fe03f522dda9
context: write dirstate out explicitly after marking files as clean
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
25382
diff
changeset
|
223 $ cat e |
fe03f522dda9
context: write dirstate out explicitly after marking files as clean
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
25382
diff
changeset
|
224 123 |
fe03f522dda9
context: write dirstate out explicitly after marking files as clean
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
25382
diff
changeset
|
225 $ touch -t 200001010000 e |
fe03f522dda9
context: write dirstate out explicitly after marking files as clean
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
25382
diff
changeset
|
226 $ hg status -A e |
fe03f522dda9
context: write dirstate out explicitly after marking files as clean
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
25382
diff
changeset
|
227 M e |
fe03f522dda9
context: write dirstate out explicitly after marking files as clean
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
25382
diff
changeset
|
228 |
12106
969176bec217
tests: unify test-revert
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
6110
diff
changeset
|
229 $ cd .. |
969176bec217
tests: unify test-revert
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
6110
diff
changeset
|
230 |
969176bec217
tests: unify test-revert
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
6110
diff
changeset
|
231 |
12399
4fee1fd3de9a
tests: added a short description to issue numbers
Martin Geisler <mg@aragost.com>
parents:
12316
diff
changeset
|
232 Issue241: update and revert produces inconsistent repositories |
22099
9ed5e1053303
test-revert: improve comment
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21579
diff
changeset
|
233 -------------------------------------------------------------- |
2982
890e285c52a1
revert: require --all to revert all files.
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
2272
diff
changeset
|
234 |
12106
969176bec217
tests: unify test-revert
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
6110
diff
changeset
|
235 $ hg init a |
969176bec217
tests: unify test-revert
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
6110
diff
changeset
|
236 $ cd a |
969176bec217
tests: unify test-revert
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
6110
diff
changeset
|
237 $ echo a >> a |
969176bec217
tests: unify test-revert
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
6110
diff
changeset
|
238 $ hg commit -A -d '1 0' -m a |
969176bec217
tests: unify test-revert
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
6110
diff
changeset
|
239 adding a |
969176bec217
tests: unify test-revert
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
6110
diff
changeset
|
240 $ echo a >> a |
969176bec217
tests: unify test-revert
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
6110
diff
changeset
|
241 $ hg commit -d '2 0' -m a |
969176bec217
tests: unify test-revert
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
6110
diff
changeset
|
242 $ hg update 0 |
969176bec217
tests: unify test-revert
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
6110
diff
changeset
|
243 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
969176bec217
tests: unify test-revert
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
6110
diff
changeset
|
244 $ mkdir b |
969176bec217
tests: unify test-revert
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
6110
diff
changeset
|
245 $ echo b > b/b |
2272
e9a0ed9ed4d9
revert: fix corner case found by faheem mitha.
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
2157
diff
changeset
|
246 |
22099
9ed5e1053303
test-revert: improve comment
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21579
diff
changeset
|
247 call `hg revert` with no file specified |
9ed5e1053303
test-revert: improve comment
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21579
diff
changeset
|
248 --------------------------------------- |
12106
969176bec217
tests: unify test-revert
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
6110
diff
changeset
|
249 |
969176bec217
tests: unify test-revert
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
6110
diff
changeset
|
250 $ hg revert -rtip |
14542
afe0d4c24866
revert: drop requirement to use -r to revert with two parents
Matt Mackall <mpm@selenic.com>
parents:
12399
diff
changeset
|
251 abort: no files or directories specified |
14726
e0039716f3ea
revert: mention update in hint of abort when reverting to non-parent
Adrian Buehlmann <adrian@cadifra.com>
parents:
14713
diff
changeset
|
252 (use --all to revert all files, or 'hg update 1' to update) |
45827
8d72e29ad1e0
errors: introduce InputError and use it from commands and cmdutil
Martin von Zweigbergk <martinvonz@google.com>
parents:
44724
diff
changeset
|
253 [10] |
12106
969176bec217
tests: unify test-revert
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
6110
diff
changeset
|
254 |
24841
45bd336e3991
revert: accept just -I/-X without paths or -a/-i (issue4592)
Martin von Zweigbergk <martinvonz@google.com>
parents:
23730
diff
changeset
|
255 call `hg revert` with -I |
45bd336e3991
revert: accept just -I/-X without paths or -a/-i (issue4592)
Martin von Zweigbergk <martinvonz@google.com>
parents:
23730
diff
changeset
|
256 --------------------------- |
45bd336e3991
revert: accept just -I/-X without paths or -a/-i (issue4592)
Martin von Zweigbergk <martinvonz@google.com>
parents:
23730
diff
changeset
|
257 |
45bd336e3991
revert: accept just -I/-X without paths or -a/-i (issue4592)
Martin von Zweigbergk <martinvonz@google.com>
parents:
23730
diff
changeset
|
258 $ echo a >> a |
45bd336e3991
revert: accept just -I/-X without paths or -a/-i (issue4592)
Martin von Zweigbergk <martinvonz@google.com>
parents:
23730
diff
changeset
|
259 $ hg revert -I a |
45bd336e3991
revert: accept just -I/-X without paths or -a/-i (issue4592)
Martin von Zweigbergk <martinvonz@google.com>
parents:
23730
diff
changeset
|
260 reverting a |
45bd336e3991
revert: accept just -I/-X without paths or -a/-i (issue4592)
Martin von Zweigbergk <martinvonz@google.com>
parents:
23730
diff
changeset
|
261 |
45bd336e3991
revert: accept just -I/-X without paths or -a/-i (issue4592)
Martin von Zweigbergk <martinvonz@google.com>
parents:
23730
diff
changeset
|
262 call `hg revert` with -X |
45bd336e3991
revert: accept just -I/-X without paths or -a/-i (issue4592)
Martin von Zweigbergk <martinvonz@google.com>
parents:
23730
diff
changeset
|
263 --------------------------- |
45bd336e3991
revert: accept just -I/-X without paths or -a/-i (issue4592)
Martin von Zweigbergk <martinvonz@google.com>
parents:
23730
diff
changeset
|
264 |
45bd336e3991
revert: accept just -I/-X without paths or -a/-i (issue4592)
Martin von Zweigbergk <martinvonz@google.com>
parents:
23730
diff
changeset
|
265 $ echo a >> a |
45bd336e3991
revert: accept just -I/-X without paths or -a/-i (issue4592)
Martin von Zweigbergk <martinvonz@google.com>
parents:
23730
diff
changeset
|
266 $ hg revert -X d |
45bd336e3991
revert: accept just -I/-X without paths or -a/-i (issue4592)
Martin von Zweigbergk <martinvonz@google.com>
parents:
23730
diff
changeset
|
267 reverting a |
45bd336e3991
revert: accept just -I/-X without paths or -a/-i (issue4592)
Martin von Zweigbergk <martinvonz@google.com>
parents:
23730
diff
changeset
|
268 |
22099
9ed5e1053303
test-revert: improve comment
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21579
diff
changeset
|
269 call `hg revert` with --all |
9ed5e1053303
test-revert: improve comment
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21579
diff
changeset
|
270 --------------------------- |
12106
969176bec217
tests: unify test-revert
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
6110
diff
changeset
|
271 |
969176bec217
tests: unify test-revert
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
6110
diff
changeset
|
272 $ hg revert --all -rtip |
969176bec217
tests: unify test-revert
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
6110
diff
changeset
|
273 reverting a |
24841
45bd336e3991
revert: accept just -I/-X without paths or -a/-i (issue4592)
Martin von Zweigbergk <martinvonz@google.com>
parents:
23730
diff
changeset
|
274 $ rm *.orig |
12106
969176bec217
tests: unify test-revert
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
6110
diff
changeset
|
275 |
12399
4fee1fd3de9a
tests: added a short description to issue numbers
Martin Geisler <mg@aragost.com>
parents:
12316
diff
changeset
|
276 Issue332: confusing message when reverting directory |
22099
9ed5e1053303
test-revert: improve comment
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21579
diff
changeset
|
277 ---------------------------------------------------- |
2982
890e285c52a1
revert: require --all to revert all files.
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
2272
diff
changeset
|
278 |
12156
4c94b6d0fb1c
tests: remove unneeded -d flags
Martin Geisler <mg@lazybytes.net>
parents:
12106
diff
changeset
|
279 $ hg ci -A -m b |
12106
969176bec217
tests: unify test-revert
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
6110
diff
changeset
|
280 adding b/b |
969176bec217
tests: unify test-revert
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
6110
diff
changeset
|
281 created new head |
969176bec217
tests: unify test-revert
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
6110
diff
changeset
|
282 $ echo foobar > b/b |
969176bec217
tests: unify test-revert
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
6110
diff
changeset
|
283 $ mkdir newdir |
969176bec217
tests: unify test-revert
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
6110
diff
changeset
|
284 $ echo foo > newdir/newfile |
969176bec217
tests: unify test-revert
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
6110
diff
changeset
|
285 $ hg add newdir/newfile |
969176bec217
tests: unify test-revert
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
6110
diff
changeset
|
286 $ hg revert b newdir |
39405
cb70501d8b71
revert: fix the inconsistency of status msgs in --interactive mode
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
35393
diff
changeset
|
287 forgetting newdir/newfile |
35393
4441705b7111
tests: remove (glob) annotations that were only for '\' matches
Matt Harbison <matt_harbison@yahoo.com>
parents:
34146
diff
changeset
|
288 reverting b/b |
12106
969176bec217
tests: unify test-revert
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
6110
diff
changeset
|
289 $ echo foobar > b/b |
969176bec217
tests: unify test-revert
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
6110
diff
changeset
|
290 $ hg revert . |
35393
4441705b7111
tests: remove (glob) annotations that were only for '\' matches
Matt Harbison <matt_harbison@yahoo.com>
parents:
34146
diff
changeset
|
291 reverting b/b |
12106
969176bec217
tests: unify test-revert
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
6110
diff
changeset
|
292 |
41605
7068c6b0114b
revert: respect ui.relative-paths
Martin von Zweigbergk <martinvonz@google.com>
parents:
41591
diff
changeset
|
293 respects ui.relative-paths |
7068c6b0114b
revert: respect ui.relative-paths
Martin von Zweigbergk <martinvonz@google.com>
parents:
41591
diff
changeset
|
294 -------------------------- |
7068c6b0114b
revert: respect ui.relative-paths
Martin von Zweigbergk <martinvonz@google.com>
parents:
41591
diff
changeset
|
295 |
7068c6b0114b
revert: respect ui.relative-paths
Martin von Zweigbergk <martinvonz@google.com>
parents:
41591
diff
changeset
|
296 $ echo foo > newdir/newfile |
7068c6b0114b
revert: respect ui.relative-paths
Martin von Zweigbergk <martinvonz@google.com>
parents:
41591
diff
changeset
|
297 $ hg add newdir/newfile |
7068c6b0114b
revert: respect ui.relative-paths
Martin von Zweigbergk <martinvonz@google.com>
parents:
41591
diff
changeset
|
298 $ hg revert --all --cwd newdir |
7068c6b0114b
revert: respect ui.relative-paths
Martin von Zweigbergk <martinvonz@google.com>
parents:
41591
diff
changeset
|
299 forgetting newfile |
7068c6b0114b
revert: respect ui.relative-paths
Martin von Zweigbergk <martinvonz@google.com>
parents:
41591
diff
changeset
|
300 |
7068c6b0114b
revert: respect ui.relative-paths
Martin von Zweigbergk <martinvonz@google.com>
parents:
41591
diff
changeset
|
301 $ echo foo > newdir/newfile |
7068c6b0114b
revert: respect ui.relative-paths
Martin von Zweigbergk <martinvonz@google.com>
parents:
41591
diff
changeset
|
302 $ hg add newdir/newfile |
7068c6b0114b
revert: respect ui.relative-paths
Martin von Zweigbergk <martinvonz@google.com>
parents:
41591
diff
changeset
|
303 $ hg revert --all --cwd newdir --config ui.relative-paths=True |
7068c6b0114b
revert: respect ui.relative-paths
Martin von Zweigbergk <martinvonz@google.com>
parents:
41591
diff
changeset
|
304 forgetting newfile |
7068c6b0114b
revert: respect ui.relative-paths
Martin von Zweigbergk <martinvonz@google.com>
parents:
41591
diff
changeset
|
305 |
7068c6b0114b
revert: respect ui.relative-paths
Martin von Zweigbergk <martinvonz@google.com>
parents:
41591
diff
changeset
|
306 $ echo foo > newdir/newfile |
7068c6b0114b
revert: respect ui.relative-paths
Martin von Zweigbergk <martinvonz@google.com>
parents:
41591
diff
changeset
|
307 $ hg add newdir/newfile |
7068c6b0114b
revert: respect ui.relative-paths
Martin von Zweigbergk <martinvonz@google.com>
parents:
41591
diff
changeset
|
308 $ hg revert --all --cwd newdir --config ui.relative-paths=False |
7068c6b0114b
revert: respect ui.relative-paths
Martin von Zweigbergk <martinvonz@google.com>
parents:
41591
diff
changeset
|
309 forgetting newdir/newfile |
5230
bfd73b567b3d
When reverting a file which was renamed, also revert the old name
Brendan Cully <brendan@kublai.com>
parents:
4237
diff
changeset
|
310 |
12106
969176bec217
tests: unify test-revert
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
6110
diff
changeset
|
311 reverting a rename target should revert the source |
22099
9ed5e1053303
test-revert: improve comment
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21579
diff
changeset
|
312 -------------------------------------------------- |
12106
969176bec217
tests: unify test-revert
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
6110
diff
changeset
|
313 |
969176bec217
tests: unify test-revert
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
6110
diff
changeset
|
314 $ hg mv a newa |
969176bec217
tests: unify test-revert
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
6110
diff
changeset
|
315 $ hg revert newa |
969176bec217
tests: unify test-revert
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
6110
diff
changeset
|
316 $ hg st a newa |
969176bec217
tests: unify test-revert
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
6110
diff
changeset
|
317 ? newa |
5230
bfd73b567b3d
When reverting a file which was renamed, also revert the old name
Brendan Cully <brendan@kublai.com>
parents:
4237
diff
changeset
|
318 |
23403
edf29f9c15f0
revert: look for copy information for all local modifications
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
22611
diff
changeset
|
319 Also true for move overwriting an existing file |
edf29f9c15f0
revert: look for copy information for all local modifications
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
22611
diff
changeset
|
320 |
edf29f9c15f0
revert: look for copy information for all local modifications
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
22611
diff
changeset
|
321 $ hg mv --force a b/b |
edf29f9c15f0
revert: look for copy information for all local modifications
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
22611
diff
changeset
|
322 $ hg revert b/b |
48384
9f1b9e128788
dirstate: do no use `set_clean` in revert
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
45827
diff
changeset
|
323 $ hg status a b/b --copies |
23403
edf29f9c15f0
revert: look for copy information for all local modifications
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
22611
diff
changeset
|
324 |
12106
969176bec217
tests: unify test-revert
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
6110
diff
changeset
|
325 $ cd .. |
6031
7383384793fb
revert: don't assume ignored files will be returned in the unknown list
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
5230
diff
changeset
|
326 |
12106
969176bec217
tests: unify test-revert
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
6110
diff
changeset
|
327 $ hg init ignored |
969176bec217
tests: unify test-revert
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
6110
diff
changeset
|
328 $ cd ignored |
969176bec217
tests: unify test-revert
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
6110
diff
changeset
|
329 $ echo '^ignored$' > .hgignore |
969176bec217
tests: unify test-revert
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
6110
diff
changeset
|
330 $ echo '^ignoreddir$' >> .hgignore |
969176bec217
tests: unify test-revert
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
6110
diff
changeset
|
331 $ echo '^removed$' >> .hgignore |
6031
7383384793fb
revert: don't assume ignored files will be returned in the unknown list
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
5230
diff
changeset
|
332 |
12106
969176bec217
tests: unify test-revert
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
6110
diff
changeset
|
333 $ mkdir ignoreddir |
969176bec217
tests: unify test-revert
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
6110
diff
changeset
|
334 $ touch ignoreddir/file |
969176bec217
tests: unify test-revert
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
6110
diff
changeset
|
335 $ touch ignoreddir/removed |
969176bec217
tests: unify test-revert
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
6110
diff
changeset
|
336 $ touch ignored |
969176bec217
tests: unify test-revert
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
6110
diff
changeset
|
337 $ touch removed |
969176bec217
tests: unify test-revert
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
6110
diff
changeset
|
338 |
969176bec217
tests: unify test-revert
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
6110
diff
changeset
|
339 4 ignored files (we will add/commit everything) |
969176bec217
tests: unify test-revert
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
6110
diff
changeset
|
340 |
969176bec217
tests: unify test-revert
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
6110
diff
changeset
|
341 $ hg st -A -X .hgignore |
969176bec217
tests: unify test-revert
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
6110
diff
changeset
|
342 I ignored |
969176bec217
tests: unify test-revert
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
6110
diff
changeset
|
343 I ignoreddir/file |
969176bec217
tests: unify test-revert
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
6110
diff
changeset
|
344 I ignoreddir/removed |
969176bec217
tests: unify test-revert
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
6110
diff
changeset
|
345 I removed |
969176bec217
tests: unify test-revert
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
6110
diff
changeset
|
346 $ hg ci -qAm 'add files' ignored ignoreddir/file ignoreddir/removed removed |
6031
7383384793fb
revert: don't assume ignored files will be returned in the unknown list
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
5230
diff
changeset
|
347 |
12106
969176bec217
tests: unify test-revert
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
6110
diff
changeset
|
348 $ echo >> ignored |
969176bec217
tests: unify test-revert
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
6110
diff
changeset
|
349 $ echo >> ignoreddir/file |
969176bec217
tests: unify test-revert
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
6110
diff
changeset
|
350 $ hg rm removed ignoreddir/removed |
969176bec217
tests: unify test-revert
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
6110
diff
changeset
|
351 |
969176bec217
tests: unify test-revert
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
6110
diff
changeset
|
352 should revert ignored* and undelete *removed |
22099
9ed5e1053303
test-revert: improve comment
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21579
diff
changeset
|
353 -------------------------------------------- |
6031
7383384793fb
revert: don't assume ignored files will be returned in the unknown list
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
5230
diff
changeset
|
354 |
12106
969176bec217
tests: unify test-revert
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
6110
diff
changeset
|
355 $ hg revert -a --no-backup |
969176bec217
tests: unify test-revert
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
6110
diff
changeset
|
356 reverting ignored |
35393
4441705b7111
tests: remove (glob) annotations that were only for '\' matches
Matt Harbison <matt_harbison@yahoo.com>
parents:
34146
diff
changeset
|
357 reverting ignoreddir/file |
4441705b7111
tests: remove (glob) annotations that were only for '\' matches
Matt Harbison <matt_harbison@yahoo.com>
parents:
34146
diff
changeset
|
358 undeleting ignoreddir/removed |
12106
969176bec217
tests: unify test-revert
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
6110
diff
changeset
|
359 undeleting removed |
969176bec217
tests: unify test-revert
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
6110
diff
changeset
|
360 $ hg st -mardi |
969176bec217
tests: unify test-revert
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
6110
diff
changeset
|
361 |
969176bec217
tests: unify test-revert
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
6110
diff
changeset
|
362 $ hg up -qC |
969176bec217
tests: unify test-revert
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
6110
diff
changeset
|
363 $ echo >> ignored |
969176bec217
tests: unify test-revert
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
6110
diff
changeset
|
364 $ hg rm removed |
969176bec217
tests: unify test-revert
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
6110
diff
changeset
|
365 |
969176bec217
tests: unify test-revert
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
6110
diff
changeset
|
366 should silently revert the named files |
22099
9ed5e1053303
test-revert: improve comment
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21579
diff
changeset
|
367 -------------------------------------- |
12106
969176bec217
tests: unify test-revert
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
6110
diff
changeset
|
368 |
969176bec217
tests: unify test-revert
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
6110
diff
changeset
|
369 $ hg revert --no-backup ignored removed |
969176bec217
tests: unify test-revert
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
6110
diff
changeset
|
370 $ hg st -mardi |
16913
f2719b387380
tests: add missing trailing 'cd ..'
Mads Kiilerich <mads@kiilerich.com>
parents:
16886
diff
changeset
|
371 |
22099
9ed5e1053303
test-revert: improve comment
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21579
diff
changeset
|
372 Reverting copy (issue3920) |
9ed5e1053303
test-revert: improve comment
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21579
diff
changeset
|
373 -------------------------- |
9ed5e1053303
test-revert: improve comment
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21579
diff
changeset
|
374 |
19129
bd19587a3347
revert: ensure that copies and renames are honored (issue3920)
Bryan O'Sullivan <bryano@fb.com>
parents:
16913
diff
changeset
|
375 someone set up us the copies |
bd19587a3347
revert: ensure that copies and renames are honored (issue3920)
Bryan O'Sullivan <bryano@fb.com>
parents:
16913
diff
changeset
|
376 |
bd19587a3347
revert: ensure that copies and renames are honored (issue3920)
Bryan O'Sullivan <bryano@fb.com>
parents:
16913
diff
changeset
|
377 $ rm .hgignore |
bd19587a3347
revert: ensure that copies and renames are honored (issue3920)
Bryan O'Sullivan <bryano@fb.com>
parents:
16913
diff
changeset
|
378 $ hg update -C |
bd19587a3347
revert: ensure that copies and renames are honored (issue3920)
Bryan O'Sullivan <bryano@fb.com>
parents:
16913
diff
changeset
|
379 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
bd19587a3347
revert: ensure that copies and renames are honored (issue3920)
Bryan O'Sullivan <bryano@fb.com>
parents:
16913
diff
changeset
|
380 $ hg mv ignored allyour |
bd19587a3347
revert: ensure that copies and renames are honored (issue3920)
Bryan O'Sullivan <bryano@fb.com>
parents:
16913
diff
changeset
|
381 $ hg copy removed base |
bd19587a3347
revert: ensure that copies and renames are honored (issue3920)
Bryan O'Sullivan <bryano@fb.com>
parents:
16913
diff
changeset
|
382 $ hg commit -m rename |
bd19587a3347
revert: ensure that copies and renames are honored (issue3920)
Bryan O'Sullivan <bryano@fb.com>
parents:
16913
diff
changeset
|
383 |
bd19587a3347
revert: ensure that copies and renames are honored (issue3920)
Bryan O'Sullivan <bryano@fb.com>
parents:
16913
diff
changeset
|
384 copies and renames, you have no chance to survive make your time (issue3920) |
bd19587a3347
revert: ensure that copies and renames are honored (issue3920)
Bryan O'Sullivan <bryano@fb.com>
parents:
16913
diff
changeset
|
385 |
bd19587a3347
revert: ensure that copies and renames are honored (issue3920)
Bryan O'Sullivan <bryano@fb.com>
parents:
16913
diff
changeset
|
386 $ hg update '.^' |
bd19587a3347
revert: ensure that copies and renames are honored (issue3920)
Bryan O'Sullivan <bryano@fb.com>
parents:
16913
diff
changeset
|
387 1 files updated, 0 files merged, 2 files removed, 0 files unresolved |
bd19587a3347
revert: ensure that copies and renames are honored (issue3920)
Bryan O'Sullivan <bryano@fb.com>
parents:
16913
diff
changeset
|
388 $ hg revert -rtip -a |
39405
cb70501d8b71
revert: fix the inconsistency of status msgs in --interactive mode
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
35393
diff
changeset
|
389 removing ignored |
19129
bd19587a3347
revert: ensure that copies and renames are honored (issue3920)
Bryan O'Sullivan <bryano@fb.com>
parents:
16913
diff
changeset
|
390 adding allyour |
bd19587a3347
revert: ensure that copies and renames are honored (issue3920)
Bryan O'Sullivan <bryano@fb.com>
parents:
16913
diff
changeset
|
391 adding base |
bd19587a3347
revert: ensure that copies and renames are honored (issue3920)
Bryan O'Sullivan <bryano@fb.com>
parents:
16913
diff
changeset
|
392 $ hg status -C |
bd19587a3347
revert: ensure that copies and renames are honored (issue3920)
Bryan O'Sullivan <bryano@fb.com>
parents:
16913
diff
changeset
|
393 A allyour |
bd19587a3347
revert: ensure that copies and renames are honored (issue3920)
Bryan O'Sullivan <bryano@fb.com>
parents:
16913
diff
changeset
|
394 ignored |
bd19587a3347
revert: ensure that copies and renames are honored (issue3920)
Bryan O'Sullivan <bryano@fb.com>
parents:
16913
diff
changeset
|
395 A base |
bd19587a3347
revert: ensure that copies and renames are honored (issue3920)
Bryan O'Sullivan <bryano@fb.com>
parents:
16913
diff
changeset
|
396 removed |
bd19587a3347
revert: ensure that copies and renames are honored (issue3920)
Bryan O'Sullivan <bryano@fb.com>
parents:
16913
diff
changeset
|
397 R ignored |
bd19587a3347
revert: ensure that copies and renames are honored (issue3920)
Bryan O'Sullivan <bryano@fb.com>
parents:
16913
diff
changeset
|
398 |
21573
4af19d39706e
revert: add a test case to reverting "add" during merges
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
19129
diff
changeset
|
399 Test revert of a file added by one side of the merge |
22099
9ed5e1053303
test-revert: improve comment
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21579
diff
changeset
|
400 ==================================================== |
21573
4af19d39706e
revert: add a test case to reverting "add" during merges
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
19129
diff
changeset
|
401 |
22099
9ed5e1053303
test-revert: improve comment
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21579
diff
changeset
|
402 remove any pending change |
21573
4af19d39706e
revert: add a test case to reverting "add" during merges
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
19129
diff
changeset
|
403 |
4af19d39706e
revert: add a test case to reverting "add" during merges
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
19129
diff
changeset
|
404 $ hg revert --all |
4af19d39706e
revert: add a test case to reverting "add" during merges
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
19129
diff
changeset
|
405 forgetting allyour |
4af19d39706e
revert: add a test case to reverting "add" during merges
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
19129
diff
changeset
|
406 forgetting base |
4af19d39706e
revert: add a test case to reverting "add" during merges
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
19129
diff
changeset
|
407 undeleting ignored |
4af19d39706e
revert: add a test case to reverting "add" during merges
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
19129
diff
changeset
|
408 $ hg purge --all --config extensions.purge= |
4af19d39706e
revert: add a test case to reverting "add" during merges
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
19129
diff
changeset
|
409 |
22099
9ed5e1053303
test-revert: improve comment
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21579
diff
changeset
|
410 Adds a new commit |
21573
4af19d39706e
revert: add a test case to reverting "add" during merges
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
19129
diff
changeset
|
411 |
4af19d39706e
revert: add a test case to reverting "add" during merges
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
19129
diff
changeset
|
412 $ echo foo > newadd |
4af19d39706e
revert: add a test case to reverting "add" during merges
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
19129
diff
changeset
|
413 $ hg add newadd |
4af19d39706e
revert: add a test case to reverting "add" during merges
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
19129
diff
changeset
|
414 $ hg commit -m 'other adds' |
4af19d39706e
revert: add a test case to reverting "add" during merges
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
19129
diff
changeset
|
415 created new head |
4af19d39706e
revert: add a test case to reverting "add" during merges
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
19129
diff
changeset
|
416 |
4af19d39706e
revert: add a test case to reverting "add" during merges
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
19129
diff
changeset
|
417 |
22099
9ed5e1053303
test-revert: improve comment
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21579
diff
changeset
|
418 merge it with the other head |
21573
4af19d39706e
revert: add a test case to reverting "add" during merges
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
19129
diff
changeset
|
419 |
4af19d39706e
revert: add a test case to reverting "add" during merges
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
19129
diff
changeset
|
420 $ hg merge # merge 1 into 2 |
4af19d39706e
revert: add a test case to reverting "add" during merges
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
19129
diff
changeset
|
421 2 files updated, 0 files merged, 1 files removed, 0 files unresolved |
4af19d39706e
revert: add a test case to reverting "add" during merges
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
19129
diff
changeset
|
422 (branch merge, don't forget to commit) |
4af19d39706e
revert: add a test case to reverting "add" during merges
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
19129
diff
changeset
|
423 $ hg summary |
4af19d39706e
revert: add a test case to reverting "add" during merges
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
19129
diff
changeset
|
424 parent: 2:b8ec310b2d4e tip |
4af19d39706e
revert: add a test case to reverting "add" during merges
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
19129
diff
changeset
|
425 other adds |
4af19d39706e
revert: add a test case to reverting "add" during merges
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
19129
diff
changeset
|
426 parent: 1:f6180deb8fbe |
4af19d39706e
revert: add a test case to reverting "add" during merges
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
19129
diff
changeset
|
427 rename |
4af19d39706e
revert: add a test case to reverting "add" during merges
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
19129
diff
changeset
|
428 branch: default |
4af19d39706e
revert: add a test case to reverting "add" during merges
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
19129
diff
changeset
|
429 commit: 2 modified, 1 removed (merge) |
4af19d39706e
revert: add a test case to reverting "add" during merges
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
19129
diff
changeset
|
430 update: (current) |
25382
6084926366b9
summary: move the parents phase marker to commit line (issue4688)
Gilles Moris <gilles.moris@free.fr>
parents:
25111
diff
changeset
|
431 phases: 3 draft |
21573
4af19d39706e
revert: add a test case to reverting "add" during merges
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
19129
diff
changeset
|
432 |
22099
9ed5e1053303
test-revert: improve comment
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21579
diff
changeset
|
433 clarifies who added what |
21573
4af19d39706e
revert: add a test case to reverting "add" during merges
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
19129
diff
changeset
|
434 |
4af19d39706e
revert: add a test case to reverting "add" during merges
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
19129
diff
changeset
|
435 $ hg status |
4af19d39706e
revert: add a test case to reverting "add" during merges
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
19129
diff
changeset
|
436 M allyour |
4af19d39706e
revert: add a test case to reverting "add" during merges
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
19129
diff
changeset
|
437 M base |
4af19d39706e
revert: add a test case to reverting "add" during merges
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
19129
diff
changeset
|
438 R ignored |
4af19d39706e
revert: add a test case to reverting "add" during merges
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
19129
diff
changeset
|
439 $ hg status --change 'p1()' |
4af19d39706e
revert: add a test case to reverting "add" during merges
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
19129
diff
changeset
|
440 A newadd |
4af19d39706e
revert: add a test case to reverting "add" during merges
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
19129
diff
changeset
|
441 $ hg status --change 'p2()' |
4af19d39706e
revert: add a test case to reverting "add" during merges
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
19129
diff
changeset
|
442 A allyour |
4af19d39706e
revert: add a test case to reverting "add" during merges
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
19129
diff
changeset
|
443 A base |
4af19d39706e
revert: add a test case to reverting "add" during merges
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
19129
diff
changeset
|
444 R ignored |
4af19d39706e
revert: add a test case to reverting "add" during merges
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
19129
diff
changeset
|
445 |
22099
9ed5e1053303
test-revert: improve comment
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21579
diff
changeset
|
446 revert file added by p1() to p1() state |
9ed5e1053303
test-revert: improve comment
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21579
diff
changeset
|
447 ----------------------------------------- |
21573
4af19d39706e
revert: add a test case to reverting "add" during merges
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
19129
diff
changeset
|
448 |
4af19d39706e
revert: add a test case to reverting "add" during merges
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
19129
diff
changeset
|
449 $ hg revert -r 'p1()' 'glob:newad?' |
4af19d39706e
revert: add a test case to reverting "add" during merges
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
19129
diff
changeset
|
450 $ hg status |
4af19d39706e
revert: add a test case to reverting "add" during merges
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
19129
diff
changeset
|
451 M allyour |
4af19d39706e
revert: add a test case to reverting "add" during merges
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
19129
diff
changeset
|
452 M base |
4af19d39706e
revert: add a test case to reverting "add" during merges
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
19129
diff
changeset
|
453 R ignored |
4af19d39706e
revert: add a test case to reverting "add" during merges
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
19129
diff
changeset
|
454 |
22099
9ed5e1053303
test-revert: improve comment
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21579
diff
changeset
|
455 revert file added by p1() to p2() state |
9ed5e1053303
test-revert: improve comment
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21579
diff
changeset
|
456 ------------------------------------------ |
21573
4af19d39706e
revert: add a test case to reverting "add" during merges
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
19129
diff
changeset
|
457 |
4af19d39706e
revert: add a test case to reverting "add" during merges
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
19129
diff
changeset
|
458 $ hg revert -r 'p2()' 'glob:newad?' |
4af19d39706e
revert: add a test case to reverting "add" during merges
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
19129
diff
changeset
|
459 removing newadd |
4af19d39706e
revert: add a test case to reverting "add" during merges
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
19129
diff
changeset
|
460 $ hg status |
4af19d39706e
revert: add a test case to reverting "add" during merges
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
19129
diff
changeset
|
461 M allyour |
4af19d39706e
revert: add a test case to reverting "add" during merges
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
19129
diff
changeset
|
462 M base |
4af19d39706e
revert: add a test case to reverting "add" during merges
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
19129
diff
changeset
|
463 R ignored |
4af19d39706e
revert: add a test case to reverting "add" during merges
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
19129
diff
changeset
|
464 R newadd |
4af19d39706e
revert: add a test case to reverting "add" during merges
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
19129
diff
changeset
|
465 |
22099
9ed5e1053303
test-revert: improve comment
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21579
diff
changeset
|
466 revert file added by p2() to p2() state |
9ed5e1053303
test-revert: improve comment
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21579
diff
changeset
|
467 ------------------------------------------ |
21573
4af19d39706e
revert: add a test case to reverting "add" during merges
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
19129
diff
changeset
|
468 |
4af19d39706e
revert: add a test case to reverting "add" during merges
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
19129
diff
changeset
|
469 $ hg revert -r 'p2()' 'glob:allyou?' |
4af19d39706e
revert: add a test case to reverting "add" during merges
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
19129
diff
changeset
|
470 $ hg status |
4af19d39706e
revert: add a test case to reverting "add" during merges
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
19129
diff
changeset
|
471 M allyour |
4af19d39706e
revert: add a test case to reverting "add" during merges
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
19129
diff
changeset
|
472 M base |
4af19d39706e
revert: add a test case to reverting "add" during merges
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
19129
diff
changeset
|
473 R ignored |
4af19d39706e
revert: add a test case to reverting "add" during merges
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
19129
diff
changeset
|
474 R newadd |
4af19d39706e
revert: add a test case to reverting "add" during merges
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
19129
diff
changeset
|
475 |
22099
9ed5e1053303
test-revert: improve comment
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21579
diff
changeset
|
476 revert file added by p2() to p1() state |
9ed5e1053303
test-revert: improve comment
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21579
diff
changeset
|
477 ------------------------------------------ |
21573
4af19d39706e
revert: add a test case to reverting "add" during merges
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
19129
diff
changeset
|
478 |
4af19d39706e
revert: add a test case to reverting "add" during merges
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
19129
diff
changeset
|
479 $ hg revert -r 'p1()' 'glob:allyou?' |
4af19d39706e
revert: add a test case to reverting "add" during merges
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
19129
diff
changeset
|
480 removing allyour |
4af19d39706e
revert: add a test case to reverting "add" during merges
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
19129
diff
changeset
|
481 $ hg status |
4af19d39706e
revert: add a test case to reverting "add" during merges
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
19129
diff
changeset
|
482 M base |
4af19d39706e
revert: add a test case to reverting "add" during merges
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
19129
diff
changeset
|
483 R allyour |
4af19d39706e
revert: add a test case to reverting "add" during merges
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
19129
diff
changeset
|
484 R ignored |
4af19d39706e
revert: add a test case to reverting "add" during merges
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
19129
diff
changeset
|
485 R newadd |
4af19d39706e
revert: add a test case to reverting "add" during merges
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
19129
diff
changeset
|
486 |
22124
e51784473fc0
test-revert: prepare methodical testing of revert cases
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
22123
diff
changeset
|
487 Systematic behavior validation of most possible cases |
e51784473fc0
test-revert: prepare methodical testing of revert cases
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
22123
diff
changeset
|
488 ===================================================== |
21573
4af19d39706e
revert: add a test case to reverting "add" during merges
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
19129
diff
changeset
|
489 |
23159
20d3e2d73432
test-revert: name files by state, not by state transition
Martin von Zweigbergk <martinvonz@google.com>
parents:
23158
diff
changeset
|
490 This section tests most of the possible combinations of revision states and |
20d3e2d73432
test-revert: name files by state, not by state transition
Martin von Zweigbergk <martinvonz@google.com>
parents:
23158
diff
changeset
|
491 working directory states. The number of possible cases is significant but they |
23139
e53f6b72a0e4
spelling: fixes from proofreading of spell checker issues
Mads Kiilerich <madski@unity3d.com>
parents:
23135
diff
changeset
|
492 but they all have a slightly different handling. So this section commits to |
23159
20d3e2d73432
test-revert: name files by state, not by state transition
Martin von Zweigbergk <martinvonz@google.com>
parents:
23158
diff
changeset
|
493 and testing all of them to allow safe refactoring of the revert code. |
22124
e51784473fc0
test-revert: prepare methodical testing of revert cases
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
22123
diff
changeset
|
494 |
e51784473fc0
test-revert: prepare methodical testing of revert cases
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
22123
diff
changeset
|
495 A python script is used to generate a file history for each combination of |
23159
20d3e2d73432
test-revert: name files by state, not by state transition
Martin von Zweigbergk <martinvonz@google.com>
parents:
23158
diff
changeset
|
496 states, on one side the content (or lack thereof) in two revisions, and |
20d3e2d73432
test-revert: name files by state, not by state transition
Martin von Zweigbergk <martinvonz@google.com>
parents:
23158
diff
changeset
|
497 on the other side, the content and "tracked-ness" of the working directory. The |
20d3e2d73432
test-revert: name files by state, not by state transition
Martin von Zweigbergk <martinvonz@google.com>
parents:
23158
diff
changeset
|
498 three states generated are: |
22124
e51784473fc0
test-revert: prepare methodical testing of revert cases
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
22123
diff
changeset
|
499 |
e51784473fc0
test-revert: prepare methodical testing of revert cases
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
22123
diff
changeset
|
500 - a "base" revision |
e51784473fc0
test-revert: prepare methodical testing of revert cases
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
22123
diff
changeset
|
501 - a "parent" revision |
e51784473fc0
test-revert: prepare methodical testing of revert cases
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
22123
diff
changeset
|
502 - the working directory (based on "parent") |
e51784473fc0
test-revert: prepare methodical testing of revert cases
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
22123
diff
changeset
|
503 |
23159
20d3e2d73432
test-revert: name files by state, not by state transition
Martin von Zweigbergk <martinvonz@google.com>
parents:
23158
diff
changeset
|
504 The files generated have names of the form: |
22124
e51784473fc0
test-revert: prepare methodical testing of revert cases
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
22123
diff
changeset
|
505 |
23159
20d3e2d73432
test-revert: name files by state, not by state transition
Martin von Zweigbergk <martinvonz@google.com>
parents:
23158
diff
changeset
|
506 <rev1-content>_<rev2-content>_<working-copy-content>-<tracked-ness> |
22124
e51784473fc0
test-revert: prepare methodical testing of revert cases
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
22123
diff
changeset
|
507 |
e51784473fc0
test-revert: prepare methodical testing of revert cases
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
22123
diff
changeset
|
508 All known states are not tested yet. See inline documentation for details. |
e51784473fc0
test-revert: prepare methodical testing of revert cases
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
22123
diff
changeset
|
509 Special cases from merge and rename are not tested by this section. |
e51784473fc0
test-revert: prepare methodical testing of revert cases
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
22123
diff
changeset
|
510 |
e51784473fc0
test-revert: prepare methodical testing of revert cases
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
22123
diff
changeset
|
511 Write the python script to disk |
e51784473fc0
test-revert: prepare methodical testing of revert cases
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
22123
diff
changeset
|
512 ------------------------------- |
e51784473fc0
test-revert: prepare methodical testing of revert cases
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
22123
diff
changeset
|
513 |
22127
3163b8f8ff26
test-revert: display the list of all generated cases
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
22126
diff
changeset
|
514 check list of planned files |
3163b8f8ff26
test-revert: display the list of all generated cases
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
22126
diff
changeset
|
515 |
39707
5abc47d4ca6b
tests: quote PYTHON usage
Matt Harbison <matt_harbison@yahoo.com>
parents:
39405
diff
changeset
|
516 $ "$PYTHON" $TESTDIR/generate-working-copy-states.py filelist 2 |
23160
4f4e6815f286
test-revert: sort by output filename again
Martin von Zweigbergk <martinvonz@google.com>
parents:
23159
diff
changeset
|
517 content1_content1_content1-tracked |
4f4e6815f286
test-revert: sort by output filename again
Martin von Zweigbergk <martinvonz@google.com>
parents:
23159
diff
changeset
|
518 content1_content1_content1-untracked |
4f4e6815f286
test-revert: sort by output filename again
Martin von Zweigbergk <martinvonz@google.com>
parents:
23159
diff
changeset
|
519 content1_content1_content3-tracked |
4f4e6815f286
test-revert: sort by output filename again
Martin von Zweigbergk <martinvonz@google.com>
parents:
23159
diff
changeset
|
520 content1_content1_content3-untracked |
4f4e6815f286
test-revert: sort by output filename again
Martin von Zweigbergk <martinvonz@google.com>
parents:
23159
diff
changeset
|
521 content1_content1_missing-tracked |
4f4e6815f286
test-revert: sort by output filename again
Martin von Zweigbergk <martinvonz@google.com>
parents:
23159
diff
changeset
|
522 content1_content1_missing-untracked |
4f4e6815f286
test-revert: sort by output filename again
Martin von Zweigbergk <martinvonz@google.com>
parents:
23159
diff
changeset
|
523 content1_content2_content1-tracked |
4f4e6815f286
test-revert: sort by output filename again
Martin von Zweigbergk <martinvonz@google.com>
parents:
23159
diff
changeset
|
524 content1_content2_content1-untracked |
4f4e6815f286
test-revert: sort by output filename again
Martin von Zweigbergk <martinvonz@google.com>
parents:
23159
diff
changeset
|
525 content1_content2_content2-tracked |
4f4e6815f286
test-revert: sort by output filename again
Martin von Zweigbergk <martinvonz@google.com>
parents:
23159
diff
changeset
|
526 content1_content2_content2-untracked |
4f4e6815f286
test-revert: sort by output filename again
Martin von Zweigbergk <martinvonz@google.com>
parents:
23159
diff
changeset
|
527 content1_content2_content3-tracked |
4f4e6815f286
test-revert: sort by output filename again
Martin von Zweigbergk <martinvonz@google.com>
parents:
23159
diff
changeset
|
528 content1_content2_content3-untracked |
4f4e6815f286
test-revert: sort by output filename again
Martin von Zweigbergk <martinvonz@google.com>
parents:
23159
diff
changeset
|
529 content1_content2_missing-tracked |
4f4e6815f286
test-revert: sort by output filename again
Martin von Zweigbergk <martinvonz@google.com>
parents:
23159
diff
changeset
|
530 content1_content2_missing-untracked |
4f4e6815f286
test-revert: sort by output filename again
Martin von Zweigbergk <martinvonz@google.com>
parents:
23159
diff
changeset
|
531 content1_missing_content1-tracked |
4f4e6815f286
test-revert: sort by output filename again
Martin von Zweigbergk <martinvonz@google.com>
parents:
23159
diff
changeset
|
532 content1_missing_content1-untracked |
4f4e6815f286
test-revert: sort by output filename again
Martin von Zweigbergk <martinvonz@google.com>
parents:
23159
diff
changeset
|
533 content1_missing_content3-tracked |
4f4e6815f286
test-revert: sort by output filename again
Martin von Zweigbergk <martinvonz@google.com>
parents:
23159
diff
changeset
|
534 content1_missing_content3-untracked |
4f4e6815f286
test-revert: sort by output filename again
Martin von Zweigbergk <martinvonz@google.com>
parents:
23159
diff
changeset
|
535 content1_missing_missing-tracked |
4f4e6815f286
test-revert: sort by output filename again
Martin von Zweigbergk <martinvonz@google.com>
parents:
23159
diff
changeset
|
536 content1_missing_missing-untracked |
23159
20d3e2d73432
test-revert: name files by state, not by state transition
Martin von Zweigbergk <martinvonz@google.com>
parents:
23158
diff
changeset
|
537 missing_content2_content2-tracked |
20d3e2d73432
test-revert: name files by state, not by state transition
Martin von Zweigbergk <martinvonz@google.com>
parents:
23158
diff
changeset
|
538 missing_content2_content2-untracked |
20d3e2d73432
test-revert: name files by state, not by state transition
Martin von Zweigbergk <martinvonz@google.com>
parents:
23158
diff
changeset
|
539 missing_content2_content3-tracked |
23160
4f4e6815f286
test-revert: sort by output filename again
Martin von Zweigbergk <martinvonz@google.com>
parents:
23159
diff
changeset
|
540 missing_content2_content3-untracked |
4f4e6815f286
test-revert: sort by output filename again
Martin von Zweigbergk <martinvonz@google.com>
parents:
23159
diff
changeset
|
541 missing_content2_missing-tracked |
4f4e6815f286
test-revert: sort by output filename again
Martin von Zweigbergk <martinvonz@google.com>
parents:
23159
diff
changeset
|
542 missing_content2_missing-untracked |
4f4e6815f286
test-revert: sort by output filename again
Martin von Zweigbergk <martinvonz@google.com>
parents:
23159
diff
changeset
|
543 missing_missing_content3-tracked |
4f4e6815f286
test-revert: sort by output filename again
Martin von Zweigbergk <martinvonz@google.com>
parents:
23159
diff
changeset
|
544 missing_missing_content3-untracked |
23159
20d3e2d73432
test-revert: name files by state, not by state transition
Martin von Zweigbergk <martinvonz@google.com>
parents:
23158
diff
changeset
|
545 missing_missing_missing-tracked |
20d3e2d73432
test-revert: name files by state, not by state transition
Martin von Zweigbergk <martinvonz@google.com>
parents:
23158
diff
changeset
|
546 missing_missing_missing-untracked |
22127
3163b8f8ff26
test-revert: display the list of all generated cases
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
22126
diff
changeset
|
547 |
22126
651b2149f1e7
test-revert: also create a text version of the snapshot
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
22124
diff
changeset
|
548 Script to make a simple text version of the content |
651b2149f1e7
test-revert: also create a text version of the snapshot
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
22124
diff
changeset
|
549 --------------------------------------------------- |
651b2149f1e7
test-revert: also create a text version of the snapshot
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
22124
diff
changeset
|
550 |
651b2149f1e7
test-revert: also create a text version of the snapshot
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
22124
diff
changeset
|
551 $ cat << EOF >> dircontent.py |
651b2149f1e7
test-revert: also create a text version of the snapshot
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
22124
diff
changeset
|
552 > # generate a simple text view of the directory for easy comparison |
651b2149f1e7
test-revert: also create a text version of the snapshot
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
22124
diff
changeset
|
553 > import os |
651b2149f1e7
test-revert: also create a text version of the snapshot
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
22124
diff
changeset
|
554 > files = os.listdir('.') |
651b2149f1e7
test-revert: also create a text version of the snapshot
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
22124
diff
changeset
|
555 > files.sort() |
651b2149f1e7
test-revert: also create a text version of the snapshot
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
22124
diff
changeset
|
556 > for filename in files: |
651b2149f1e7
test-revert: also create a text version of the snapshot
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
22124
diff
changeset
|
557 > if os.path.isdir(filename): |
651b2149f1e7
test-revert: also create a text version of the snapshot
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
22124
diff
changeset
|
558 > continue |
651b2149f1e7
test-revert: also create a text version of the snapshot
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
22124
diff
changeset
|
559 > content = open(filename).read() |
39740
e0a7cfa9323f
py3: use print as a function in tests/test-revert.t
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
39707
diff
changeset
|
560 > print('%-6s %s' % (content.strip(), filename)) |
22126
651b2149f1e7
test-revert: also create a text version of the snapshot
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
22124
diff
changeset
|
561 > EOF |
22124
e51784473fc0
test-revert: prepare methodical testing of revert cases
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
22123
diff
changeset
|
562 |
e51784473fc0
test-revert: prepare methodical testing of revert cases
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
22123
diff
changeset
|
563 Generate appropriate repo state |
e51784473fc0
test-revert: prepare methodical testing of revert cases
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
22123
diff
changeset
|
564 ------------------------------- |
e51784473fc0
test-revert: prepare methodical testing of revert cases
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
22123
diff
changeset
|
565 |
e51784473fc0
test-revert: prepare methodical testing of revert cases
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
22123
diff
changeset
|
566 $ hg init revert-ref |
e51784473fc0
test-revert: prepare methodical testing of revert cases
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
22123
diff
changeset
|
567 $ cd revert-ref |
e51784473fc0
test-revert: prepare methodical testing of revert cases
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
22123
diff
changeset
|
568 |
e51784473fc0
test-revert: prepare methodical testing of revert cases
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
22123
diff
changeset
|
569 Generate base changeset |
e51784473fc0
test-revert: prepare methodical testing of revert cases
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
22123
diff
changeset
|
570 |
39707
5abc47d4ca6b
tests: quote PYTHON usage
Matt Harbison <matt_harbison@yahoo.com>
parents:
39405
diff
changeset
|
571 $ "$PYTHON" $TESTDIR/generate-working-copy-states.py state 2 1 |
22124
e51784473fc0
test-revert: prepare methodical testing of revert cases
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
22123
diff
changeset
|
572 $ hg addremove --similarity 0 |
23159
20d3e2d73432
test-revert: name files by state, not by state transition
Martin von Zweigbergk <martinvonz@google.com>
parents:
23158
diff
changeset
|
573 adding content1_content1_content1-tracked |
20d3e2d73432
test-revert: name files by state, not by state transition
Martin von Zweigbergk <martinvonz@google.com>
parents:
23158
diff
changeset
|
574 adding content1_content1_content1-untracked |
20d3e2d73432
test-revert: name files by state, not by state transition
Martin von Zweigbergk <martinvonz@google.com>
parents:
23158
diff
changeset
|
575 adding content1_content1_content3-tracked |
20d3e2d73432
test-revert: name files by state, not by state transition
Martin von Zweigbergk <martinvonz@google.com>
parents:
23158
diff
changeset
|
576 adding content1_content1_content3-untracked |
20d3e2d73432
test-revert: name files by state, not by state transition
Martin von Zweigbergk <martinvonz@google.com>
parents:
23158
diff
changeset
|
577 adding content1_content1_missing-tracked |
20d3e2d73432
test-revert: name files by state, not by state transition
Martin von Zweigbergk <martinvonz@google.com>
parents:
23158
diff
changeset
|
578 adding content1_content1_missing-untracked |
20d3e2d73432
test-revert: name files by state, not by state transition
Martin von Zweigbergk <martinvonz@google.com>
parents:
23158
diff
changeset
|
579 adding content1_content2_content1-tracked |
20d3e2d73432
test-revert: name files by state, not by state transition
Martin von Zweigbergk <martinvonz@google.com>
parents:
23158
diff
changeset
|
580 adding content1_content2_content1-untracked |
20d3e2d73432
test-revert: name files by state, not by state transition
Martin von Zweigbergk <martinvonz@google.com>
parents:
23158
diff
changeset
|
581 adding content1_content2_content2-tracked |
20d3e2d73432
test-revert: name files by state, not by state transition
Martin von Zweigbergk <martinvonz@google.com>
parents:
23158
diff
changeset
|
582 adding content1_content2_content2-untracked |
20d3e2d73432
test-revert: name files by state, not by state transition
Martin von Zweigbergk <martinvonz@google.com>
parents:
23158
diff
changeset
|
583 adding content1_content2_content3-tracked |
20d3e2d73432
test-revert: name files by state, not by state transition
Martin von Zweigbergk <martinvonz@google.com>
parents:
23158
diff
changeset
|
584 adding content1_content2_content3-untracked |
20d3e2d73432
test-revert: name files by state, not by state transition
Martin von Zweigbergk <martinvonz@google.com>
parents:
23158
diff
changeset
|
585 adding content1_content2_missing-tracked |
20d3e2d73432
test-revert: name files by state, not by state transition
Martin von Zweigbergk <martinvonz@google.com>
parents:
23158
diff
changeset
|
586 adding content1_content2_missing-untracked |
20d3e2d73432
test-revert: name files by state, not by state transition
Martin von Zweigbergk <martinvonz@google.com>
parents:
23158
diff
changeset
|
587 adding content1_missing_content1-tracked |
20d3e2d73432
test-revert: name files by state, not by state transition
Martin von Zweigbergk <martinvonz@google.com>
parents:
23158
diff
changeset
|
588 adding content1_missing_content1-untracked |
20d3e2d73432
test-revert: name files by state, not by state transition
Martin von Zweigbergk <martinvonz@google.com>
parents:
23158
diff
changeset
|
589 adding content1_missing_content3-tracked |
20d3e2d73432
test-revert: name files by state, not by state transition
Martin von Zweigbergk <martinvonz@google.com>
parents:
23158
diff
changeset
|
590 adding content1_missing_content3-untracked |
20d3e2d73432
test-revert: name files by state, not by state transition
Martin von Zweigbergk <martinvonz@google.com>
parents:
23158
diff
changeset
|
591 adding content1_missing_missing-tracked |
20d3e2d73432
test-revert: name files by state, not by state transition
Martin von Zweigbergk <martinvonz@google.com>
parents:
23158
diff
changeset
|
592 adding content1_missing_missing-untracked |
22124
e51784473fc0
test-revert: prepare methodical testing of revert cases
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
22123
diff
changeset
|
593 $ hg status |
23159
20d3e2d73432
test-revert: name files by state, not by state transition
Martin von Zweigbergk <martinvonz@google.com>
parents:
23158
diff
changeset
|
594 A content1_content1_content1-tracked |
20d3e2d73432
test-revert: name files by state, not by state transition
Martin von Zweigbergk <martinvonz@google.com>
parents:
23158
diff
changeset
|
595 A content1_content1_content1-untracked |
20d3e2d73432
test-revert: name files by state, not by state transition
Martin von Zweigbergk <martinvonz@google.com>
parents:
23158
diff
changeset
|
596 A content1_content1_content3-tracked |
20d3e2d73432
test-revert: name files by state, not by state transition
Martin von Zweigbergk <martinvonz@google.com>
parents:
23158
diff
changeset
|
597 A content1_content1_content3-untracked |
20d3e2d73432
test-revert: name files by state, not by state transition
Martin von Zweigbergk <martinvonz@google.com>
parents:
23158
diff
changeset
|
598 A content1_content1_missing-tracked |
20d3e2d73432
test-revert: name files by state, not by state transition
Martin von Zweigbergk <martinvonz@google.com>
parents:
23158
diff
changeset
|
599 A content1_content1_missing-untracked |
20d3e2d73432
test-revert: name files by state, not by state transition
Martin von Zweigbergk <martinvonz@google.com>
parents:
23158
diff
changeset
|
600 A content1_content2_content1-tracked |
20d3e2d73432
test-revert: name files by state, not by state transition
Martin von Zweigbergk <martinvonz@google.com>
parents:
23158
diff
changeset
|
601 A content1_content2_content1-untracked |
20d3e2d73432
test-revert: name files by state, not by state transition
Martin von Zweigbergk <martinvonz@google.com>
parents:
23158
diff
changeset
|
602 A content1_content2_content2-tracked |
20d3e2d73432
test-revert: name files by state, not by state transition
Martin von Zweigbergk <martinvonz@google.com>
parents:
23158
diff
changeset
|
603 A content1_content2_content2-untracked |
20d3e2d73432
test-revert: name files by state, not by state transition
Martin von Zweigbergk <martinvonz@google.com>
parents:
23158
diff
changeset
|
604 A content1_content2_content3-tracked |
20d3e2d73432
test-revert: name files by state, not by state transition
Martin von Zweigbergk <martinvonz@google.com>
parents:
23158
diff
changeset
|
605 A content1_content2_content3-untracked |
20d3e2d73432
test-revert: name files by state, not by state transition
Martin von Zweigbergk <martinvonz@google.com>
parents:
23158
diff
changeset
|
606 A content1_content2_missing-tracked |
20d3e2d73432
test-revert: name files by state, not by state transition
Martin von Zweigbergk <martinvonz@google.com>
parents:
23158
diff
changeset
|
607 A content1_content2_missing-untracked |
20d3e2d73432
test-revert: name files by state, not by state transition
Martin von Zweigbergk <martinvonz@google.com>
parents:
23158
diff
changeset
|
608 A content1_missing_content1-tracked |
20d3e2d73432
test-revert: name files by state, not by state transition
Martin von Zweigbergk <martinvonz@google.com>
parents:
23158
diff
changeset
|
609 A content1_missing_content1-untracked |
20d3e2d73432
test-revert: name files by state, not by state transition
Martin von Zweigbergk <martinvonz@google.com>
parents:
23158
diff
changeset
|
610 A content1_missing_content3-tracked |
20d3e2d73432
test-revert: name files by state, not by state transition
Martin von Zweigbergk <martinvonz@google.com>
parents:
23158
diff
changeset
|
611 A content1_missing_content3-untracked |
20d3e2d73432
test-revert: name files by state, not by state transition
Martin von Zweigbergk <martinvonz@google.com>
parents:
23158
diff
changeset
|
612 A content1_missing_missing-tracked |
20d3e2d73432
test-revert: name files by state, not by state transition
Martin von Zweigbergk <martinvonz@google.com>
parents:
23158
diff
changeset
|
613 A content1_missing_missing-untracked |
22124
e51784473fc0
test-revert: prepare methodical testing of revert cases
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
22123
diff
changeset
|
614 $ hg commit -m 'base' |
e51784473fc0
test-revert: prepare methodical testing of revert cases
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
22123
diff
changeset
|
615 |
22126
651b2149f1e7
test-revert: also create a text version of the snapshot
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
22124
diff
changeset
|
616 (create a simple text version of the content) |
651b2149f1e7
test-revert: also create a text version of the snapshot
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
22124
diff
changeset
|
617 |
39707
5abc47d4ca6b
tests: quote PYTHON usage
Matt Harbison <matt_harbison@yahoo.com>
parents:
39405
diff
changeset
|
618 $ "$PYTHON" ../dircontent.py > ../content-base.txt |
22126
651b2149f1e7
test-revert: also create a text version of the snapshot
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
22124
diff
changeset
|
619 $ cat ../content-base.txt |
23159
20d3e2d73432
test-revert: name files by state, not by state transition
Martin von Zweigbergk <martinvonz@google.com>
parents:
23158
diff
changeset
|
620 content1 content1_content1_content1-tracked |
20d3e2d73432
test-revert: name files by state, not by state transition
Martin von Zweigbergk <martinvonz@google.com>
parents:
23158
diff
changeset
|
621 content1 content1_content1_content1-untracked |
20d3e2d73432
test-revert: name files by state, not by state transition
Martin von Zweigbergk <martinvonz@google.com>
parents:
23158
diff
changeset
|
622 content1 content1_content1_content3-tracked |
20d3e2d73432
test-revert: name files by state, not by state transition
Martin von Zweigbergk <martinvonz@google.com>
parents:
23158
diff
changeset
|
623 content1 content1_content1_content3-untracked |
20d3e2d73432
test-revert: name files by state, not by state transition
Martin von Zweigbergk <martinvonz@google.com>
parents:
23158
diff
changeset
|
624 content1 content1_content1_missing-tracked |
20d3e2d73432
test-revert: name files by state, not by state transition
Martin von Zweigbergk <martinvonz@google.com>
parents:
23158
diff
changeset
|
625 content1 content1_content1_missing-untracked |
20d3e2d73432
test-revert: name files by state, not by state transition
Martin von Zweigbergk <martinvonz@google.com>
parents:
23158
diff
changeset
|
626 content1 content1_content2_content1-tracked |
20d3e2d73432
test-revert: name files by state, not by state transition
Martin von Zweigbergk <martinvonz@google.com>
parents:
23158
diff
changeset
|
627 content1 content1_content2_content1-untracked |
20d3e2d73432
test-revert: name files by state, not by state transition
Martin von Zweigbergk <martinvonz@google.com>
parents:
23158
diff
changeset
|
628 content1 content1_content2_content2-tracked |
20d3e2d73432
test-revert: name files by state, not by state transition
Martin von Zweigbergk <martinvonz@google.com>
parents:
23158
diff
changeset
|
629 content1 content1_content2_content2-untracked |
20d3e2d73432
test-revert: name files by state, not by state transition
Martin von Zweigbergk <martinvonz@google.com>
parents:
23158
diff
changeset
|
630 content1 content1_content2_content3-tracked |
20d3e2d73432
test-revert: name files by state, not by state transition
Martin von Zweigbergk <martinvonz@google.com>
parents:
23158
diff
changeset
|
631 content1 content1_content2_content3-untracked |
20d3e2d73432
test-revert: name files by state, not by state transition
Martin von Zweigbergk <martinvonz@google.com>
parents:
23158
diff
changeset
|
632 content1 content1_content2_missing-tracked |
20d3e2d73432
test-revert: name files by state, not by state transition
Martin von Zweigbergk <martinvonz@google.com>
parents:
23158
diff
changeset
|
633 content1 content1_content2_missing-untracked |
20d3e2d73432
test-revert: name files by state, not by state transition
Martin von Zweigbergk <martinvonz@google.com>
parents:
23158
diff
changeset
|
634 content1 content1_missing_content1-tracked |
20d3e2d73432
test-revert: name files by state, not by state transition
Martin von Zweigbergk <martinvonz@google.com>
parents:
23158
diff
changeset
|
635 content1 content1_missing_content1-untracked |
20d3e2d73432
test-revert: name files by state, not by state transition
Martin von Zweigbergk <martinvonz@google.com>
parents:
23158
diff
changeset
|
636 content1 content1_missing_content3-tracked |
20d3e2d73432
test-revert: name files by state, not by state transition
Martin von Zweigbergk <martinvonz@google.com>
parents:
23158
diff
changeset
|
637 content1 content1_missing_content3-untracked |
20d3e2d73432
test-revert: name files by state, not by state transition
Martin von Zweigbergk <martinvonz@google.com>
parents:
23158
diff
changeset
|
638 content1 content1_missing_missing-tracked |
20d3e2d73432
test-revert: name files by state, not by state transition
Martin von Zweigbergk <martinvonz@google.com>
parents:
23158
diff
changeset
|
639 content1 content1_missing_missing-untracked |
22126
651b2149f1e7
test-revert: also create a text version of the snapshot
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
22124
diff
changeset
|
640 |
22124
e51784473fc0
test-revert: prepare methodical testing of revert cases
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
22123
diff
changeset
|
641 Create parent changeset |
e51784473fc0
test-revert: prepare methodical testing of revert cases
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
22123
diff
changeset
|
642 |
39707
5abc47d4ca6b
tests: quote PYTHON usage
Matt Harbison <matt_harbison@yahoo.com>
parents:
39405
diff
changeset
|
643 $ "$PYTHON" $TESTDIR/generate-working-copy-states.py state 2 2 |
22124
e51784473fc0
test-revert: prepare methodical testing of revert cases
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
22123
diff
changeset
|
644 $ hg addremove --similarity 0 |
23159
20d3e2d73432
test-revert: name files by state, not by state transition
Martin von Zweigbergk <martinvonz@google.com>
parents:
23158
diff
changeset
|
645 removing content1_missing_content1-tracked |
20d3e2d73432
test-revert: name files by state, not by state transition
Martin von Zweigbergk <martinvonz@google.com>
parents:
23158
diff
changeset
|
646 removing content1_missing_content1-untracked |
20d3e2d73432
test-revert: name files by state, not by state transition
Martin von Zweigbergk <martinvonz@google.com>
parents:
23158
diff
changeset
|
647 removing content1_missing_content3-tracked |
20d3e2d73432
test-revert: name files by state, not by state transition
Martin von Zweigbergk <martinvonz@google.com>
parents:
23158
diff
changeset
|
648 removing content1_missing_content3-untracked |
20d3e2d73432
test-revert: name files by state, not by state transition
Martin von Zweigbergk <martinvonz@google.com>
parents:
23158
diff
changeset
|
649 removing content1_missing_missing-tracked |
20d3e2d73432
test-revert: name files by state, not by state transition
Martin von Zweigbergk <martinvonz@google.com>
parents:
23158
diff
changeset
|
650 removing content1_missing_missing-untracked |
20d3e2d73432
test-revert: name files by state, not by state transition
Martin von Zweigbergk <martinvonz@google.com>
parents:
23158
diff
changeset
|
651 adding missing_content2_content2-tracked |
20d3e2d73432
test-revert: name files by state, not by state transition
Martin von Zweigbergk <martinvonz@google.com>
parents:
23158
diff
changeset
|
652 adding missing_content2_content2-untracked |
20d3e2d73432
test-revert: name files by state, not by state transition
Martin von Zweigbergk <martinvonz@google.com>
parents:
23158
diff
changeset
|
653 adding missing_content2_content3-tracked |
20d3e2d73432
test-revert: name files by state, not by state transition
Martin von Zweigbergk <martinvonz@google.com>
parents:
23158
diff
changeset
|
654 adding missing_content2_content3-untracked |
20d3e2d73432
test-revert: name files by state, not by state transition
Martin von Zweigbergk <martinvonz@google.com>
parents:
23158
diff
changeset
|
655 adding missing_content2_missing-tracked |
20d3e2d73432
test-revert: name files by state, not by state transition
Martin von Zweigbergk <martinvonz@google.com>
parents:
23158
diff
changeset
|
656 adding missing_content2_missing-untracked |
22124
e51784473fc0
test-revert: prepare methodical testing of revert cases
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
22123
diff
changeset
|
657 $ hg status |
23159
20d3e2d73432
test-revert: name files by state, not by state transition
Martin von Zweigbergk <martinvonz@google.com>
parents:
23158
diff
changeset
|
658 M content1_content2_content1-tracked |
20d3e2d73432
test-revert: name files by state, not by state transition
Martin von Zweigbergk <martinvonz@google.com>
parents:
23158
diff
changeset
|
659 M content1_content2_content1-untracked |
20d3e2d73432
test-revert: name files by state, not by state transition
Martin von Zweigbergk <martinvonz@google.com>
parents:
23158
diff
changeset
|
660 M content1_content2_content2-tracked |
20d3e2d73432
test-revert: name files by state, not by state transition
Martin von Zweigbergk <martinvonz@google.com>
parents:
23158
diff
changeset
|
661 M content1_content2_content2-untracked |
20d3e2d73432
test-revert: name files by state, not by state transition
Martin von Zweigbergk <martinvonz@google.com>
parents:
23158
diff
changeset
|
662 M content1_content2_content3-tracked |
20d3e2d73432
test-revert: name files by state, not by state transition
Martin von Zweigbergk <martinvonz@google.com>
parents:
23158
diff
changeset
|
663 M content1_content2_content3-untracked |
20d3e2d73432
test-revert: name files by state, not by state transition
Martin von Zweigbergk <martinvonz@google.com>
parents:
23158
diff
changeset
|
664 M content1_content2_missing-tracked |
20d3e2d73432
test-revert: name files by state, not by state transition
Martin von Zweigbergk <martinvonz@google.com>
parents:
23158
diff
changeset
|
665 M content1_content2_missing-untracked |
20d3e2d73432
test-revert: name files by state, not by state transition
Martin von Zweigbergk <martinvonz@google.com>
parents:
23158
diff
changeset
|
666 A missing_content2_content2-tracked |
20d3e2d73432
test-revert: name files by state, not by state transition
Martin von Zweigbergk <martinvonz@google.com>
parents:
23158
diff
changeset
|
667 A missing_content2_content2-untracked |
20d3e2d73432
test-revert: name files by state, not by state transition
Martin von Zweigbergk <martinvonz@google.com>
parents:
23158
diff
changeset
|
668 A missing_content2_content3-tracked |
20d3e2d73432
test-revert: name files by state, not by state transition
Martin von Zweigbergk <martinvonz@google.com>
parents:
23158
diff
changeset
|
669 A missing_content2_content3-untracked |
20d3e2d73432
test-revert: name files by state, not by state transition
Martin von Zweigbergk <martinvonz@google.com>
parents:
23158
diff
changeset
|
670 A missing_content2_missing-tracked |
20d3e2d73432
test-revert: name files by state, not by state transition
Martin von Zweigbergk <martinvonz@google.com>
parents:
23158
diff
changeset
|
671 A missing_content2_missing-untracked |
20d3e2d73432
test-revert: name files by state, not by state transition
Martin von Zweigbergk <martinvonz@google.com>
parents:
23158
diff
changeset
|
672 R content1_missing_content1-tracked |
20d3e2d73432
test-revert: name files by state, not by state transition
Martin von Zweigbergk <martinvonz@google.com>
parents:
23158
diff
changeset
|
673 R content1_missing_content1-untracked |
20d3e2d73432
test-revert: name files by state, not by state transition
Martin von Zweigbergk <martinvonz@google.com>
parents:
23158
diff
changeset
|
674 R content1_missing_content3-tracked |
20d3e2d73432
test-revert: name files by state, not by state transition
Martin von Zweigbergk <martinvonz@google.com>
parents:
23158
diff
changeset
|
675 R content1_missing_content3-untracked |
20d3e2d73432
test-revert: name files by state, not by state transition
Martin von Zweigbergk <martinvonz@google.com>
parents:
23158
diff
changeset
|
676 R content1_missing_missing-tracked |
20d3e2d73432
test-revert: name files by state, not by state transition
Martin von Zweigbergk <martinvonz@google.com>
parents:
23158
diff
changeset
|
677 R content1_missing_missing-untracked |
22124
e51784473fc0
test-revert: prepare methodical testing of revert cases
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
22123
diff
changeset
|
678 $ hg commit -m 'parent' |
e51784473fc0
test-revert: prepare methodical testing of revert cases
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
22123
diff
changeset
|
679 |
22126
651b2149f1e7
test-revert: also create a text version of the snapshot
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
22124
diff
changeset
|
680 (create a simple text version of the content) |
651b2149f1e7
test-revert: also create a text version of the snapshot
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
22124
diff
changeset
|
681 |
39707
5abc47d4ca6b
tests: quote PYTHON usage
Matt Harbison <matt_harbison@yahoo.com>
parents:
39405
diff
changeset
|
682 $ "$PYTHON" ../dircontent.py > ../content-parent.txt |
22126
651b2149f1e7
test-revert: also create a text version of the snapshot
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
22124
diff
changeset
|
683 $ cat ../content-parent.txt |
23159
20d3e2d73432
test-revert: name files by state, not by state transition
Martin von Zweigbergk <martinvonz@google.com>
parents:
23158
diff
changeset
|
684 content1 content1_content1_content1-tracked |
20d3e2d73432
test-revert: name files by state, not by state transition
Martin von Zweigbergk <martinvonz@google.com>
parents:
23158
diff
changeset
|
685 content1 content1_content1_content1-untracked |
20d3e2d73432
test-revert: name files by state, not by state transition
Martin von Zweigbergk <martinvonz@google.com>
parents:
23158
diff
changeset
|
686 content1 content1_content1_content3-tracked |
20d3e2d73432
test-revert: name files by state, not by state transition
Martin von Zweigbergk <martinvonz@google.com>
parents:
23158
diff
changeset
|
687 content1 content1_content1_content3-untracked |
20d3e2d73432
test-revert: name files by state, not by state transition
Martin von Zweigbergk <martinvonz@google.com>
parents:
23158
diff
changeset
|
688 content1 content1_content1_missing-tracked |
20d3e2d73432
test-revert: name files by state, not by state transition
Martin von Zweigbergk <martinvonz@google.com>
parents:
23158
diff
changeset
|
689 content1 content1_content1_missing-untracked |
20d3e2d73432
test-revert: name files by state, not by state transition
Martin von Zweigbergk <martinvonz@google.com>
parents:
23158
diff
changeset
|
690 content2 content1_content2_content1-tracked |
20d3e2d73432
test-revert: name files by state, not by state transition
Martin von Zweigbergk <martinvonz@google.com>
parents:
23158
diff
changeset
|
691 content2 content1_content2_content1-untracked |
20d3e2d73432
test-revert: name files by state, not by state transition
Martin von Zweigbergk <martinvonz@google.com>
parents:
23158
diff
changeset
|
692 content2 content1_content2_content2-tracked |
20d3e2d73432
test-revert: name files by state, not by state transition
Martin von Zweigbergk <martinvonz@google.com>
parents:
23158
diff
changeset
|
693 content2 content1_content2_content2-untracked |
20d3e2d73432
test-revert: name files by state, not by state transition
Martin von Zweigbergk <martinvonz@google.com>
parents:
23158
diff
changeset
|
694 content2 content1_content2_content3-tracked |
20d3e2d73432
test-revert: name files by state, not by state transition
Martin von Zweigbergk <martinvonz@google.com>
parents:
23158
diff
changeset
|
695 content2 content1_content2_content3-untracked |
20d3e2d73432
test-revert: name files by state, not by state transition
Martin von Zweigbergk <martinvonz@google.com>
parents:
23158
diff
changeset
|
696 content2 content1_content2_missing-tracked |
20d3e2d73432
test-revert: name files by state, not by state transition
Martin von Zweigbergk <martinvonz@google.com>
parents:
23158
diff
changeset
|
697 content2 content1_content2_missing-untracked |
20d3e2d73432
test-revert: name files by state, not by state transition
Martin von Zweigbergk <martinvonz@google.com>
parents:
23158
diff
changeset
|
698 content2 missing_content2_content2-tracked |
20d3e2d73432
test-revert: name files by state, not by state transition
Martin von Zweigbergk <martinvonz@google.com>
parents:
23158
diff
changeset
|
699 content2 missing_content2_content2-untracked |
20d3e2d73432
test-revert: name files by state, not by state transition
Martin von Zweigbergk <martinvonz@google.com>
parents:
23158
diff
changeset
|
700 content2 missing_content2_content3-tracked |
20d3e2d73432
test-revert: name files by state, not by state transition
Martin von Zweigbergk <martinvonz@google.com>
parents:
23158
diff
changeset
|
701 content2 missing_content2_content3-untracked |
20d3e2d73432
test-revert: name files by state, not by state transition
Martin von Zweigbergk <martinvonz@google.com>
parents:
23158
diff
changeset
|
702 content2 missing_content2_missing-tracked |
20d3e2d73432
test-revert: name files by state, not by state transition
Martin von Zweigbergk <martinvonz@google.com>
parents:
23158
diff
changeset
|
703 content2 missing_content2_missing-untracked |
22126
651b2149f1e7
test-revert: also create a text version of the snapshot
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
22124
diff
changeset
|
704 |
22124
e51784473fc0
test-revert: prepare methodical testing of revert cases
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
22123
diff
changeset
|
705 Setup working directory |
e51784473fc0
test-revert: prepare methodical testing of revert cases
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
22123
diff
changeset
|
706 |
39707
5abc47d4ca6b
tests: quote PYTHON usage
Matt Harbison <matt_harbison@yahoo.com>
parents:
39405
diff
changeset
|
707 $ "$PYTHON" $TESTDIR/generate-working-copy-states.py state 2 wc |
22124
e51784473fc0
test-revert: prepare methodical testing of revert cases
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
22123
diff
changeset
|
708 $ hg addremove --similarity 0 |
23159
20d3e2d73432
test-revert: name files by state, not by state transition
Martin von Zweigbergk <martinvonz@google.com>
parents:
23158
diff
changeset
|
709 adding content1_missing_content1-tracked |
20d3e2d73432
test-revert: name files by state, not by state transition
Martin von Zweigbergk <martinvonz@google.com>
parents:
23158
diff
changeset
|
710 adding content1_missing_content1-untracked |
20d3e2d73432
test-revert: name files by state, not by state transition
Martin von Zweigbergk <martinvonz@google.com>
parents:
23158
diff
changeset
|
711 adding content1_missing_content3-tracked |
20d3e2d73432
test-revert: name files by state, not by state transition
Martin von Zweigbergk <martinvonz@google.com>
parents:
23158
diff
changeset
|
712 adding content1_missing_content3-untracked |
23161
6f31f46b8544
test-revert: make sure all 'tracked' files are really tracked
Martin von Zweigbergk <martinvonz@google.com>
parents:
23160
diff
changeset
|
713 adding content1_missing_missing-tracked |
6f31f46b8544
test-revert: make sure all 'tracked' files are really tracked
Martin von Zweigbergk <martinvonz@google.com>
parents:
23160
diff
changeset
|
714 adding content1_missing_missing-untracked |
23159
20d3e2d73432
test-revert: name files by state, not by state transition
Martin von Zweigbergk <martinvonz@google.com>
parents:
23158
diff
changeset
|
715 adding missing_missing_content3-tracked |
20d3e2d73432
test-revert: name files by state, not by state transition
Martin von Zweigbergk <martinvonz@google.com>
parents:
23158
diff
changeset
|
716 adding missing_missing_content3-untracked |
23161
6f31f46b8544
test-revert: make sure all 'tracked' files are really tracked
Martin von Zweigbergk <martinvonz@google.com>
parents:
23160
diff
changeset
|
717 adding missing_missing_missing-tracked |
6f31f46b8544
test-revert: make sure all 'tracked' files are really tracked
Martin von Zweigbergk <martinvonz@google.com>
parents:
23160
diff
changeset
|
718 adding missing_missing_missing-untracked |
23159
20d3e2d73432
test-revert: name files by state, not by state transition
Martin von Zweigbergk <martinvonz@google.com>
parents:
23158
diff
changeset
|
719 $ hg forget *_*_*-untracked |
20d3e2d73432
test-revert: name files by state, not by state transition
Martin von Zweigbergk <martinvonz@google.com>
parents:
23158
diff
changeset
|
720 $ rm *_*_missing-* |
22124
e51784473fc0
test-revert: prepare methodical testing of revert cases
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
22123
diff
changeset
|
721 $ hg status |
23159
20d3e2d73432
test-revert: name files by state, not by state transition
Martin von Zweigbergk <martinvonz@google.com>
parents:
23158
diff
changeset
|
722 M content1_content1_content3-tracked |
20d3e2d73432
test-revert: name files by state, not by state transition
Martin von Zweigbergk <martinvonz@google.com>
parents:
23158
diff
changeset
|
723 M content1_content2_content1-tracked |
20d3e2d73432
test-revert: name files by state, not by state transition
Martin von Zweigbergk <martinvonz@google.com>
parents:
23158
diff
changeset
|
724 M content1_content2_content3-tracked |
20d3e2d73432
test-revert: name files by state, not by state transition
Martin von Zweigbergk <martinvonz@google.com>
parents:
23158
diff
changeset
|
725 M missing_content2_content3-tracked |
20d3e2d73432
test-revert: name files by state, not by state transition
Martin von Zweigbergk <martinvonz@google.com>
parents:
23158
diff
changeset
|
726 A content1_missing_content1-tracked |
20d3e2d73432
test-revert: name files by state, not by state transition
Martin von Zweigbergk <martinvonz@google.com>
parents:
23158
diff
changeset
|
727 A content1_missing_content3-tracked |
20d3e2d73432
test-revert: name files by state, not by state transition
Martin von Zweigbergk <martinvonz@google.com>
parents:
23158
diff
changeset
|
728 A missing_missing_content3-tracked |
20d3e2d73432
test-revert: name files by state, not by state transition
Martin von Zweigbergk <martinvonz@google.com>
parents:
23158
diff
changeset
|
729 R content1_content1_content1-untracked |
20d3e2d73432
test-revert: name files by state, not by state transition
Martin von Zweigbergk <martinvonz@google.com>
parents:
23158
diff
changeset
|
730 R content1_content1_content3-untracked |
20d3e2d73432
test-revert: name files by state, not by state transition
Martin von Zweigbergk <martinvonz@google.com>
parents:
23158
diff
changeset
|
731 R content1_content1_missing-untracked |
20d3e2d73432
test-revert: name files by state, not by state transition
Martin von Zweigbergk <martinvonz@google.com>
parents:
23158
diff
changeset
|
732 R content1_content2_content1-untracked |
20d3e2d73432
test-revert: name files by state, not by state transition
Martin von Zweigbergk <martinvonz@google.com>
parents:
23158
diff
changeset
|
733 R content1_content2_content2-untracked |
20d3e2d73432
test-revert: name files by state, not by state transition
Martin von Zweigbergk <martinvonz@google.com>
parents:
23158
diff
changeset
|
734 R content1_content2_content3-untracked |
20d3e2d73432
test-revert: name files by state, not by state transition
Martin von Zweigbergk <martinvonz@google.com>
parents:
23158
diff
changeset
|
735 R content1_content2_missing-untracked |
20d3e2d73432
test-revert: name files by state, not by state transition
Martin von Zweigbergk <martinvonz@google.com>
parents:
23158
diff
changeset
|
736 R missing_content2_content2-untracked |
20d3e2d73432
test-revert: name files by state, not by state transition
Martin von Zweigbergk <martinvonz@google.com>
parents:
23158
diff
changeset
|
737 R missing_content2_content3-untracked |
20d3e2d73432
test-revert: name files by state, not by state transition
Martin von Zweigbergk <martinvonz@google.com>
parents:
23158
diff
changeset
|
738 R missing_content2_missing-untracked |
20d3e2d73432
test-revert: name files by state, not by state transition
Martin von Zweigbergk <martinvonz@google.com>
parents:
23158
diff
changeset
|
739 ! content1_content1_missing-tracked |
20d3e2d73432
test-revert: name files by state, not by state transition
Martin von Zweigbergk <martinvonz@google.com>
parents:
23158
diff
changeset
|
740 ! content1_content2_missing-tracked |
23161
6f31f46b8544
test-revert: make sure all 'tracked' files are really tracked
Martin von Zweigbergk <martinvonz@google.com>
parents:
23160
diff
changeset
|
741 ! content1_missing_missing-tracked |
23159
20d3e2d73432
test-revert: name files by state, not by state transition
Martin von Zweigbergk <martinvonz@google.com>
parents:
23158
diff
changeset
|
742 ! missing_content2_missing-tracked |
23161
6f31f46b8544
test-revert: make sure all 'tracked' files are really tracked
Martin von Zweigbergk <martinvonz@google.com>
parents:
23160
diff
changeset
|
743 ! missing_missing_missing-tracked |
23159
20d3e2d73432
test-revert: name files by state, not by state transition
Martin von Zweigbergk <martinvonz@google.com>
parents:
23158
diff
changeset
|
744 ? content1_missing_content1-untracked |
20d3e2d73432
test-revert: name files by state, not by state transition
Martin von Zweigbergk <martinvonz@google.com>
parents:
23158
diff
changeset
|
745 ? content1_missing_content3-untracked |
20d3e2d73432
test-revert: name files by state, not by state transition
Martin von Zweigbergk <martinvonz@google.com>
parents:
23158
diff
changeset
|
746 ? missing_missing_content3-untracked |
22124
e51784473fc0
test-revert: prepare methodical testing of revert cases
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
22123
diff
changeset
|
747 |
e51784473fc0
test-revert: prepare methodical testing of revert cases
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
22123
diff
changeset
|
748 $ hg status --rev 'desc("base")' |
23159
20d3e2d73432
test-revert: name files by state, not by state transition
Martin von Zweigbergk <martinvonz@google.com>
parents:
23158
diff
changeset
|
749 M content1_content1_content3-tracked |
20d3e2d73432
test-revert: name files by state, not by state transition
Martin von Zweigbergk <martinvonz@google.com>
parents:
23158
diff
changeset
|
750 M content1_content2_content2-tracked |
20d3e2d73432
test-revert: name files by state, not by state transition
Martin von Zweigbergk <martinvonz@google.com>
parents:
23158
diff
changeset
|
751 M content1_content2_content3-tracked |
20d3e2d73432
test-revert: name files by state, not by state transition
Martin von Zweigbergk <martinvonz@google.com>
parents:
23158
diff
changeset
|
752 M content1_missing_content3-tracked |
20d3e2d73432
test-revert: name files by state, not by state transition
Martin von Zweigbergk <martinvonz@google.com>
parents:
23158
diff
changeset
|
753 A missing_content2_content2-tracked |
20d3e2d73432
test-revert: name files by state, not by state transition
Martin von Zweigbergk <martinvonz@google.com>
parents:
23158
diff
changeset
|
754 A missing_content2_content3-tracked |
20d3e2d73432
test-revert: name files by state, not by state transition
Martin von Zweigbergk <martinvonz@google.com>
parents:
23158
diff
changeset
|
755 A missing_missing_content3-tracked |
20d3e2d73432
test-revert: name files by state, not by state transition
Martin von Zweigbergk <martinvonz@google.com>
parents:
23158
diff
changeset
|
756 R content1_content1_content1-untracked |
20d3e2d73432
test-revert: name files by state, not by state transition
Martin von Zweigbergk <martinvonz@google.com>
parents:
23158
diff
changeset
|
757 R content1_content1_content3-untracked |
20d3e2d73432
test-revert: name files by state, not by state transition
Martin von Zweigbergk <martinvonz@google.com>
parents:
23158
diff
changeset
|
758 R content1_content1_missing-untracked |
20d3e2d73432
test-revert: name files by state, not by state transition
Martin von Zweigbergk <martinvonz@google.com>
parents:
23158
diff
changeset
|
759 R content1_content2_content1-untracked |
20d3e2d73432
test-revert: name files by state, not by state transition
Martin von Zweigbergk <martinvonz@google.com>
parents:
23158
diff
changeset
|
760 R content1_content2_content2-untracked |
20d3e2d73432
test-revert: name files by state, not by state transition
Martin von Zweigbergk <martinvonz@google.com>
parents:
23158
diff
changeset
|
761 R content1_content2_content3-untracked |
20d3e2d73432
test-revert: name files by state, not by state transition
Martin von Zweigbergk <martinvonz@google.com>
parents:
23158
diff
changeset
|
762 R content1_content2_missing-untracked |
20d3e2d73432
test-revert: name files by state, not by state transition
Martin von Zweigbergk <martinvonz@google.com>
parents:
23158
diff
changeset
|
763 R content1_missing_content1-untracked |
20d3e2d73432
test-revert: name files by state, not by state transition
Martin von Zweigbergk <martinvonz@google.com>
parents:
23158
diff
changeset
|
764 R content1_missing_content3-untracked |
20d3e2d73432
test-revert: name files by state, not by state transition
Martin von Zweigbergk <martinvonz@google.com>
parents:
23158
diff
changeset
|
765 R content1_missing_missing-untracked |
20d3e2d73432
test-revert: name files by state, not by state transition
Martin von Zweigbergk <martinvonz@google.com>
parents:
23158
diff
changeset
|
766 ! content1_content1_missing-tracked |
20d3e2d73432
test-revert: name files by state, not by state transition
Martin von Zweigbergk <martinvonz@google.com>
parents:
23158
diff
changeset
|
767 ! content1_content2_missing-tracked |
23161
6f31f46b8544
test-revert: make sure all 'tracked' files are really tracked
Martin von Zweigbergk <martinvonz@google.com>
parents:
23160
diff
changeset
|
768 ! content1_missing_missing-tracked |
23159
20d3e2d73432
test-revert: name files by state, not by state transition
Martin von Zweigbergk <martinvonz@google.com>
parents:
23158
diff
changeset
|
769 ! missing_content2_missing-tracked |
23161
6f31f46b8544
test-revert: make sure all 'tracked' files are really tracked
Martin von Zweigbergk <martinvonz@google.com>
parents:
23160
diff
changeset
|
770 ! missing_missing_missing-tracked |
23159
20d3e2d73432
test-revert: name files by state, not by state transition
Martin von Zweigbergk <martinvonz@google.com>
parents:
23158
diff
changeset
|
771 ? missing_missing_content3-untracked |
22124
e51784473fc0
test-revert: prepare methodical testing of revert cases
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
22123
diff
changeset
|
772 |
22126
651b2149f1e7
test-revert: also create a text version of the snapshot
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
22124
diff
changeset
|
773 (create a simple text version of the content) |
651b2149f1e7
test-revert: also create a text version of the snapshot
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
22124
diff
changeset
|
774 |
39707
5abc47d4ca6b
tests: quote PYTHON usage
Matt Harbison <matt_harbison@yahoo.com>
parents:
39405
diff
changeset
|
775 $ "$PYTHON" ../dircontent.py > ../content-wc.txt |
22126
651b2149f1e7
test-revert: also create a text version of the snapshot
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
22124
diff
changeset
|
776 $ cat ../content-wc.txt |
23159
20d3e2d73432
test-revert: name files by state, not by state transition
Martin von Zweigbergk <martinvonz@google.com>
parents:
23158
diff
changeset
|
777 content1 content1_content1_content1-tracked |
20d3e2d73432
test-revert: name files by state, not by state transition
Martin von Zweigbergk <martinvonz@google.com>
parents:
23158
diff
changeset
|
778 content1 content1_content1_content1-untracked |
20d3e2d73432
test-revert: name files by state, not by state transition
Martin von Zweigbergk <martinvonz@google.com>
parents:
23158
diff
changeset
|
779 content3 content1_content1_content3-tracked |
20d3e2d73432
test-revert: name files by state, not by state transition
Martin von Zweigbergk <martinvonz@google.com>
parents:
23158
diff
changeset
|
780 content3 content1_content1_content3-untracked |
20d3e2d73432
test-revert: name files by state, not by state transition
Martin von Zweigbergk <martinvonz@google.com>
parents:
23158
diff
changeset
|
781 content1 content1_content2_content1-tracked |
20d3e2d73432
test-revert: name files by state, not by state transition
Martin von Zweigbergk <martinvonz@google.com>
parents:
23158
diff
changeset
|
782 content1 content1_content2_content1-untracked |
20d3e2d73432
test-revert: name files by state, not by state transition
Martin von Zweigbergk <martinvonz@google.com>
parents:
23158
diff
changeset
|
783 content2 content1_content2_content2-tracked |
20d3e2d73432
test-revert: name files by state, not by state transition
Martin von Zweigbergk <martinvonz@google.com>
parents:
23158
diff
changeset
|
784 content2 content1_content2_content2-untracked |
20d3e2d73432
test-revert: name files by state, not by state transition
Martin von Zweigbergk <martinvonz@google.com>
parents:
23158
diff
changeset
|
785 content3 content1_content2_content3-tracked |
20d3e2d73432
test-revert: name files by state, not by state transition
Martin von Zweigbergk <martinvonz@google.com>
parents:
23158
diff
changeset
|
786 content3 content1_content2_content3-untracked |
20d3e2d73432
test-revert: name files by state, not by state transition
Martin von Zweigbergk <martinvonz@google.com>
parents:
23158
diff
changeset
|
787 content1 content1_missing_content1-tracked |
20d3e2d73432
test-revert: name files by state, not by state transition
Martin von Zweigbergk <martinvonz@google.com>
parents:
23158
diff
changeset
|
788 content1 content1_missing_content1-untracked |
20d3e2d73432
test-revert: name files by state, not by state transition
Martin von Zweigbergk <martinvonz@google.com>
parents:
23158
diff
changeset
|
789 content3 content1_missing_content3-tracked |
20d3e2d73432
test-revert: name files by state, not by state transition
Martin von Zweigbergk <martinvonz@google.com>
parents:
23158
diff
changeset
|
790 content3 content1_missing_content3-untracked |
20d3e2d73432
test-revert: name files by state, not by state transition
Martin von Zweigbergk <martinvonz@google.com>
parents:
23158
diff
changeset
|
791 content2 missing_content2_content2-tracked |
20d3e2d73432
test-revert: name files by state, not by state transition
Martin von Zweigbergk <martinvonz@google.com>
parents:
23158
diff
changeset
|
792 content2 missing_content2_content2-untracked |
20d3e2d73432
test-revert: name files by state, not by state transition
Martin von Zweigbergk <martinvonz@google.com>
parents:
23158
diff
changeset
|
793 content3 missing_content2_content3-tracked |
20d3e2d73432
test-revert: name files by state, not by state transition
Martin von Zweigbergk <martinvonz@google.com>
parents:
23158
diff
changeset
|
794 content3 missing_content2_content3-untracked |
20d3e2d73432
test-revert: name files by state, not by state transition
Martin von Zweigbergk <martinvonz@google.com>
parents:
23158
diff
changeset
|
795 content3 missing_missing_content3-tracked |
20d3e2d73432
test-revert: name files by state, not by state transition
Martin von Zweigbergk <martinvonz@google.com>
parents:
23158
diff
changeset
|
796 content3 missing_missing_content3-untracked |
22126
651b2149f1e7
test-revert: also create a text version of the snapshot
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
22124
diff
changeset
|
797 |
22124
e51784473fc0
test-revert: prepare methodical testing of revert cases
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
22123
diff
changeset
|
798 $ cd .. |
e51784473fc0
test-revert: prepare methodical testing of revert cases
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
22123
diff
changeset
|
799 |
22128
db23fb4e210d
test-revert: add methodical revert to parent for working directory
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
22127
diff
changeset
|
800 Test revert --all to parent content |
db23fb4e210d
test-revert: add methodical revert to parent for working directory
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
22127
diff
changeset
|
801 ----------------------------------- |
db23fb4e210d
test-revert: add methodical revert to parent for working directory
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
22127
diff
changeset
|
802 |
db23fb4e210d
test-revert: add methodical revert to parent for working directory
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
22127
diff
changeset
|
803 (setup from reference repo) |
db23fb4e210d
test-revert: add methodical revert to parent for working directory
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
22127
diff
changeset
|
804 |
30556
c059286a0f9c
tests: replace "cp -r" with "cp -R"
Jun Wu <quark@fb.com>
parents:
28192
diff
changeset
|
805 $ cp -R revert-ref revert-parent-all |
22128
db23fb4e210d
test-revert: add methodical revert to parent for working directory
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
22127
diff
changeset
|
806 $ cd revert-parent-all |
db23fb4e210d
test-revert: add methodical revert to parent for working directory
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
22127
diff
changeset
|
807 |
db23fb4e210d
test-revert: add methodical revert to parent for working directory
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
22127
diff
changeset
|
808 check revert output |
db23fb4e210d
test-revert: add methodical revert to parent for working directory
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
22127
diff
changeset
|
809 |
db23fb4e210d
test-revert: add methodical revert to parent for working directory
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
22127
diff
changeset
|
810 $ hg revert --all |
23159
20d3e2d73432
test-revert: name files by state, not by state transition
Martin von Zweigbergk <martinvonz@google.com>
parents:
23158
diff
changeset
|
811 forgetting content1_missing_content1-tracked |
20d3e2d73432
test-revert: name files by state, not by state transition
Martin von Zweigbergk <martinvonz@google.com>
parents:
23158
diff
changeset
|
812 forgetting content1_missing_content3-tracked |
23161
6f31f46b8544
test-revert: make sure all 'tracked' files are really tracked
Martin von Zweigbergk <martinvonz@google.com>
parents:
23160
diff
changeset
|
813 forgetting content1_missing_missing-tracked |
23159
20d3e2d73432
test-revert: name files by state, not by state transition
Martin von Zweigbergk <martinvonz@google.com>
parents:
23158
diff
changeset
|
814 forgetting missing_missing_content3-tracked |
23161
6f31f46b8544
test-revert: make sure all 'tracked' files are really tracked
Martin von Zweigbergk <martinvonz@google.com>
parents:
23160
diff
changeset
|
815 forgetting missing_missing_missing-tracked |
39405
cb70501d8b71
revert: fix the inconsistency of status msgs in --interactive mode
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
35393
diff
changeset
|
816 reverting content1_content1_content3-tracked |
cb70501d8b71
revert: fix the inconsistency of status msgs in --interactive mode
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
35393
diff
changeset
|
817 reverting content1_content1_missing-tracked |
cb70501d8b71
revert: fix the inconsistency of status msgs in --interactive mode
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
35393
diff
changeset
|
818 reverting content1_content2_content1-tracked |
cb70501d8b71
revert: fix the inconsistency of status msgs in --interactive mode
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
35393
diff
changeset
|
819 reverting content1_content2_content3-tracked |
cb70501d8b71
revert: fix the inconsistency of status msgs in --interactive mode
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
35393
diff
changeset
|
820 reverting content1_content2_missing-tracked |
cb70501d8b71
revert: fix the inconsistency of status msgs in --interactive mode
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
35393
diff
changeset
|
821 reverting missing_content2_content3-tracked |
cb70501d8b71
revert: fix the inconsistency of status msgs in --interactive mode
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
35393
diff
changeset
|
822 reverting missing_content2_missing-tracked |
cb70501d8b71
revert: fix the inconsistency of status msgs in --interactive mode
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
35393
diff
changeset
|
823 undeleting content1_content1_content1-untracked |
cb70501d8b71
revert: fix the inconsistency of status msgs in --interactive mode
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
35393
diff
changeset
|
824 undeleting content1_content1_content3-untracked |
cb70501d8b71
revert: fix the inconsistency of status msgs in --interactive mode
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
35393
diff
changeset
|
825 undeleting content1_content1_missing-untracked |
cb70501d8b71
revert: fix the inconsistency of status msgs in --interactive mode
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
35393
diff
changeset
|
826 undeleting content1_content2_content1-untracked |
cb70501d8b71
revert: fix the inconsistency of status msgs in --interactive mode
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
35393
diff
changeset
|
827 undeleting content1_content2_content2-untracked |
cb70501d8b71
revert: fix the inconsistency of status msgs in --interactive mode
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
35393
diff
changeset
|
828 undeleting content1_content2_content3-untracked |
cb70501d8b71
revert: fix the inconsistency of status msgs in --interactive mode
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
35393
diff
changeset
|
829 undeleting content1_content2_missing-untracked |
cb70501d8b71
revert: fix the inconsistency of status msgs in --interactive mode
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
35393
diff
changeset
|
830 undeleting missing_content2_content2-untracked |
cb70501d8b71
revert: fix the inconsistency of status msgs in --interactive mode
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
35393
diff
changeset
|
831 undeleting missing_content2_content3-untracked |
cb70501d8b71
revert: fix the inconsistency of status msgs in --interactive mode
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
35393
diff
changeset
|
832 undeleting missing_content2_missing-untracked |
22128
db23fb4e210d
test-revert: add methodical revert to parent for working directory
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
22127
diff
changeset
|
833 |
db23fb4e210d
test-revert: add methodical revert to parent for working directory
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
22127
diff
changeset
|
834 Compare resulting directory with revert target. |
db23fb4e210d
test-revert: add methodical revert to parent for working directory
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
22127
diff
changeset
|
835 |
db23fb4e210d
test-revert: add methodical revert to parent for working directory
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
22127
diff
changeset
|
836 The diff is filtered to include change only. The only difference should be |
db23fb4e210d
test-revert: add methodical revert to parent for working directory
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
22127
diff
changeset
|
837 additional `.orig` backup file when applicable. |
db23fb4e210d
test-revert: add methodical revert to parent for working directory
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
22127
diff
changeset
|
838 |
39707
5abc47d4ca6b
tests: quote PYTHON usage
Matt Harbison <matt_harbison@yahoo.com>
parents:
39405
diff
changeset
|
839 $ "$PYTHON" ../dircontent.py > ../content-parent-all.txt |
22128
db23fb4e210d
test-revert: add methodical revert to parent for working directory
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
22127
diff
changeset
|
840 $ cd .. |
db23fb4e210d
test-revert: add methodical revert to parent for working directory
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
22127
diff
changeset
|
841 $ diff -U 0 -- content-parent.txt content-parent-all.txt | grep _ |
23159
20d3e2d73432
test-revert: name files by state, not by state transition
Martin von Zweigbergk <martinvonz@google.com>
parents:
23158
diff
changeset
|
842 +content3 content1_content1_content3-tracked.orig |
20d3e2d73432
test-revert: name files by state, not by state transition
Martin von Zweigbergk <martinvonz@google.com>
parents:
23158
diff
changeset
|
843 +content3 content1_content1_content3-untracked.orig |
20d3e2d73432
test-revert: name files by state, not by state transition
Martin von Zweigbergk <martinvonz@google.com>
parents:
23158
diff
changeset
|
844 +content1 content1_content2_content1-tracked.orig |
20d3e2d73432
test-revert: name files by state, not by state transition
Martin von Zweigbergk <martinvonz@google.com>
parents:
23158
diff
changeset
|
845 +content1 content1_content2_content1-untracked.orig |
20d3e2d73432
test-revert: name files by state, not by state transition
Martin von Zweigbergk <martinvonz@google.com>
parents:
23158
diff
changeset
|
846 +content3 content1_content2_content3-tracked.orig |
20d3e2d73432
test-revert: name files by state, not by state transition
Martin von Zweigbergk <martinvonz@google.com>
parents:
23158
diff
changeset
|
847 +content3 content1_content2_content3-untracked.orig |
20d3e2d73432
test-revert: name files by state, not by state transition
Martin von Zweigbergk <martinvonz@google.com>
parents:
23158
diff
changeset
|
848 +content1 content1_missing_content1-tracked |
20d3e2d73432
test-revert: name files by state, not by state transition
Martin von Zweigbergk <martinvonz@google.com>
parents:
23158
diff
changeset
|
849 +content1 content1_missing_content1-untracked |
20d3e2d73432
test-revert: name files by state, not by state transition
Martin von Zweigbergk <martinvonz@google.com>
parents:
23158
diff
changeset
|
850 +content3 content1_missing_content3-tracked |
20d3e2d73432
test-revert: name files by state, not by state transition
Martin von Zweigbergk <martinvonz@google.com>
parents:
23158
diff
changeset
|
851 +content3 content1_missing_content3-untracked |
20d3e2d73432
test-revert: name files by state, not by state transition
Martin von Zweigbergk <martinvonz@google.com>
parents:
23158
diff
changeset
|
852 +content3 missing_content2_content3-tracked.orig |
20d3e2d73432
test-revert: name files by state, not by state transition
Martin von Zweigbergk <martinvonz@google.com>
parents:
23158
diff
changeset
|
853 +content3 missing_content2_content3-untracked.orig |
20d3e2d73432
test-revert: name files by state, not by state transition
Martin von Zweigbergk <martinvonz@google.com>
parents:
23158
diff
changeset
|
854 +content3 missing_missing_content3-tracked |
20d3e2d73432
test-revert: name files by state, not by state transition
Martin von Zweigbergk <martinvonz@google.com>
parents:
23158
diff
changeset
|
855 +content3 missing_missing_content3-untracked |
22129
f0147ff1109f
test-revert: add methodical revert to "base"
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
22128
diff
changeset
|
856 |
f0147ff1109f
test-revert: add methodical revert to "base"
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
22128
diff
changeset
|
857 Test revert --all to "base" content |
f0147ff1109f
test-revert: add methodical revert to "base"
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
22128
diff
changeset
|
858 ----------------------------------- |
f0147ff1109f
test-revert: add methodical revert to "base"
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
22128
diff
changeset
|
859 |
f0147ff1109f
test-revert: add methodical revert to "base"
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
22128
diff
changeset
|
860 (setup from reference repo) |
f0147ff1109f
test-revert: add methodical revert to "base"
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
22128
diff
changeset
|
861 |
30556
c059286a0f9c
tests: replace "cp -r" with "cp -R"
Jun Wu <quark@fb.com>
parents:
28192
diff
changeset
|
862 $ cp -R revert-ref revert-base-all |
22129
f0147ff1109f
test-revert: add methodical revert to "base"
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
22128
diff
changeset
|
863 $ cd revert-base-all |
f0147ff1109f
test-revert: add methodical revert to "base"
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
22128
diff
changeset
|
864 |
f0147ff1109f
test-revert: add methodical revert to "base"
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
22128
diff
changeset
|
865 check revert output |
f0147ff1109f
test-revert: add methodical revert to "base"
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
22128
diff
changeset
|
866 |
f0147ff1109f
test-revert: add methodical revert to "base"
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
22128
diff
changeset
|
867 $ hg revert --all --rev 'desc(base)' |
39405
cb70501d8b71
revert: fix the inconsistency of status msgs in --interactive mode
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
35393
diff
changeset
|
868 forgetting missing_missing_content3-tracked |
cb70501d8b71
revert: fix the inconsistency of status msgs in --interactive mode
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
35393
diff
changeset
|
869 forgetting missing_missing_missing-tracked |
23159
20d3e2d73432
test-revert: name files by state, not by state transition
Martin von Zweigbergk <martinvonz@google.com>
parents:
23158
diff
changeset
|
870 removing missing_content2_content2-tracked |
20d3e2d73432
test-revert: name files by state, not by state transition
Martin von Zweigbergk <martinvonz@google.com>
parents:
23158
diff
changeset
|
871 removing missing_content2_content3-tracked |
20d3e2d73432
test-revert: name files by state, not by state transition
Martin von Zweigbergk <martinvonz@google.com>
parents:
23158
diff
changeset
|
872 removing missing_content2_missing-tracked |
39405
cb70501d8b71
revert: fix the inconsistency of status msgs in --interactive mode
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
35393
diff
changeset
|
873 reverting content1_content1_content3-tracked |
cb70501d8b71
revert: fix the inconsistency of status msgs in --interactive mode
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
35393
diff
changeset
|
874 reverting content1_content1_missing-tracked |
cb70501d8b71
revert: fix the inconsistency of status msgs in --interactive mode
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
35393
diff
changeset
|
875 reverting content1_content2_content2-tracked |
cb70501d8b71
revert: fix the inconsistency of status msgs in --interactive mode
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
35393
diff
changeset
|
876 reverting content1_content2_content3-tracked |
cb70501d8b71
revert: fix the inconsistency of status msgs in --interactive mode
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
35393
diff
changeset
|
877 reverting content1_content2_missing-tracked |
cb70501d8b71
revert: fix the inconsistency of status msgs in --interactive mode
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
35393
diff
changeset
|
878 reverting content1_missing_content3-tracked |
cb70501d8b71
revert: fix the inconsistency of status msgs in --interactive mode
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
35393
diff
changeset
|
879 reverting content1_missing_missing-tracked |
cb70501d8b71
revert: fix the inconsistency of status msgs in --interactive mode
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
35393
diff
changeset
|
880 adding content1_missing_content1-untracked |
cb70501d8b71
revert: fix the inconsistency of status msgs in --interactive mode
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
35393
diff
changeset
|
881 adding content1_missing_content3-untracked |
cb70501d8b71
revert: fix the inconsistency of status msgs in --interactive mode
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
35393
diff
changeset
|
882 adding content1_missing_missing-untracked |
cb70501d8b71
revert: fix the inconsistency of status msgs in --interactive mode
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
35393
diff
changeset
|
883 undeleting content1_content1_content1-untracked |
cb70501d8b71
revert: fix the inconsistency of status msgs in --interactive mode
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
35393
diff
changeset
|
884 undeleting content1_content1_content3-untracked |
cb70501d8b71
revert: fix the inconsistency of status msgs in --interactive mode
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
35393
diff
changeset
|
885 undeleting content1_content1_missing-untracked |
cb70501d8b71
revert: fix the inconsistency of status msgs in --interactive mode
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
35393
diff
changeset
|
886 undeleting content1_content2_content1-untracked |
cb70501d8b71
revert: fix the inconsistency of status msgs in --interactive mode
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
35393
diff
changeset
|
887 undeleting content1_content2_content2-untracked |
cb70501d8b71
revert: fix the inconsistency of status msgs in --interactive mode
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
35393
diff
changeset
|
888 undeleting content1_content2_content3-untracked |
cb70501d8b71
revert: fix the inconsistency of status msgs in --interactive mode
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
35393
diff
changeset
|
889 undeleting content1_content2_missing-untracked |
22129
f0147ff1109f
test-revert: add methodical revert to "base"
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
22128
diff
changeset
|
890 |
f0147ff1109f
test-revert: add methodical revert to "base"
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
22128
diff
changeset
|
891 Compare resulting directory with revert target. |
f0147ff1109f
test-revert: add methodical revert to "base"
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
22128
diff
changeset
|
892 |
f0147ff1109f
test-revert: add methodical revert to "base"
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
22128
diff
changeset
|
893 The diff is filtered to include change only. The only difference should be |
f0147ff1109f
test-revert: add methodical revert to "base"
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
22128
diff
changeset
|
894 additional `.orig` backup file when applicable. |
f0147ff1109f
test-revert: add methodical revert to "base"
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
22128
diff
changeset
|
895 |
39707
5abc47d4ca6b
tests: quote PYTHON usage
Matt Harbison <matt_harbison@yahoo.com>
parents:
39405
diff
changeset
|
896 $ "$PYTHON" ../dircontent.py > ../content-base-all.txt |
22129
f0147ff1109f
test-revert: add methodical revert to "base"
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
22128
diff
changeset
|
897 $ cd .. |
f0147ff1109f
test-revert: add methodical revert to "base"
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
22128
diff
changeset
|
898 $ diff -U 0 -- content-base.txt content-base-all.txt | grep _ |
23159
20d3e2d73432
test-revert: name files by state, not by state transition
Martin von Zweigbergk <martinvonz@google.com>
parents:
23158
diff
changeset
|
899 +content3 content1_content1_content3-tracked.orig |
20d3e2d73432
test-revert: name files by state, not by state transition
Martin von Zweigbergk <martinvonz@google.com>
parents:
23158
diff
changeset
|
900 +content3 content1_content1_content3-untracked.orig |
20d3e2d73432
test-revert: name files by state, not by state transition
Martin von Zweigbergk <martinvonz@google.com>
parents:
23158
diff
changeset
|
901 +content2 content1_content2_content2-untracked.orig |
20d3e2d73432
test-revert: name files by state, not by state transition
Martin von Zweigbergk <martinvonz@google.com>
parents:
23158
diff
changeset
|
902 +content3 content1_content2_content3-tracked.orig |
20d3e2d73432
test-revert: name files by state, not by state transition
Martin von Zweigbergk <martinvonz@google.com>
parents:
23158
diff
changeset
|
903 +content3 content1_content2_content3-untracked.orig |
20d3e2d73432
test-revert: name files by state, not by state transition
Martin von Zweigbergk <martinvonz@google.com>
parents:
23158
diff
changeset
|
904 +content3 content1_missing_content3-tracked.orig |
20d3e2d73432
test-revert: name files by state, not by state transition
Martin von Zweigbergk <martinvonz@google.com>
parents:
23158
diff
changeset
|
905 +content3 content1_missing_content3-untracked.orig |
20d3e2d73432
test-revert: name files by state, not by state transition
Martin von Zweigbergk <martinvonz@google.com>
parents:
23158
diff
changeset
|
906 +content2 missing_content2_content2-untracked |
20d3e2d73432
test-revert: name files by state, not by state transition
Martin von Zweigbergk <martinvonz@google.com>
parents:
23158
diff
changeset
|
907 +content3 missing_content2_content3-tracked.orig |
20d3e2d73432
test-revert: name files by state, not by state transition
Martin von Zweigbergk <martinvonz@google.com>
parents:
23158
diff
changeset
|
908 +content3 missing_content2_content3-untracked |
20d3e2d73432
test-revert: name files by state, not by state transition
Martin von Zweigbergk <martinvonz@google.com>
parents:
23158
diff
changeset
|
909 +content3 missing_missing_content3-tracked |
20d3e2d73432
test-revert: name files by state, not by state transition
Martin von Zweigbergk <martinvonz@google.com>
parents:
23158
diff
changeset
|
910 +content3 missing_missing_content3-untracked |
22130
78abb9a42830
test-revert: add methodical revert with explicit file path
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
22129
diff
changeset
|
911 |
78abb9a42830
test-revert: add methodical revert with explicit file path
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
22129
diff
changeset
|
912 Test revert to parent content with explicit file name |
78abb9a42830
test-revert: add methodical revert with explicit file path
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
22129
diff
changeset
|
913 ----------------------------------------------------- |
78abb9a42830
test-revert: add methodical revert with explicit file path
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
22129
diff
changeset
|
914 |
78abb9a42830
test-revert: add methodical revert with explicit file path
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
22129
diff
changeset
|
915 (setup from reference repo) |
78abb9a42830
test-revert: add methodical revert with explicit file path
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
22129
diff
changeset
|
916 |
30556
c059286a0f9c
tests: replace "cp -r" with "cp -R"
Jun Wu <quark@fb.com>
parents:
28192
diff
changeset
|
917 $ cp -R revert-ref revert-parent-explicit |
22130
78abb9a42830
test-revert: add methodical revert with explicit file path
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
22129
diff
changeset
|
918 $ cd revert-parent-explicit |
78abb9a42830
test-revert: add methodical revert with explicit file path
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
22129
diff
changeset
|
919 |
78abb9a42830
test-revert: add methodical revert with explicit file path
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
22129
diff
changeset
|
920 revert all files individually and check the output |
78abb9a42830
test-revert: add methodical revert with explicit file path
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
22129
diff
changeset
|
921 (output is expected to be different than in the --all case) |
78abb9a42830
test-revert: add methodical revert with explicit file path
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
22129
diff
changeset
|
922 |
39707
5abc47d4ca6b
tests: quote PYTHON usage
Matt Harbison <matt_harbison@yahoo.com>
parents:
39405
diff
changeset
|
923 $ for file in `"$PYTHON" $TESTDIR/generate-working-copy-states.py filelist 2`; do |
22130
78abb9a42830
test-revert: add methodical revert with explicit file path
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
22129
diff
changeset
|
924 > echo '### revert for:' $file; |
78abb9a42830
test-revert: add methodical revert with explicit file path
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
22129
diff
changeset
|
925 > hg revert $file; |
78abb9a42830
test-revert: add methodical revert with explicit file path
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
22129
diff
changeset
|
926 > echo |
78abb9a42830
test-revert: add methodical revert with explicit file path
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
22129
diff
changeset
|
927 > done |
23160
4f4e6815f286
test-revert: sort by output filename again
Martin von Zweigbergk <martinvonz@google.com>
parents:
23159
diff
changeset
|
928 ### revert for: content1_content1_content1-tracked |
4f4e6815f286
test-revert: sort by output filename again
Martin von Zweigbergk <martinvonz@google.com>
parents:
23159
diff
changeset
|
929 no changes needed to content1_content1_content1-tracked |
22144
b7c9f07b76c1
test-revert: add case where file is tracked but deleted in working directory
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
22143
diff
changeset
|
930 |
23160
4f4e6815f286
test-revert: sort by output filename again
Martin von Zweigbergk <martinvonz@google.com>
parents:
23159
diff
changeset
|
931 ### revert for: content1_content1_content1-untracked |
22140
74e932047975
test-revert: add case where the file is marked as removed in the wc
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
22139
diff
changeset
|
932 |
23160
4f4e6815f286
test-revert: sort by output filename again
Martin von Zweigbergk <martinvonz@google.com>
parents:
23159
diff
changeset
|
933 ### revert for: content1_content1_content3-tracked |
22141
6b522c1139a9
test-revert: add case where file exists but is untracked in working directory
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
22140
diff
changeset
|
934 |
23160
4f4e6815f286
test-revert: sort by output filename again
Martin von Zweigbergk <martinvonz@google.com>
parents:
23159
diff
changeset
|
935 ### revert for: content1_content1_content3-untracked |
22142
e1a69b0ac9e6
test-revert: add case with untracked files with reverted content
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
22141
diff
changeset
|
936 |
23160
4f4e6815f286
test-revert: sort by output filename again
Martin von Zweigbergk <martinvonz@google.com>
parents:
23159
diff
changeset
|
937 ### revert for: content1_content1_missing-tracked |
22143
ca278b893940
test-revert: add case with untracked files with unique content
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
22142
diff
changeset
|
938 |
23160
4f4e6815f286
test-revert: sort by output filename again
Martin von Zweigbergk <martinvonz@google.com>
parents:
23159
diff
changeset
|
939 ### revert for: content1_content1_missing-untracked |
22139
1ecd6f1f9869
test-revert: add case where wc content is different from "base" and "parent"
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
22138
diff
changeset
|
940 |
23160
4f4e6815f286
test-revert: sort by output filename again
Martin von Zweigbergk <martinvonz@google.com>
parents:
23159
diff
changeset
|
941 ### revert for: content1_content2_content1-tracked |
22144
b7c9f07b76c1
test-revert: add case where file is tracked but deleted in working directory
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
22143
diff
changeset
|
942 |
23160
4f4e6815f286
test-revert: sort by output filename again
Martin von Zweigbergk <martinvonz@google.com>
parents:
23159
diff
changeset
|
943 ### revert for: content1_content2_content1-untracked |
22138
80206e63c3cc
test-revert: add case where wc content is already reverted to base content
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
22137
diff
changeset
|
944 |
23160
4f4e6815f286
test-revert: sort by output filename again
Martin von Zweigbergk <martinvonz@google.com>
parents:
23159
diff
changeset
|
945 ### revert for: content1_content2_content2-tracked |
4f4e6815f286
test-revert: sort by output filename again
Martin von Zweigbergk <martinvonz@google.com>
parents:
23159
diff
changeset
|
946 no changes needed to content1_content2_content2-tracked |
22141
6b522c1139a9
test-revert: add case where file exists but is untracked in working directory
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
22140
diff
changeset
|
947 |
23160
4f4e6815f286
test-revert: sort by output filename again
Martin von Zweigbergk <martinvonz@google.com>
parents:
23159
diff
changeset
|
948 ### revert for: content1_content2_content2-untracked |
22143
ca278b893940
test-revert: add case with untracked files with unique content
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
22142
diff
changeset
|
949 |
23160
4f4e6815f286
test-revert: sort by output filename again
Martin von Zweigbergk <martinvonz@google.com>
parents:
23159
diff
changeset
|
950 ### revert for: content1_content2_content3-tracked |
22139
1ecd6f1f9869
test-revert: add case where wc content is different from "base" and "parent"
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
22138
diff
changeset
|
951 |
23160
4f4e6815f286
test-revert: sort by output filename again
Martin von Zweigbergk <martinvonz@google.com>
parents:
23159
diff
changeset
|
952 ### revert for: content1_content2_content3-untracked |
22137
2cfe5ec47803
test-revert: add case where file exists neither in "base" nor in "parent"
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
22136
diff
changeset
|
953 |
23160
4f4e6815f286
test-revert: sort by output filename again
Martin von Zweigbergk <martinvonz@google.com>
parents:
23159
diff
changeset
|
954 ### revert for: content1_content2_missing-tracked |
22144
b7c9f07b76c1
test-revert: add case where file is tracked but deleted in working directory
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
22143
diff
changeset
|
955 |
23160
4f4e6815f286
test-revert: sort by output filename again
Martin von Zweigbergk <martinvonz@google.com>
parents:
23159
diff
changeset
|
956 ### revert for: content1_content2_missing-untracked |
22140
74e932047975
test-revert: add case where the file is marked as removed in the wc
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
22139
diff
changeset
|
957 |
23160
4f4e6815f286
test-revert: sort by output filename again
Martin von Zweigbergk <martinvonz@google.com>
parents:
23159
diff
changeset
|
958 ### revert for: content1_missing_content1-tracked |
22138
80206e63c3cc
test-revert: add case where wc content is already reverted to base content
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
22137
diff
changeset
|
959 |
23160
4f4e6815f286
test-revert: sort by output filename again
Martin von Zweigbergk <martinvonz@google.com>
parents:
23159
diff
changeset
|
960 ### revert for: content1_missing_content1-untracked |
4f4e6815f286
test-revert: sort by output filename again
Martin von Zweigbergk <martinvonz@google.com>
parents:
23159
diff
changeset
|
961 file not managed: content1_missing_content1-untracked |
22141
6b522c1139a9
test-revert: add case where file exists but is untracked in working directory
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
22140
diff
changeset
|
962 |
23160
4f4e6815f286
test-revert: sort by output filename again
Martin von Zweigbergk <martinvonz@google.com>
parents:
23159
diff
changeset
|
963 ### revert for: content1_missing_content3-tracked |
22142
e1a69b0ac9e6
test-revert: add case with untracked files with reverted content
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
22141
diff
changeset
|
964 |
23160
4f4e6815f286
test-revert: sort by output filename again
Martin von Zweigbergk <martinvonz@google.com>
parents:
23159
diff
changeset
|
965 ### revert for: content1_missing_content3-untracked |
4f4e6815f286
test-revert: sort by output filename again
Martin von Zweigbergk <martinvonz@google.com>
parents:
23159
diff
changeset
|
966 file not managed: content1_missing_content3-untracked |
22139
1ecd6f1f9869
test-revert: add case where wc content is different from "base" and "parent"
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
22138
diff
changeset
|
967 |
23160
4f4e6815f286
test-revert: sort by output filename again
Martin von Zweigbergk <martinvonz@google.com>
parents:
23159
diff
changeset
|
968 ### revert for: content1_missing_missing-tracked |
22130
78abb9a42830
test-revert: add methodical revert with explicit file path
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
22129
diff
changeset
|
969 |
23160
4f4e6815f286
test-revert: sort by output filename again
Martin von Zweigbergk <martinvonz@google.com>
parents:
23159
diff
changeset
|
970 ### revert for: content1_missing_missing-untracked |
4f4e6815f286
test-revert: sort by output filename again
Martin von Zweigbergk <martinvonz@google.com>
parents:
23159
diff
changeset
|
971 content1_missing_missing-untracked: no such file in rev * (glob) |
22144
b7c9f07b76c1
test-revert: add case where file is tracked but deleted in working directory
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
22143
diff
changeset
|
972 |
23159
20d3e2d73432
test-revert: name files by state, not by state transition
Martin von Zweigbergk <martinvonz@google.com>
parents:
23158
diff
changeset
|
973 ### revert for: missing_content2_content2-tracked |
20d3e2d73432
test-revert: name files by state, not by state transition
Martin von Zweigbergk <martinvonz@google.com>
parents:
23158
diff
changeset
|
974 no changes needed to missing_content2_content2-tracked |
22138
80206e63c3cc
test-revert: add case where wc content is already reverted to base content
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
22137
diff
changeset
|
975 |
23159
20d3e2d73432
test-revert: name files by state, not by state transition
Martin von Zweigbergk <martinvonz@google.com>
parents:
23158
diff
changeset
|
976 ### revert for: missing_content2_content2-untracked |
22142
e1a69b0ac9e6
test-revert: add case with untracked files with reverted content
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
22141
diff
changeset
|
977 |
23159
20d3e2d73432
test-revert: name files by state, not by state transition
Martin von Zweigbergk <martinvonz@google.com>
parents:
23158
diff
changeset
|
978 ### revert for: missing_content2_content3-tracked |
22143
ca278b893940
test-revert: add case with untracked files with unique content
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
22142
diff
changeset
|
979 |
23160
4f4e6815f286
test-revert: sort by output filename again
Martin von Zweigbergk <martinvonz@google.com>
parents:
23159
diff
changeset
|
980 ### revert for: missing_content2_content3-untracked |
22139
1ecd6f1f9869
test-revert: add case where wc content is different from "base" and "parent"
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
22138
diff
changeset
|
981 |
23160
4f4e6815f286
test-revert: sort by output filename again
Martin von Zweigbergk <martinvonz@google.com>
parents:
23159
diff
changeset
|
982 ### revert for: missing_content2_missing-tracked |
22136
a29574cb8552
test-revert: add case where the file is removed between "base" and "parent"
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
22135
diff
changeset
|
983 |
23160
4f4e6815f286
test-revert: sort by output filename again
Martin von Zweigbergk <martinvonz@google.com>
parents:
23159
diff
changeset
|
984 ### revert for: missing_content2_missing-untracked |
22140
74e932047975
test-revert: add case where the file is marked as removed in the wc
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
22139
diff
changeset
|
985 |
23160
4f4e6815f286
test-revert: sort by output filename again
Martin von Zweigbergk <martinvonz@google.com>
parents:
23159
diff
changeset
|
986 ### revert for: missing_missing_content3-tracked |
22138
80206e63c3cc
test-revert: add case where wc content is already reverted to base content
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
22137
diff
changeset
|
987 |
23160
4f4e6815f286
test-revert: sort by output filename again
Martin von Zweigbergk <martinvonz@google.com>
parents:
23159
diff
changeset
|
988 ### revert for: missing_missing_content3-untracked |
4f4e6815f286
test-revert: sort by output filename again
Martin von Zweigbergk <martinvonz@google.com>
parents:
23159
diff
changeset
|
989 file not managed: missing_missing_content3-untracked |
22141
6b522c1139a9
test-revert: add case where file exists but is untracked in working directory
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
22140
diff
changeset
|
990 |
23159
20d3e2d73432
test-revert: name files by state, not by state transition
Martin von Zweigbergk <martinvonz@google.com>
parents:
23158
diff
changeset
|
991 ### revert for: missing_missing_missing-tracked |
22142
e1a69b0ac9e6
test-revert: add case with untracked files with reverted content
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
22141
diff
changeset
|
992 |
23159
20d3e2d73432
test-revert: name files by state, not by state transition
Martin von Zweigbergk <martinvonz@google.com>
parents:
23158
diff
changeset
|
993 ### revert for: missing_missing_missing-untracked |
20d3e2d73432
test-revert: name files by state, not by state transition
Martin von Zweigbergk <martinvonz@google.com>
parents:
23158
diff
changeset
|
994 missing_missing_missing-untracked: no such file in rev * (glob) |
22139
1ecd6f1f9869
test-revert: add case where wc content is different from "base" and "parent"
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
22138
diff
changeset
|
995 |
22130
78abb9a42830
test-revert: add methodical revert with explicit file path
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
22129
diff
changeset
|
996 |
23139
e53f6b72a0e4
spelling: fixes from proofreading of spell checker issues
Mads Kiilerich <madski@unity3d.com>
parents:
23135
diff
changeset
|
997 check resulting directory against the --all run |
22130
78abb9a42830
test-revert: add methodical revert with explicit file path
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
22129
diff
changeset
|
998 (There should be no difference) |
78abb9a42830
test-revert: add methodical revert with explicit file path
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
22129
diff
changeset
|
999 |
39707
5abc47d4ca6b
tests: quote PYTHON usage
Matt Harbison <matt_harbison@yahoo.com>
parents:
39405
diff
changeset
|
1000 $ "$PYTHON" ../dircontent.py > ../content-parent-explicit.txt |
22130
78abb9a42830
test-revert: add methodical revert with explicit file path
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
22129
diff
changeset
|
1001 $ cd .. |
78abb9a42830
test-revert: add methodical revert with explicit file path
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
22129
diff
changeset
|
1002 $ diff -U 0 -- content-parent-all.txt content-parent-explicit.txt | grep _ |
78abb9a42830
test-revert: add methodical revert with explicit file path
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
22129
diff
changeset
|
1003 [1] |
22131
8768342af0cd
test-revert: add methodical revert to "base" with explicit file path
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
22130
diff
changeset
|
1004 |
8768342af0cd
test-revert: add methodical revert to "base" with explicit file path
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
22130
diff
changeset
|
1005 Test revert to "base" content with explicit file name |
8768342af0cd
test-revert: add methodical revert to "base" with explicit file path
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
22130
diff
changeset
|
1006 ----------------------------------------------------- |
8768342af0cd
test-revert: add methodical revert to "base" with explicit file path
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
22130
diff
changeset
|
1007 |
8768342af0cd
test-revert: add methodical revert to "base" with explicit file path
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
22130
diff
changeset
|
1008 (setup from reference repo) |
8768342af0cd
test-revert: add methodical revert to "base" with explicit file path
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
22130
diff
changeset
|
1009 |
30556
c059286a0f9c
tests: replace "cp -r" with "cp -R"
Jun Wu <quark@fb.com>
parents:
28192
diff
changeset
|
1010 $ cp -R revert-ref revert-base-explicit |
22131
8768342af0cd
test-revert: add methodical revert to "base" with explicit file path
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
22130
diff
changeset
|
1011 $ cd revert-base-explicit |
8768342af0cd
test-revert: add methodical revert to "base" with explicit file path
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
22130
diff
changeset
|
1012 |
8768342af0cd
test-revert: add methodical revert to "base" with explicit file path
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
22130
diff
changeset
|
1013 revert all files individually and check the output |
8768342af0cd
test-revert: add methodical revert to "base" with explicit file path
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
22130
diff
changeset
|
1014 (output is expected to be different than in the --all case) |
8768342af0cd
test-revert: add methodical revert to "base" with explicit file path
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
22130
diff
changeset
|
1015 |
39707
5abc47d4ca6b
tests: quote PYTHON usage
Matt Harbison <matt_harbison@yahoo.com>
parents:
39405
diff
changeset
|
1016 $ for file in `"$PYTHON" $TESTDIR/generate-working-copy-states.py filelist 2`; do |
22131
8768342af0cd
test-revert: add methodical revert to "base" with explicit file path
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
22130
diff
changeset
|
1017 > echo '### revert for:' $file; |
8768342af0cd
test-revert: add methodical revert to "base" with explicit file path
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
22130
diff
changeset
|
1018 > hg revert $file --rev 'desc(base)'; |
8768342af0cd
test-revert: add methodical revert to "base" with explicit file path
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
22130
diff
changeset
|
1019 > echo |
8768342af0cd
test-revert: add methodical revert to "base" with explicit file path
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
22130
diff
changeset
|
1020 > done |
23160
4f4e6815f286
test-revert: sort by output filename again
Martin von Zweigbergk <martinvonz@google.com>
parents:
23159
diff
changeset
|
1021 ### revert for: content1_content1_content1-tracked |
4f4e6815f286
test-revert: sort by output filename again
Martin von Zweigbergk <martinvonz@google.com>
parents:
23159
diff
changeset
|
1022 no changes needed to content1_content1_content1-tracked |
22144
b7c9f07b76c1
test-revert: add case where file is tracked but deleted in working directory
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
22143
diff
changeset
|
1023 |
23160
4f4e6815f286
test-revert: sort by output filename again
Martin von Zweigbergk <martinvonz@google.com>
parents:
23159
diff
changeset
|
1024 ### revert for: content1_content1_content1-untracked |
22140
74e932047975
test-revert: add case where the file is marked as removed in the wc
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
22139
diff
changeset
|
1025 |
23160
4f4e6815f286
test-revert: sort by output filename again
Martin von Zweigbergk <martinvonz@google.com>
parents:
23159
diff
changeset
|
1026 ### revert for: content1_content1_content3-tracked |
22138
80206e63c3cc
test-revert: add case where wc content is already reverted to base content
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
22137
diff
changeset
|
1027 |
23160
4f4e6815f286
test-revert: sort by output filename again
Martin von Zweigbergk <martinvonz@google.com>
parents:
23159
diff
changeset
|
1028 ### revert for: content1_content1_content3-untracked |
4f4e6815f286
test-revert: sort by output filename again
Martin von Zweigbergk <martinvonz@google.com>
parents:
23159
diff
changeset
|
1029 |
4f4e6815f286
test-revert: sort by output filename again
Martin von Zweigbergk <martinvonz@google.com>
parents:
23159
diff
changeset
|
1030 ### revert for: content1_content1_missing-tracked |
22141
6b522c1139a9
test-revert: add case where file exists but is untracked in working directory
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
22140
diff
changeset
|
1031 |
23160
4f4e6815f286
test-revert: sort by output filename again
Martin von Zweigbergk <martinvonz@google.com>
parents:
23159
diff
changeset
|
1032 ### revert for: content1_content1_missing-untracked |
22142
e1a69b0ac9e6
test-revert: add case with untracked files with reverted content
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
22141
diff
changeset
|
1033 |
23160
4f4e6815f286
test-revert: sort by output filename again
Martin von Zweigbergk <martinvonz@google.com>
parents:
23159
diff
changeset
|
1034 ### revert for: content1_content2_content1-tracked |
4f4e6815f286
test-revert: sort by output filename again
Martin von Zweigbergk <martinvonz@google.com>
parents:
23159
diff
changeset
|
1035 no changes needed to content1_content2_content1-tracked |
22139
1ecd6f1f9869
test-revert: add case where wc content is different from "base" and "parent"
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
22138
diff
changeset
|
1036 |
23160
4f4e6815f286
test-revert: sort by output filename again
Martin von Zweigbergk <martinvonz@google.com>
parents:
23159
diff
changeset
|
1037 ### revert for: content1_content2_content1-untracked |
22135
37d2bd2c04f6
test-revert: add case where file is unchanged between "base" and "parent"
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
22133
diff
changeset
|
1038 |
23160
4f4e6815f286
test-revert: sort by output filename again
Martin von Zweigbergk <martinvonz@google.com>
parents:
23159
diff
changeset
|
1039 ### revert for: content1_content2_content2-tracked |
22144
b7c9f07b76c1
test-revert: add case where file is tracked but deleted in working directory
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
22143
diff
changeset
|
1040 |
23160
4f4e6815f286
test-revert: sort by output filename again
Martin von Zweigbergk <martinvonz@google.com>
parents:
23159
diff
changeset
|
1041 ### revert for: content1_content2_content2-untracked |
22140
74e932047975
test-revert: add case where the file is marked as removed in the wc
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
22139
diff
changeset
|
1042 |
23160
4f4e6815f286
test-revert: sort by output filename again
Martin von Zweigbergk <martinvonz@google.com>
parents:
23159
diff
changeset
|
1043 ### revert for: content1_content2_content3-tracked |
22141
6b522c1139a9
test-revert: add case where file exists but is untracked in working directory
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
22140
diff
changeset
|
1044 |
23160
4f4e6815f286
test-revert: sort by output filename again
Martin von Zweigbergk <martinvonz@google.com>
parents:
23159
diff
changeset
|
1045 ### revert for: content1_content2_content3-untracked |
22142
e1a69b0ac9e6
test-revert: add case with untracked files with reverted content
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
22141
diff
changeset
|
1046 |
23160
4f4e6815f286
test-revert: sort by output filename again
Martin von Zweigbergk <martinvonz@google.com>
parents:
23159
diff
changeset
|
1047 ### revert for: content1_content2_missing-tracked |
22139
1ecd6f1f9869
test-revert: add case where wc content is different from "base" and "parent"
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
22138
diff
changeset
|
1048 |
23160
4f4e6815f286
test-revert: sort by output filename again
Martin von Zweigbergk <martinvonz@google.com>
parents:
23159
diff
changeset
|
1049 ### revert for: content1_content2_missing-untracked |
22137
2cfe5ec47803
test-revert: add case where file exists neither in "base" nor in "parent"
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
22136
diff
changeset
|
1050 |
23160
4f4e6815f286
test-revert: sort by output filename again
Martin von Zweigbergk <martinvonz@google.com>
parents:
23159
diff
changeset
|
1051 ### revert for: content1_missing_content1-tracked |
4f4e6815f286
test-revert: sort by output filename again
Martin von Zweigbergk <martinvonz@google.com>
parents:
23159
diff
changeset
|
1052 no changes needed to content1_missing_content1-tracked |
22140
74e932047975
test-revert: add case where the file is marked as removed in the wc
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
22139
diff
changeset
|
1053 |
23160
4f4e6815f286
test-revert: sort by output filename again
Martin von Zweigbergk <martinvonz@google.com>
parents:
23159
diff
changeset
|
1054 ### revert for: content1_missing_content1-untracked |
4f4e6815f286
test-revert: sort by output filename again
Martin von Zweigbergk <martinvonz@google.com>
parents:
23159
diff
changeset
|
1055 |
4f4e6815f286
test-revert: sort by output filename again
Martin von Zweigbergk <martinvonz@google.com>
parents:
23159
diff
changeset
|
1056 ### revert for: content1_missing_content3-tracked |
22138
80206e63c3cc
test-revert: add case where wc content is already reverted to base content
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
22137
diff
changeset
|
1057 |
23160
4f4e6815f286
test-revert: sort by output filename again
Martin von Zweigbergk <martinvonz@google.com>
parents:
23159
diff
changeset
|
1058 ### revert for: content1_missing_content3-untracked |
22141
6b522c1139a9
test-revert: add case where file exists but is untracked in working directory
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
22140
diff
changeset
|
1059 |
23160
4f4e6815f286
test-revert: sort by output filename again
Martin von Zweigbergk <martinvonz@google.com>
parents:
23159
diff
changeset
|
1060 ### revert for: content1_missing_missing-tracked |
22142
e1a69b0ac9e6
test-revert: add case with untracked files with reverted content
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
22141
diff
changeset
|
1061 |
23160
4f4e6815f286
test-revert: sort by output filename again
Martin von Zweigbergk <martinvonz@google.com>
parents:
23159
diff
changeset
|
1062 ### revert for: content1_missing_missing-untracked |
22143
ca278b893940
test-revert: add case with untracked files with unique content
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
22142
diff
changeset
|
1063 |
23160
4f4e6815f286
test-revert: sort by output filename again
Martin von Zweigbergk <martinvonz@google.com>
parents:
23159
diff
changeset
|
1064 ### revert for: missing_content2_content2-tracked |
22131
8768342af0cd
test-revert: add methodical revert to "base" with explicit file path
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
22130
diff
changeset
|
1065 |
23159
20d3e2d73432
test-revert: name files by state, not by state transition
Martin von Zweigbergk <martinvonz@google.com>
parents:
23158
diff
changeset
|
1066 ### revert for: missing_content2_content2-untracked |
20d3e2d73432
test-revert: name files by state, not by state transition
Martin von Zweigbergk <martinvonz@google.com>
parents:
23158
diff
changeset
|
1067 no changes needed to missing_content2_content2-untracked |
22144
b7c9f07b76c1
test-revert: add case where file is tracked but deleted in working directory
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
22143
diff
changeset
|
1068 |
23160
4f4e6815f286
test-revert: sort by output filename again
Martin von Zweigbergk <martinvonz@google.com>
parents:
23159
diff
changeset
|
1069 ### revert for: missing_content2_content3-tracked |
22138
80206e63c3cc
test-revert: add case where wc content is already reverted to base content
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
22137
diff
changeset
|
1070 |
23159
20d3e2d73432
test-revert: name files by state, not by state transition
Martin von Zweigbergk <martinvonz@google.com>
parents:
23158
diff
changeset
|
1071 ### revert for: missing_content2_content3-untracked |
20d3e2d73432
test-revert: name files by state, not by state transition
Martin von Zweigbergk <martinvonz@google.com>
parents:
23158
diff
changeset
|
1072 no changes needed to missing_content2_content3-untracked |
22143
ca278b893940
test-revert: add case with untracked files with unique content
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
22142
diff
changeset
|
1073 |
23160
4f4e6815f286
test-revert: sort by output filename again
Martin von Zweigbergk <martinvonz@google.com>
parents:
23159
diff
changeset
|
1074 ### revert for: missing_content2_missing-tracked |
22139
1ecd6f1f9869
test-revert: add case where wc content is different from "base" and "parent"
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
22138
diff
changeset
|
1075 |
23160
4f4e6815f286
test-revert: sort by output filename again
Martin von Zweigbergk <martinvonz@google.com>
parents:
23159
diff
changeset
|
1076 ### revert for: missing_content2_missing-untracked |
4f4e6815f286
test-revert: sort by output filename again
Martin von Zweigbergk <martinvonz@google.com>
parents:
23159
diff
changeset
|
1077 no changes needed to missing_content2_missing-untracked |
22144
b7c9f07b76c1
test-revert: add case where file is tracked but deleted in working directory
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
22143
diff
changeset
|
1078 |
23160
4f4e6815f286
test-revert: sort by output filename again
Martin von Zweigbergk <martinvonz@google.com>
parents:
23159
diff
changeset
|
1079 ### revert for: missing_missing_content3-tracked |
22140
74e932047975
test-revert: add case where the file is marked as removed in the wc
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
22139
diff
changeset
|
1080 |
23160
4f4e6815f286
test-revert: sort by output filename again
Martin von Zweigbergk <martinvonz@google.com>
parents:
23159
diff
changeset
|
1081 ### revert for: missing_missing_content3-untracked |
4f4e6815f286
test-revert: sort by output filename again
Martin von Zweigbergk <martinvonz@google.com>
parents:
23159
diff
changeset
|
1082 file not managed: missing_missing_content3-untracked |
22138
80206e63c3cc
test-revert: add case where wc content is already reverted to base content
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
22137
diff
changeset
|
1083 |
23159
20d3e2d73432
test-revert: name files by state, not by state transition
Martin von Zweigbergk <martinvonz@google.com>
parents:
23158
diff
changeset
|
1084 ### revert for: missing_missing_missing-tracked |
22142
e1a69b0ac9e6
test-revert: add case with untracked files with reverted content
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
22141
diff
changeset
|
1085 |
23159
20d3e2d73432
test-revert: name files by state, not by state transition
Martin von Zweigbergk <martinvonz@google.com>
parents:
23158
diff
changeset
|
1086 ### revert for: missing_missing_missing-untracked |
20d3e2d73432
test-revert: name files by state, not by state transition
Martin von Zweigbergk <martinvonz@google.com>
parents:
23158
diff
changeset
|
1087 missing_missing_missing-untracked: no such file in rev * (glob) |
22139
1ecd6f1f9869
test-revert: add case where wc content is different from "base" and "parent"
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
22138
diff
changeset
|
1088 |
22131
8768342af0cd
test-revert: add methodical revert to "base" with explicit file path
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
22130
diff
changeset
|
1089 |
23139
e53f6b72a0e4
spelling: fixes from proofreading of spell checker issues
Mads Kiilerich <madski@unity3d.com>
parents:
23135
diff
changeset
|
1090 check resulting directory against the --all run |
22131
8768342af0cd
test-revert: add methodical revert to "base" with explicit file path
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
22130
diff
changeset
|
1091 (There should be no difference) |
8768342af0cd
test-revert: add methodical revert to "base" with explicit file path
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
22130
diff
changeset
|
1092 |
39707
5abc47d4ca6b
tests: quote PYTHON usage
Matt Harbison <matt_harbison@yahoo.com>
parents:
39405
diff
changeset
|
1093 $ "$PYTHON" ../dircontent.py > ../content-base-explicit.txt |
22131
8768342af0cd
test-revert: add methodical revert to "base" with explicit file path
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
22130
diff
changeset
|
1094 $ cd .. |
8768342af0cd
test-revert: add methodical revert to "base" with explicit file path
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
22130
diff
changeset
|
1095 $ diff -U 0 -- content-base-all.txt content-base-explicit.txt | grep _ |
8768342af0cd
test-revert: add methodical revert to "base" with explicit file path
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
22130
diff
changeset
|
1096 [1] |
28192
cb6a952efbf4
revert: properly revert to ancestor of p2 during merge (issue5052)
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
26969
diff
changeset
|
1097 |
cb6a952efbf4
revert: properly revert to ancestor of p2 during merge (issue5052)
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
26969
diff
changeset
|
1098 Revert to an ancestor of P2 during a merge (issue5052) |
cb6a952efbf4
revert: properly revert to ancestor of p2 during merge (issue5052)
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
26969
diff
changeset
|
1099 ----------------------------------------------------- |
cb6a952efbf4
revert: properly revert to ancestor of p2 during merge (issue5052)
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
26969
diff
changeset
|
1100 |
cb6a952efbf4
revert: properly revert to ancestor of p2 during merge (issue5052)
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
26969
diff
changeset
|
1101 (prepare the repository) |
cb6a952efbf4
revert: properly revert to ancestor of p2 during merge (issue5052)
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
26969
diff
changeset
|
1102 |
cb6a952efbf4
revert: properly revert to ancestor of p2 during merge (issue5052)
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
26969
diff
changeset
|
1103 $ hg init issue5052 |
cb6a952efbf4
revert: properly revert to ancestor of p2 during merge (issue5052)
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
26969
diff
changeset
|
1104 $ cd issue5052 |
cb6a952efbf4
revert: properly revert to ancestor of p2 during merge (issue5052)
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
26969
diff
changeset
|
1105 $ echo '.\.orig' > .hgignore |
cb6a952efbf4
revert: properly revert to ancestor of p2 during merge (issue5052)
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
26969
diff
changeset
|
1106 $ echo 0 > root |
cb6a952efbf4
revert: properly revert to ancestor of p2 during merge (issue5052)
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
26969
diff
changeset
|
1107 $ hg ci -qAm C0 |
cb6a952efbf4
revert: properly revert to ancestor of p2 during merge (issue5052)
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
26969
diff
changeset
|
1108 $ echo 0 > A |
cb6a952efbf4
revert: properly revert to ancestor of p2 during merge (issue5052)
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
26969
diff
changeset
|
1109 $ hg ci -qAm C1 |
cb6a952efbf4
revert: properly revert to ancestor of p2 during merge (issue5052)
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
26969
diff
changeset
|
1110 $ echo 1 >> A |
cb6a952efbf4
revert: properly revert to ancestor of p2 during merge (issue5052)
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
26969
diff
changeset
|
1111 $ hg ci -qm C2 |
cb6a952efbf4
revert: properly revert to ancestor of p2 during merge (issue5052)
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
26969
diff
changeset
|
1112 $ hg up -q 0 |
cb6a952efbf4
revert: properly revert to ancestor of p2 during merge (issue5052)
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
26969
diff
changeset
|
1113 $ echo 1 > B |
cb6a952efbf4
revert: properly revert to ancestor of p2 during merge (issue5052)
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
26969
diff
changeset
|
1114 $ hg ci -qAm C3 |
cb6a952efbf4
revert: properly revert to ancestor of p2 during merge (issue5052)
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
26969
diff
changeset
|
1115 $ hg status --rev 'ancestor(.,2)' --rev 2 |
cb6a952efbf4
revert: properly revert to ancestor of p2 during merge (issue5052)
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
26969
diff
changeset
|
1116 A A |
cb6a952efbf4
revert: properly revert to ancestor of p2 during merge (issue5052)
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
26969
diff
changeset
|
1117 $ hg log -G -T '{rev} ({files})\n' |
cb6a952efbf4
revert: properly revert to ancestor of p2 during merge (issue5052)
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
26969
diff
changeset
|
1118 @ 3 (B) |
cb6a952efbf4
revert: properly revert to ancestor of p2 during merge (issue5052)
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
26969
diff
changeset
|
1119 | |
cb6a952efbf4
revert: properly revert to ancestor of p2 during merge (issue5052)
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
26969
diff
changeset
|
1120 | o 2 (A) |
cb6a952efbf4
revert: properly revert to ancestor of p2 during merge (issue5052)
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
26969
diff
changeset
|
1121 | | |
cb6a952efbf4
revert: properly revert to ancestor of p2 during merge (issue5052)
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
26969
diff
changeset
|
1122 | o 1 (A) |
cb6a952efbf4
revert: properly revert to ancestor of p2 during merge (issue5052)
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
26969
diff
changeset
|
1123 |/ |
cb6a952efbf4
revert: properly revert to ancestor of p2 during merge (issue5052)
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
26969
diff
changeset
|
1124 o 0 (.hgignore root) |
cb6a952efbf4
revert: properly revert to ancestor of p2 during merge (issue5052)
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
26969
diff
changeset
|
1125 |
cb6a952efbf4
revert: properly revert to ancestor of p2 during merge (issue5052)
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
26969
diff
changeset
|
1126 |
cb6a952efbf4
revert: properly revert to ancestor of p2 during merge (issue5052)
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
26969
diff
changeset
|
1127 actual tests: reverting to something else than a merge parent |
cb6a952efbf4
revert: properly revert to ancestor of p2 during merge (issue5052)
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
26969
diff
changeset
|
1128 |
cb6a952efbf4
revert: properly revert to ancestor of p2 during merge (issue5052)
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
26969
diff
changeset
|
1129 $ hg merge |
cb6a952efbf4
revert: properly revert to ancestor of p2 during merge (issue5052)
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
26969
diff
changeset
|
1130 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
cb6a952efbf4
revert: properly revert to ancestor of p2 during merge (issue5052)
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
26969
diff
changeset
|
1131 (branch merge, don't forget to commit) |
cb6a952efbf4
revert: properly revert to ancestor of p2 during merge (issue5052)
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
26969
diff
changeset
|
1132 |
cb6a952efbf4
revert: properly revert to ancestor of p2 during merge (issue5052)
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
26969
diff
changeset
|
1133 $ hg status --rev 'p1()' |
cb6a952efbf4
revert: properly revert to ancestor of p2 during merge (issue5052)
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
26969
diff
changeset
|
1134 M A |
cb6a952efbf4
revert: properly revert to ancestor of p2 during merge (issue5052)
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
26969
diff
changeset
|
1135 $ hg status --rev 'p2()' |
cb6a952efbf4
revert: properly revert to ancestor of p2 during merge (issue5052)
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
26969
diff
changeset
|
1136 A B |
cb6a952efbf4
revert: properly revert to ancestor of p2 during merge (issue5052)
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
26969
diff
changeset
|
1137 $ hg status --rev '1' |
cb6a952efbf4
revert: properly revert to ancestor of p2 during merge (issue5052)
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
26969
diff
changeset
|
1138 M A |
cb6a952efbf4
revert: properly revert to ancestor of p2 during merge (issue5052)
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
26969
diff
changeset
|
1139 A B |
cb6a952efbf4
revert: properly revert to ancestor of p2 during merge (issue5052)
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
26969
diff
changeset
|
1140 $ hg revert --rev 1 --all |
39405
cb70501d8b71
revert: fix the inconsistency of status msgs in --interactive mode
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
35393
diff
changeset
|
1141 removing B |
28192
cb6a952efbf4
revert: properly revert to ancestor of p2 during merge (issue5052)
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
26969
diff
changeset
|
1142 reverting A |
cb6a952efbf4
revert: properly revert to ancestor of p2 during merge (issue5052)
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
26969
diff
changeset
|
1143 $ hg status --rev 1 |
cb6a952efbf4
revert: properly revert to ancestor of p2 during merge (issue5052)
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
26969
diff
changeset
|
1144 |
cb6a952efbf4
revert: properly revert to ancestor of p2 during merge (issue5052)
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
26969
diff
changeset
|
1145 From the other parents |
cb6a952efbf4
revert: properly revert to ancestor of p2 during merge (issue5052)
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
26969
diff
changeset
|
1146 |
cb6a952efbf4
revert: properly revert to ancestor of p2 during merge (issue5052)
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
26969
diff
changeset
|
1147 $ hg up -C 'p2()' |
cb6a952efbf4
revert: properly revert to ancestor of p2 during merge (issue5052)
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
26969
diff
changeset
|
1148 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
cb6a952efbf4
revert: properly revert to ancestor of p2 during merge (issue5052)
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
26969
diff
changeset
|
1149 $ hg merge |
cb6a952efbf4
revert: properly revert to ancestor of p2 during merge (issue5052)
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
26969
diff
changeset
|
1150 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
cb6a952efbf4
revert: properly revert to ancestor of p2 during merge (issue5052)
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
26969
diff
changeset
|
1151 (branch merge, don't forget to commit) |
cb6a952efbf4
revert: properly revert to ancestor of p2 during merge (issue5052)
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
26969
diff
changeset
|
1152 |
cb6a952efbf4
revert: properly revert to ancestor of p2 during merge (issue5052)
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
26969
diff
changeset
|
1153 $ hg status --rev 'p1()' |
cb6a952efbf4
revert: properly revert to ancestor of p2 during merge (issue5052)
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
26969
diff
changeset
|
1154 M B |
cb6a952efbf4
revert: properly revert to ancestor of p2 during merge (issue5052)
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
26969
diff
changeset
|
1155 $ hg status --rev 'p2()' |
cb6a952efbf4
revert: properly revert to ancestor of p2 during merge (issue5052)
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
26969
diff
changeset
|
1156 A A |
cb6a952efbf4
revert: properly revert to ancestor of p2 during merge (issue5052)
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
26969
diff
changeset
|
1157 $ hg status --rev '1' |
cb6a952efbf4
revert: properly revert to ancestor of p2 during merge (issue5052)
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
26969
diff
changeset
|
1158 M A |
cb6a952efbf4
revert: properly revert to ancestor of p2 during merge (issue5052)
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
26969
diff
changeset
|
1159 A B |
cb6a952efbf4
revert: properly revert to ancestor of p2 during merge (issue5052)
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
26969
diff
changeset
|
1160 $ hg revert --rev 1 --all |
39405
cb70501d8b71
revert: fix the inconsistency of status msgs in --interactive mode
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
35393
diff
changeset
|
1161 removing B |
28192
cb6a952efbf4
revert: properly revert to ancestor of p2 during merge (issue5052)
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
26969
diff
changeset
|
1162 reverting A |
cb6a952efbf4
revert: properly revert to ancestor of p2 during merge (issue5052)
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
26969
diff
changeset
|
1163 $ hg status --rev 1 |
cb6a952efbf4
revert: properly revert to ancestor of p2 during merge (issue5052)
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
26969
diff
changeset
|
1164 |
cb6a952efbf4
revert: properly revert to ancestor of p2 during merge (issue5052)
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
26969
diff
changeset
|
1165 $ cd .. |