##// END OF EJS Templates
test-amend: match output using conditional test case name...
Jun Wu -
r34055:24ce7b0e default
parent child Browse files
Show More
@@ -28,9 +28,9 b' Basic amend'
28 $ hg update B -q
28 $ hg update B -q
29 $ echo 2 >> B
29 $ echo 2 >> B
30
30
31 $ hg amend
32 saved backup bundle to $TESTTMP/repo1/.hg/strip-backup/112478962961-af2c0941-amend.hg (glob) (obsstore-off !)
31 #if obsstore-off
33 #if obsstore-off
32 $ hg amend
33 saved backup bundle to $TESTTMP/repo1/.hg/strip-backup/112478962961-af2c0941-amend.hg (glob)
34 $ hg log -p -G --hidden -T '{rev} {node|short} {desc}\n'
34 $ hg log -p -G --hidden -T '{rev} {node|short} {desc}\n'
35 @ 1 be169c7e8dbe B
35 @ 1 be169c7e8dbe B
36 | diff --git a/B b/B
36 | diff --git a/B b/B
@@ -50,7 +50,6 b' Basic amend'
50 \ No newline at end of file
50 \ No newline at end of file
51
51
52 #else
52 #else
53 $ hg amend
54 $ hg log -p -G --hidden -T '{rev} {node|short} {desc}\n'
53 $ hg log -p -G --hidden -T '{rev} {node|short} {desc}\n'
55 @ 3 be169c7e8dbe B
54 @ 3 be169c7e8dbe B
56 | diff --git a/B b/B
55 | diff --git a/B b/B
@@ -100,12 +99,14 b' Matcher and metadata options'
100 $ echo 3 > C
99 $ echo 3 > C
101 $ echo 4 > D
100 $ echo 4 > D
102 $ hg add C D
101 $ hg add C D
103 $ hg amend -m NEWMESSAGE -I C -q
102 $ hg amend -m NEWMESSAGE -I C
103 saved backup bundle to $TESTTMP/repo1/.hg/strip-backup/be169c7e8dbe-c24d73fe-amend.hg (glob) (obsstore-off !)
104 $ hg log -r . -T '{node|short} {desc} {files}\n'
104 $ hg log -r . -T '{node|short} {desc} {files}\n'
105 c7ba14d9075b NEWMESSAGE B C
105 c7ba14d9075b NEWMESSAGE B C
106 $ echo 5 > E
106 $ echo 5 > E
107 $ rm C
107 $ rm C
108 $ hg amend -d '2000 1000' -u 'Foo <foo@example.com>' -A C D -q
108 $ hg amend -d '2000 1000' -u 'Foo <foo@example.com>' -A C D
109 saved backup bundle to $TESTTMP/repo1/.hg/strip-backup/c7ba14d9075b-b26ed45c-amend.hg (glob) (obsstore-off !)
109 $ hg log -r . -T '{node|short} {desc} {files} {author} {date}\n'
110 $ hg log -r . -T '{node|short} {desc} {files} {author} {date}\n'
110 14f6c4bcc865 NEWMESSAGE B D Foo <foo@example.com> 2000.01000
111 14f6c4bcc865 NEWMESSAGE B D Foo <foo@example.com> 2000.01000
111
112
@@ -118,10 +119,12 b' Amend with editor'
118 > EOF
119 > EOF
119 $ chmod +x $TESTTMP/prefix.sh
120 $ chmod +x $TESTTMP/prefix.sh
120
121
121 $ HGEDITOR="sh $TESTTMP/prefix.sh" hg amend --edit -q
122 $ HGEDITOR="sh $TESTTMP/prefix.sh" hg amend --edit
123 saved backup bundle to $TESTTMP/repo1/.hg/strip-backup/14f6c4bcc865-6591f15d-amend.hg (glob) (obsstore-off !)
122 $ hg log -r . -T '{node|short} {desc}\n'
124 $ hg log -r . -T '{node|short} {desc}\n'
123 298f085230c3 EDITED: NEWMESSAGE
125 298f085230c3 EDITED: NEWMESSAGE
124 $ HGEDITOR="sh $TESTTMP/prefix.sh" hg amend -e -m MSG -q
126 $ HGEDITOR="sh $TESTTMP/prefix.sh" hg amend -e -m MSG
127 saved backup bundle to $TESTTMP/repo1/.hg/strip-backup/298f085230c3-d81a6ad3-amend.hg (glob) (obsstore-off !)
125 $ hg log -r . -T '{node|short} {desc}\n'
128 $ hg log -r . -T '{node|short} {desc}\n'
126 974f07f28537 EDITED: MSG
129 974f07f28537 EDITED: MSG
127
130
@@ -129,7 +132,8 b' Amend with editor'
129 $ hg amend -l $TESTTMP/msg -m BAR
132 $ hg amend -l $TESTTMP/msg -m BAR
130 abort: options --message and --logfile are mutually exclusive
133 abort: options --message and --logfile are mutually exclusive
131 [255]
134 [255]
132 $ hg amend -l $TESTTMP/msg -q
135 $ hg amend -l $TESTTMP/msg
136 saved backup bundle to $TESTTMP/repo1/.hg/strip-backup/974f07f28537-edb6470a-amend.hg (glob) (obsstore-off !)
133 $ hg log -r . -T '{node|short} {desc}\n'
137 $ hg log -r . -T '{node|short} {desc}\n'
134 507be9bdac71 FOO
138 507be9bdac71 FOO
135
139
@@ -137,7 +141,7 b' Interactive mode'
137
141
138 $ touch F G
142 $ touch F G
139 $ hg add F G
143 $ hg add F G
140 $ cat <<EOS | hg amend -i --config ui.interactive=1 -q
144 $ cat <<EOS | hg amend -i --config ui.interactive=1
141 > y
145 > y
142 > n
146 > n
143 > EOS
147 > EOS
@@ -149,6 +153,7 b' Interactive mode'
149 new file mode 100644
153 new file mode 100644
150 examine changes to 'G'? [Ynesfdaq?] n
154 examine changes to 'G'? [Ynesfdaq?] n
151
155
156 saved backup bundle to $TESTTMP/repo1/.hg/strip-backup/507be9bdac71-7ae43d04-amend.hg (glob) (obsstore-off !)
152 $ hg log -r . -T '{files}\n'
157 $ hg log -r . -T '{files}\n'
153 B D F
158 B D F
154
159
@@ -195,7 +200,7 b' Cannot amend public changeset'
195
200
196 $ hg phase -r A --public
201 $ hg phase -r A --public
197 $ hg update -C -q A
202 $ hg update -C -q A
198 $ hg amend -m AMEND -q
203 $ hg amend -m AMEND
199 abort: cannot amend public changesets
204 abort: cannot amend public changesets
200 [255]
205 [255]
201
206
@@ -209,7 +214,8 b' Amend a merge changeset'
209 > A B
214 > A B
210 > EOS
215 > EOS
211 $ hg update -q C
216 $ hg update -q C
212 $ hg amend -m FOO -q
217 $ hg amend -m FOO
218 saved backup bundle to $TESTTMP/repo3/.hg/strip-backup/a35c07e8a2a4-15ff4612-amend.hg (glob) (obsstore-off !)
213 $ rm .hg/localtags
219 $ rm .hg/localtags
214 $ hg log -G -T '{desc}\n'
220 $ hg log -G -T '{desc}\n'
215 @ FOO
221 @ FOO
General Comments 0
You need to be logged in to leave comments. Login now