annotate tests/test-revert-interactive.t @ 24802:2ee10789d66b

tests: fix up whitespace complaint
author Matt Mackall <mpm@selenic.com>
date Thu, 16 Apr 2015 20:56:43 -0500
parents a85c4ed1132f
children f37a69ec3f47
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
24359
521fe8287dd5 revert: add flag to make revert interactive
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
1 Revert interactive tests
521fe8287dd5 revert: add flag to make revert interactive
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
2 1 add and commit file f
521fe8287dd5 revert: add flag to make revert interactive
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
3 2 add commit file folder1/g
521fe8287dd5 revert: add flag to make revert interactive
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
4 3 add and commit file folder2/h
521fe8287dd5 revert: add flag to make revert interactive
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
5 4 add and commit file folder1/i
521fe8287dd5 revert: add flag to make revert interactive
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
6 5 commit change to file f
521fe8287dd5 revert: add flag to make revert interactive
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
7 6 commit changes to files folder1/g folder2/h
521fe8287dd5 revert: add flag to make revert interactive
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
8 7 commit changes to files folder1/g folder2/h
521fe8287dd5 revert: add flag to make revert interactive
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
9 8 revert interactive to commit id 2 (line 3 above), check that folder1/i is removed and
521fe8287dd5 revert: add flag to make revert interactive
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
10 9 make workdir match 7
521fe8287dd5 revert: add flag to make revert interactive
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
11 10 run the same test than 8 from within folder1 and check same expectations
521fe8287dd5 revert: add flag to make revert interactive
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
12
521fe8287dd5 revert: add flag to make revert interactive
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
13 $ cat <<EOF >> $HGRCPATH
521fe8287dd5 revert: add flag to make revert interactive
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
14 > [ui]
521fe8287dd5 revert: add flag to make revert interactive
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
15 > interactive = true
521fe8287dd5 revert: add flag to make revert interactive
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
16 > [extensions]
521fe8287dd5 revert: add flag to make revert interactive
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
17 > record =
521fe8287dd5 revert: add flag to make revert interactive
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
18 > EOF
521fe8287dd5 revert: add flag to make revert interactive
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
19
521fe8287dd5 revert: add flag to make revert interactive
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
20
24389
93d3e1a8bfb0 test-revert-interactive: eliminate bashism in wildcard pattern
Yuya Nishihara <yuya@tcha.org>
parents: 24361
diff changeset
21 $ mkdir -p a/folder1 a/folder2
24359
521fe8287dd5 revert: add flag to make revert interactive
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
22 $ cd a
521fe8287dd5 revert: add flag to make revert interactive
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
23 $ hg init
24434
f169405c03ab test-interactive: use stable EOL in various file generating routines
Matt Harbison <matt_harbison@yahoo.com>
parents: 24389
diff changeset
24 >>> open('f', 'wb').write("1\n2\n3\n4\n5\n")
f169405c03ab test-interactive: use stable EOL in various file generating routines
Matt Harbison <matt_harbison@yahoo.com>
parents: 24389
diff changeset
25 $ hg add f ; hg commit -m "adding f"
24361
8de8cd34f2e3 tests: replace uses of 'seq' with portable 'seq.py'
Matt Harbison <matt_harbison@yahoo.com>
parents: 24359
diff changeset
26 $ cat f > folder1/g ; hg add folder1/g ; hg commit -m "adding folder1/g"
8de8cd34f2e3 tests: replace uses of 'seq' with portable 'seq.py'
Matt Harbison <matt_harbison@yahoo.com>
parents: 24359
diff changeset
27 $ cat f > folder2/h ; hg add folder2/h ; hg commit -m "adding folder2/h"
8de8cd34f2e3 tests: replace uses of 'seq' with portable 'seq.py'
Matt Harbison <matt_harbison@yahoo.com>
parents: 24359
diff changeset
28 $ cat f > folder1/i ; hg add folder1/i ; hg commit -m "adding folder1/i"
24434
f169405c03ab test-interactive: use stable EOL in various file generating routines
Matt Harbison <matt_harbison@yahoo.com>
parents: 24389
diff changeset
29 >>> open('f', 'wb').write("a\n1\n2\n3\n4\n5\nb\n")
f169405c03ab test-interactive: use stable EOL in various file generating routines
Matt Harbison <matt_harbison@yahoo.com>
parents: 24389
diff changeset
30 $ hg commit -m "modifying f"
f169405c03ab test-interactive: use stable EOL in various file generating routines
Matt Harbison <matt_harbison@yahoo.com>
parents: 24389
diff changeset
31 >>> open('folder1/g', 'wb').write("c\n1\n2\n3\n4\n5\nd\n")
f169405c03ab test-interactive: use stable EOL in various file generating routines
Matt Harbison <matt_harbison@yahoo.com>
parents: 24389
diff changeset
32 $ hg commit -m "modifying folder1/g"
f169405c03ab test-interactive: use stable EOL in various file generating routines
Matt Harbison <matt_harbison@yahoo.com>
parents: 24389
diff changeset
33 >>> open('folder2/h', 'wb').write("e\n1\n2\n3\n4\n5\nf\n")
f169405c03ab test-interactive: use stable EOL in various file generating routines
Matt Harbison <matt_harbison@yahoo.com>
parents: 24389
diff changeset
34 $ hg commit -m "modifying folder2/h"
24359
521fe8287dd5 revert: add flag to make revert interactive
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
35 $ hg tip
521fe8287dd5 revert: add flag to make revert interactive
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
36 changeset: 6:59dd6e4ab63a
521fe8287dd5 revert: add flag to make revert interactive
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
37 tag: tip
521fe8287dd5 revert: add flag to make revert interactive
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
38 user: test
521fe8287dd5 revert: add flag to make revert interactive
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
39 date: Thu Jan 01 00:00:00 1970 +0000
521fe8287dd5 revert: add flag to make revert interactive
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
40 summary: modifying folder2/h
521fe8287dd5 revert: add flag to make revert interactive
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
41
521fe8287dd5 revert: add flag to make revert interactive
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
42 $ hg revert -i -r 2 --all -- << EOF
521fe8287dd5 revert: add flag to make revert interactive
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
43 > y
521fe8287dd5 revert: add flag to make revert interactive
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
44 > y
521fe8287dd5 revert: add flag to make revert interactive
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
45 > y
521fe8287dd5 revert: add flag to make revert interactive
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
46 > y
521fe8287dd5 revert: add flag to make revert interactive
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
47 > y
521fe8287dd5 revert: add flag to make revert interactive
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
48 > n
521fe8287dd5 revert: add flag to make revert interactive
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
49 > n
521fe8287dd5 revert: add flag to make revert interactive
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
50 > EOF
521fe8287dd5 revert: add flag to make revert interactive
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
51 reverting f
521fe8287dd5 revert: add flag to make revert interactive
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
52 reverting folder1/g (glob)
521fe8287dd5 revert: add flag to make revert interactive
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
53 removing folder1/i (glob)
521fe8287dd5 revert: add flag to make revert interactive
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
54 reverting folder2/h (glob)
521fe8287dd5 revert: add flag to make revert interactive
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
55 diff -r 89ac3d72e4a4 f
521fe8287dd5 revert: add flag to make revert interactive
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
56 2 hunks, 2 lines changed
521fe8287dd5 revert: add flag to make revert interactive
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
57 examine changes to 'f'? [Ynesfdaq?] y
521fe8287dd5 revert: add flag to make revert interactive
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
58
521fe8287dd5 revert: add flag to make revert interactive
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
59 @@ -1,6 +1,5 @@
521fe8287dd5 revert: add flag to make revert interactive
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
60 -a
521fe8287dd5 revert: add flag to make revert interactive
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
61 1
521fe8287dd5 revert: add flag to make revert interactive
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
62 2
521fe8287dd5 revert: add flag to make revert interactive
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
63 3
521fe8287dd5 revert: add flag to make revert interactive
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
64 4
521fe8287dd5 revert: add flag to make revert interactive
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
65 5
521fe8287dd5 revert: add flag to make revert interactive
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
66 record change 1/6 to 'f'? [Ynesfdaq?] y
521fe8287dd5 revert: add flag to make revert interactive
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
67
521fe8287dd5 revert: add flag to make revert interactive
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
68 @@ -2,6 +1,5 @@
521fe8287dd5 revert: add flag to make revert interactive
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
69 1
521fe8287dd5 revert: add flag to make revert interactive
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
70 2
521fe8287dd5 revert: add flag to make revert interactive
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
71 3
521fe8287dd5 revert: add flag to make revert interactive
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
72 4
521fe8287dd5 revert: add flag to make revert interactive
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
73 5
521fe8287dd5 revert: add flag to make revert interactive
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
74 -b
521fe8287dd5 revert: add flag to make revert interactive
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
75 record change 2/6 to 'f'? [Ynesfdaq?] y
521fe8287dd5 revert: add flag to make revert interactive
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
76
521fe8287dd5 revert: add flag to make revert interactive
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
77 diff -r 89ac3d72e4a4 folder1/g
521fe8287dd5 revert: add flag to make revert interactive
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
78 2 hunks, 2 lines changed
521fe8287dd5 revert: add flag to make revert interactive
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
79 examine changes to 'folder1/g'? [Ynesfdaq?] y
521fe8287dd5 revert: add flag to make revert interactive
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
80
521fe8287dd5 revert: add flag to make revert interactive
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
81 @@ -1,6 +1,5 @@
521fe8287dd5 revert: add flag to make revert interactive
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
82 -c
521fe8287dd5 revert: add flag to make revert interactive
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
83 1
521fe8287dd5 revert: add flag to make revert interactive
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
84 2
521fe8287dd5 revert: add flag to make revert interactive
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
85 3
521fe8287dd5 revert: add flag to make revert interactive
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
86 4
521fe8287dd5 revert: add flag to make revert interactive
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
87 5
521fe8287dd5 revert: add flag to make revert interactive
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
88 record change 3/6 to 'folder1/g'? [Ynesfdaq?] y
521fe8287dd5 revert: add flag to make revert interactive
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
89
521fe8287dd5 revert: add flag to make revert interactive
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
90 @@ -2,6 +1,5 @@
521fe8287dd5 revert: add flag to make revert interactive
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
91 1
521fe8287dd5 revert: add flag to make revert interactive
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
92 2
521fe8287dd5 revert: add flag to make revert interactive
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
93 3
521fe8287dd5 revert: add flag to make revert interactive
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
94 4
521fe8287dd5 revert: add flag to make revert interactive
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
95 5
521fe8287dd5 revert: add flag to make revert interactive
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
96 -d
521fe8287dd5 revert: add flag to make revert interactive
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
97 record change 4/6 to 'folder1/g'? [Ynesfdaq?] n
521fe8287dd5 revert: add flag to make revert interactive
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
98
521fe8287dd5 revert: add flag to make revert interactive
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
99 diff -r 89ac3d72e4a4 folder2/h
521fe8287dd5 revert: add flag to make revert interactive
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
100 2 hunks, 2 lines changed
521fe8287dd5 revert: add flag to make revert interactive
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
101 examine changes to 'folder2/h'? [Ynesfdaq?] n
521fe8287dd5 revert: add flag to make revert interactive
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
102
521fe8287dd5 revert: add flag to make revert interactive
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
103 $ cat f
521fe8287dd5 revert: add flag to make revert interactive
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
104 1
521fe8287dd5 revert: add flag to make revert interactive
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
105 2
521fe8287dd5 revert: add flag to make revert interactive
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
106 3
521fe8287dd5 revert: add flag to make revert interactive
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
107 4
521fe8287dd5 revert: add flag to make revert interactive
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
108 5
521fe8287dd5 revert: add flag to make revert interactive
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
109 $ cat folder1/g
521fe8287dd5 revert: add flag to make revert interactive
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
110 1
521fe8287dd5 revert: add flag to make revert interactive
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
111 2
521fe8287dd5 revert: add flag to make revert interactive
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
112 3
521fe8287dd5 revert: add flag to make revert interactive
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
113 4
521fe8287dd5 revert: add flag to make revert interactive
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
114 5
521fe8287dd5 revert: add flag to make revert interactive
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
115 d
521fe8287dd5 revert: add flag to make revert interactive
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
116 $ cat folder2/h
521fe8287dd5 revert: add flag to make revert interactive
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
117 e
521fe8287dd5 revert: add flag to make revert interactive
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
118 1
521fe8287dd5 revert: add flag to make revert interactive
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
119 2
521fe8287dd5 revert: add flag to make revert interactive
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
120 3
521fe8287dd5 revert: add flag to make revert interactive
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
121 4
521fe8287dd5 revert: add flag to make revert interactive
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
122 5
521fe8287dd5 revert: add flag to make revert interactive
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
123 f
24698
a85c4ed1132f revert: do not requires '--all' if '--interative' is present
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 24475
diff changeset
124
a85c4ed1132f revert: do not requires '--all' if '--interative' is present
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 24475
diff changeset
125 Test that --interactive lift the need for --all
a85c4ed1132f revert: do not requires '--all' if '--interative' is present
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 24475
diff changeset
126
a85c4ed1132f revert: do not requires '--all' if '--interative' is present
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 24475
diff changeset
127 $ echo q | hg revert -i -r 2
a85c4ed1132f revert: do not requires '--all' if '--interative' is present
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 24475
diff changeset
128 reverting folder1/g (glob)
a85c4ed1132f revert: do not requires '--all' if '--interative' is present
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 24475
diff changeset
129 reverting folder2/h (glob)
a85c4ed1132f revert: do not requires '--all' if '--interative' is present
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 24475
diff changeset
130 diff -r 89ac3d72e4a4 folder1/g
a85c4ed1132f revert: do not requires '--all' if '--interative' is present
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 24475
diff changeset
131 1 hunks, 1 lines changed
a85c4ed1132f revert: do not requires '--all' if '--interative' is present
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 24475
diff changeset
132 examine changes to 'folder1/g'? [Ynesfdaq?] q
a85c4ed1132f revert: do not requires '--all' if '--interative' is present
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 24475
diff changeset
133
a85c4ed1132f revert: do not requires '--all' if '--interative' is present
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 24475
diff changeset
134 abort: user quit
a85c4ed1132f revert: do not requires '--all' if '--interative' is present
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 24475
diff changeset
135 [255]
a85c4ed1132f revert: do not requires '--all' if '--interative' is present
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 24475
diff changeset
136 $ rm folder1/g.orig
a85c4ed1132f revert: do not requires '--all' if '--interative' is present
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 24475
diff changeset
137
a85c4ed1132f revert: do not requires '--all' if '--interative' is present
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 24475
diff changeset
138
24359
521fe8287dd5 revert: add flag to make revert interactive
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
139 $ hg update -C 6
521fe8287dd5 revert: add flag to make revert interactive
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
140 3 files updated, 0 files merged, 0 files removed, 0 files unresolved
521fe8287dd5 revert: add flag to make revert interactive
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
141 $ hg revert -i -r 2 --all -- << EOF
521fe8287dd5 revert: add flag to make revert interactive
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
142 > y
521fe8287dd5 revert: add flag to make revert interactive
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
143 > y
521fe8287dd5 revert: add flag to make revert interactive
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
144 > y
521fe8287dd5 revert: add flag to make revert interactive
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
145 > y
521fe8287dd5 revert: add flag to make revert interactive
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
146 > y
521fe8287dd5 revert: add flag to make revert interactive
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
147 > n
521fe8287dd5 revert: add flag to make revert interactive
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
148 > n
521fe8287dd5 revert: add flag to make revert interactive
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
149 > EOF
521fe8287dd5 revert: add flag to make revert interactive
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
150 reverting f
521fe8287dd5 revert: add flag to make revert interactive
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
151 reverting folder1/g (glob)
521fe8287dd5 revert: add flag to make revert interactive
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
152 removing folder1/i (glob)
521fe8287dd5 revert: add flag to make revert interactive
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
153 reverting folder2/h (glob)
521fe8287dd5 revert: add flag to make revert interactive
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
154 diff -r 89ac3d72e4a4 f
521fe8287dd5 revert: add flag to make revert interactive
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
155 2 hunks, 2 lines changed
521fe8287dd5 revert: add flag to make revert interactive
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
156 examine changes to 'f'? [Ynesfdaq?] y
521fe8287dd5 revert: add flag to make revert interactive
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
157
521fe8287dd5 revert: add flag to make revert interactive
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
158 @@ -1,6 +1,5 @@
521fe8287dd5 revert: add flag to make revert interactive
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
159 -a
521fe8287dd5 revert: add flag to make revert interactive
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
160 1
521fe8287dd5 revert: add flag to make revert interactive
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
161 2
521fe8287dd5 revert: add flag to make revert interactive
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
162 3
521fe8287dd5 revert: add flag to make revert interactive
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
163 4
521fe8287dd5 revert: add flag to make revert interactive
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
164 5
521fe8287dd5 revert: add flag to make revert interactive
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
165 record change 1/6 to 'f'? [Ynesfdaq?] y
521fe8287dd5 revert: add flag to make revert interactive
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
166
521fe8287dd5 revert: add flag to make revert interactive
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
167 @@ -2,6 +1,5 @@
521fe8287dd5 revert: add flag to make revert interactive
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
168 1
521fe8287dd5 revert: add flag to make revert interactive
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
169 2
521fe8287dd5 revert: add flag to make revert interactive
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
170 3
521fe8287dd5 revert: add flag to make revert interactive
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
171 4
521fe8287dd5 revert: add flag to make revert interactive
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
172 5
521fe8287dd5 revert: add flag to make revert interactive
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
173 -b
521fe8287dd5 revert: add flag to make revert interactive
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
174 record change 2/6 to 'f'? [Ynesfdaq?] y
521fe8287dd5 revert: add flag to make revert interactive
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
175
521fe8287dd5 revert: add flag to make revert interactive
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
176 diff -r 89ac3d72e4a4 folder1/g
521fe8287dd5 revert: add flag to make revert interactive
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
177 2 hunks, 2 lines changed
521fe8287dd5 revert: add flag to make revert interactive
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
178 examine changes to 'folder1/g'? [Ynesfdaq?] y
521fe8287dd5 revert: add flag to make revert interactive
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
179
521fe8287dd5 revert: add flag to make revert interactive
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
180 @@ -1,6 +1,5 @@
521fe8287dd5 revert: add flag to make revert interactive
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
181 -c
521fe8287dd5 revert: add flag to make revert interactive
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
182 1
521fe8287dd5 revert: add flag to make revert interactive
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
183 2
521fe8287dd5 revert: add flag to make revert interactive
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
184 3
521fe8287dd5 revert: add flag to make revert interactive
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
185 4
521fe8287dd5 revert: add flag to make revert interactive
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
186 5
521fe8287dd5 revert: add flag to make revert interactive
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
187 record change 3/6 to 'folder1/g'? [Ynesfdaq?] y
521fe8287dd5 revert: add flag to make revert interactive
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
188
521fe8287dd5 revert: add flag to make revert interactive
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
189 @@ -2,6 +1,5 @@
521fe8287dd5 revert: add flag to make revert interactive
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
190 1
521fe8287dd5 revert: add flag to make revert interactive
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
191 2
521fe8287dd5 revert: add flag to make revert interactive
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
192 3
521fe8287dd5 revert: add flag to make revert interactive
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
193 4
521fe8287dd5 revert: add flag to make revert interactive
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
194 5
521fe8287dd5 revert: add flag to make revert interactive
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
195 -d
521fe8287dd5 revert: add flag to make revert interactive
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
196 record change 4/6 to 'folder1/g'? [Ynesfdaq?] n
521fe8287dd5 revert: add flag to make revert interactive
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
197
521fe8287dd5 revert: add flag to make revert interactive
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
198 diff -r 89ac3d72e4a4 folder2/h
521fe8287dd5 revert: add flag to make revert interactive
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
199 2 hunks, 2 lines changed
521fe8287dd5 revert: add flag to make revert interactive
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
200 examine changes to 'folder2/h'? [Ynesfdaq?] n
521fe8287dd5 revert: add flag to make revert interactive
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
201
521fe8287dd5 revert: add flag to make revert interactive
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
202 $ cat f
521fe8287dd5 revert: add flag to make revert interactive
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
203 1
521fe8287dd5 revert: add flag to make revert interactive
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
204 2
521fe8287dd5 revert: add flag to make revert interactive
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
205 3
521fe8287dd5 revert: add flag to make revert interactive
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
206 4
521fe8287dd5 revert: add flag to make revert interactive
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
207 5
521fe8287dd5 revert: add flag to make revert interactive
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
208 $ cat folder1/g
521fe8287dd5 revert: add flag to make revert interactive
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
209 1
521fe8287dd5 revert: add flag to make revert interactive
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
210 2
521fe8287dd5 revert: add flag to make revert interactive
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
211 3
521fe8287dd5 revert: add flag to make revert interactive
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
212 4
521fe8287dd5 revert: add flag to make revert interactive
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
213 5
521fe8287dd5 revert: add flag to make revert interactive
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
214 d
521fe8287dd5 revert: add flag to make revert interactive
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
215 $ cat folder2/h
521fe8287dd5 revert: add flag to make revert interactive
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
216 e
521fe8287dd5 revert: add flag to make revert interactive
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
217 1
521fe8287dd5 revert: add flag to make revert interactive
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
218 2
521fe8287dd5 revert: add flag to make revert interactive
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
219 3
521fe8287dd5 revert: add flag to make revert interactive
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
220 4
521fe8287dd5 revert: add flag to make revert interactive
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
221 5
521fe8287dd5 revert: add flag to make revert interactive
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
222 f
24475
06cbff4674a3 revert: fix --interactive on local modification (issue4576)
Laurent Charignon <lcharignon@fb.com>
parents: 24434
diff changeset
223 $ hg st
06cbff4674a3 revert: fix --interactive on local modification (issue4576)
Laurent Charignon <lcharignon@fb.com>
parents: 24434
diff changeset
224 M f
06cbff4674a3 revert: fix --interactive on local modification (issue4576)
Laurent Charignon <lcharignon@fb.com>
parents: 24434
diff changeset
225 M folder1/g
06cbff4674a3 revert: fix --interactive on local modification (issue4576)
Laurent Charignon <lcharignon@fb.com>
parents: 24434
diff changeset
226 R folder1/i
06cbff4674a3 revert: fix --interactive on local modification (issue4576)
Laurent Charignon <lcharignon@fb.com>
parents: 24434
diff changeset
227 $ hg revert --interactive f << EOF
06cbff4674a3 revert: fix --interactive on local modification (issue4576)
Laurent Charignon <lcharignon@fb.com>
parents: 24434
diff changeset
228 > y
06cbff4674a3 revert: fix --interactive on local modification (issue4576)
Laurent Charignon <lcharignon@fb.com>
parents: 24434
diff changeset
229 > y
06cbff4674a3 revert: fix --interactive on local modification (issue4576)
Laurent Charignon <lcharignon@fb.com>
parents: 24434
diff changeset
230 > n
06cbff4674a3 revert: fix --interactive on local modification (issue4576)
Laurent Charignon <lcharignon@fb.com>
parents: 24434
diff changeset
231 > n
06cbff4674a3 revert: fix --interactive on local modification (issue4576)
Laurent Charignon <lcharignon@fb.com>
parents: 24434
diff changeset
232 > EOF
06cbff4674a3 revert: fix --interactive on local modification (issue4576)
Laurent Charignon <lcharignon@fb.com>
parents: 24434
diff changeset
233 diff -r 59dd6e4ab63a f
06cbff4674a3 revert: fix --interactive on local modification (issue4576)
Laurent Charignon <lcharignon@fb.com>
parents: 24434
diff changeset
234 2 hunks, 2 lines changed
06cbff4674a3 revert: fix --interactive on local modification (issue4576)
Laurent Charignon <lcharignon@fb.com>
parents: 24434
diff changeset
235 examine changes to 'f'? [Ynesfdaq?] y
06cbff4674a3 revert: fix --interactive on local modification (issue4576)
Laurent Charignon <lcharignon@fb.com>
parents: 24434
diff changeset
236
06cbff4674a3 revert: fix --interactive on local modification (issue4576)
Laurent Charignon <lcharignon@fb.com>
parents: 24434
diff changeset
237 @@ -1,5 +1,6 @@
06cbff4674a3 revert: fix --interactive on local modification (issue4576)
Laurent Charignon <lcharignon@fb.com>
parents: 24434
diff changeset
238 +a
06cbff4674a3 revert: fix --interactive on local modification (issue4576)
Laurent Charignon <lcharignon@fb.com>
parents: 24434
diff changeset
239 1
06cbff4674a3 revert: fix --interactive on local modification (issue4576)
Laurent Charignon <lcharignon@fb.com>
parents: 24434
diff changeset
240 2
06cbff4674a3 revert: fix --interactive on local modification (issue4576)
Laurent Charignon <lcharignon@fb.com>
parents: 24434
diff changeset
241 3
06cbff4674a3 revert: fix --interactive on local modification (issue4576)
Laurent Charignon <lcharignon@fb.com>
parents: 24434
diff changeset
242 4
06cbff4674a3 revert: fix --interactive on local modification (issue4576)
Laurent Charignon <lcharignon@fb.com>
parents: 24434
diff changeset
243 5
06cbff4674a3 revert: fix --interactive on local modification (issue4576)
Laurent Charignon <lcharignon@fb.com>
parents: 24434
diff changeset
244 record change 1/2 to 'f'? [Ynesfdaq?] y
06cbff4674a3 revert: fix --interactive on local modification (issue4576)
Laurent Charignon <lcharignon@fb.com>
parents: 24434
diff changeset
245
06cbff4674a3 revert: fix --interactive on local modification (issue4576)
Laurent Charignon <lcharignon@fb.com>
parents: 24434
diff changeset
246 @@ -1,5 +2,6 @@
06cbff4674a3 revert: fix --interactive on local modification (issue4576)
Laurent Charignon <lcharignon@fb.com>
parents: 24434
diff changeset
247 1
06cbff4674a3 revert: fix --interactive on local modification (issue4576)
Laurent Charignon <lcharignon@fb.com>
parents: 24434
diff changeset
248 2
06cbff4674a3 revert: fix --interactive on local modification (issue4576)
Laurent Charignon <lcharignon@fb.com>
parents: 24434
diff changeset
249 3
06cbff4674a3 revert: fix --interactive on local modification (issue4576)
Laurent Charignon <lcharignon@fb.com>
parents: 24434
diff changeset
250 4
06cbff4674a3 revert: fix --interactive on local modification (issue4576)
Laurent Charignon <lcharignon@fb.com>
parents: 24434
diff changeset
251 5
06cbff4674a3 revert: fix --interactive on local modification (issue4576)
Laurent Charignon <lcharignon@fb.com>
parents: 24434
diff changeset
252 +b
06cbff4674a3 revert: fix --interactive on local modification (issue4576)
Laurent Charignon <lcharignon@fb.com>
parents: 24434
diff changeset
253 record change 2/2 to 'f'? [Ynesfdaq?] n
06cbff4674a3 revert: fix --interactive on local modification (issue4576)
Laurent Charignon <lcharignon@fb.com>
parents: 24434
diff changeset
254
06cbff4674a3 revert: fix --interactive on local modification (issue4576)
Laurent Charignon <lcharignon@fb.com>
parents: 24434
diff changeset
255 $ hg st
06cbff4674a3 revert: fix --interactive on local modification (issue4576)
Laurent Charignon <lcharignon@fb.com>
parents: 24434
diff changeset
256 M f
06cbff4674a3 revert: fix --interactive on local modification (issue4576)
Laurent Charignon <lcharignon@fb.com>
parents: 24434
diff changeset
257 M folder1/g
06cbff4674a3 revert: fix --interactive on local modification (issue4576)
Laurent Charignon <lcharignon@fb.com>
parents: 24434
diff changeset
258 R folder1/i
06cbff4674a3 revert: fix --interactive on local modification (issue4576)
Laurent Charignon <lcharignon@fb.com>
parents: 24434
diff changeset
259 ? f.orig
06cbff4674a3 revert: fix --interactive on local modification (issue4576)
Laurent Charignon <lcharignon@fb.com>
parents: 24434
diff changeset
260 $ cat f
06cbff4674a3 revert: fix --interactive on local modification (issue4576)
Laurent Charignon <lcharignon@fb.com>
parents: 24434
diff changeset
261 a
06cbff4674a3 revert: fix --interactive on local modification (issue4576)
Laurent Charignon <lcharignon@fb.com>
parents: 24434
diff changeset
262 1
06cbff4674a3 revert: fix --interactive on local modification (issue4576)
Laurent Charignon <lcharignon@fb.com>
parents: 24434
diff changeset
263 2
06cbff4674a3 revert: fix --interactive on local modification (issue4576)
Laurent Charignon <lcharignon@fb.com>
parents: 24434
diff changeset
264 3
06cbff4674a3 revert: fix --interactive on local modification (issue4576)
Laurent Charignon <lcharignon@fb.com>
parents: 24434
diff changeset
265 4
06cbff4674a3 revert: fix --interactive on local modification (issue4576)
Laurent Charignon <lcharignon@fb.com>
parents: 24434
diff changeset
266 5
06cbff4674a3 revert: fix --interactive on local modification (issue4576)
Laurent Charignon <lcharignon@fb.com>
parents: 24434
diff changeset
267 $ cat f.orig
06cbff4674a3 revert: fix --interactive on local modification (issue4576)
Laurent Charignon <lcharignon@fb.com>
parents: 24434
diff changeset
268 1
06cbff4674a3 revert: fix --interactive on local modification (issue4576)
Laurent Charignon <lcharignon@fb.com>
parents: 24434
diff changeset
269 2
06cbff4674a3 revert: fix --interactive on local modification (issue4576)
Laurent Charignon <lcharignon@fb.com>
parents: 24434
diff changeset
270 3
06cbff4674a3 revert: fix --interactive on local modification (issue4576)
Laurent Charignon <lcharignon@fb.com>
parents: 24434
diff changeset
271 4
06cbff4674a3 revert: fix --interactive on local modification (issue4576)
Laurent Charignon <lcharignon@fb.com>
parents: 24434
diff changeset
272 5