comparison tests/test-evolve-obshistory.t @ 5304:83ceafbaa7d6 stable

branching: merge into stable in preparation for release
author Anton Shestakov <av6@dwimlabs.net>
date Fri, 08 May 2020 18:22:26 +0800
parents e8660b28bfee
children 011b53a9d03c f3d6b43e8b82
comparison
equal deleted inserted replaced
5252:a828c7a7ace1 5304:83ceafbaa7d6
91 summary: ROOT 91 summary: ROOT
92 92
93 Actual test 93 Actual test
94 ----------- 94 -----------
95 95
96 $ hg obslog 7a230b46bf61 --patch 96 $ hg obslog 7a230b46bf61 --patch --no-origin
97 @ 7a230b46bf61 (3) A2 97 @ 7a230b46bf61 (3) A2
98 | 98 |
99 x fdf9bde5129a (2) A1 99 x fdf9bde5129a (2) A1
100 | reworded(description) as 7a230b46bf61 using amend by test (Thu Jan 01 00:00:00 1970 +0000) 100 | reworded(description) as 7a230b46bf61 using amend by test (Thu Jan 01 00:00:00 1970 +0000)
101 | diff -r fdf9bde5129a -r 7a230b46bf61 changeset-description 101 | diff -r fdf9bde5129a -r 7a230b46bf61 changeset-description
114 @@ -1,1 +1,1 @@ 114 @@ -1,1 +1,1 @@
115 -A0 115 -A0
116 +A1 116 +A1
117 117
118 118
119
120 $ hg obslog 7a230b46bf61 --patch
121 @ 7a230b46bf61 (3) A2
122 | reworded(description) from fdf9bde5129a using amend by test (Thu Jan 01 00:00:00 1970 +0000)
123 | diff -r fdf9bde5129a -r 7a230b46bf61 changeset-description
124 | --- a/changeset-description
125 | +++ b/changeset-description
126 | @@ -1,1 +1,1 @@
127 | -A1
128 | +A2
129 |
130 |
131 x fdf9bde5129a (2) A1
132 | reworded(description) from 471f378eab4c using amend by test (Thu Jan 01 00:00:00 1970 +0000)
133 | diff -r 471f378eab4c -r fdf9bde5129a changeset-description
134 | --- a/changeset-description
135 | +++ b/changeset-description
136 | @@ -1,1 +1,1 @@
137 | -A0
138 | +A1
139 |
140 |
141 x 471f378eab4c (1) A0
142
143
119 $ cd $TESTTMP/local-remote-markers-2 144 $ cd $TESTTMP/local-remote-markers-2
120 $ hg pull 145 $ hg pull
121 pulling from $TESTTMP/local-remote-markers-1 146 pulling from $TESTTMP/local-remote-markers-1
122 searching for changes 147 searching for changes
123 adding changesets 148 adding changesets
128 obsoleted 1 changesets 153 obsoleted 1 changesets
129 new changesets 7a230b46bf61 (1 drafts) 154 new changesets 7a230b46bf61 (1 drafts)
130 (run 'hg heads' to see heads, 'hg merge' to merge) 155 (run 'hg heads' to see heads, 'hg merge' to merge)
131 working directory parent is obsolete! (471f378eab4c) 156 working directory parent is obsolete! (471f378eab4c)
132 (use 'hg evolve' to update to its successor: 7a230b46bf61) 157 (use 'hg evolve' to update to its successor: 7a230b46bf61)
133 Check that debugobshistory works with markers pointing to missing local 158 Check that obslog works with markers pointing to missing local changectx
134 changectx 159 $ hg obslog 7a230b46bf61 --patch --no-origin
135 $ hg obslog 7a230b46bf61 --patch
136 o 7a230b46bf61 (2) A2 160 o 7a230b46bf61 (2) A2
137 | 161 |
138 x fdf9bde5129a 162 x fdf9bde5129a
139 | reworded(description) as 7a230b46bf61 using amend by test (Thu Jan 01 00:00:00 1970 +0000) 163 | reworded(description) as 7a230b46bf61 using amend by test (Thu Jan 01 00:00:00 1970 +0000)
140 | (No patch available, context is not local) 164 | (No patch available, context is not local)
142 @ 471f378eab4c (1) A0 166 @ 471f378eab4c (1) A0
143 reworded(description) as fdf9bde5129a using amend by test (Thu Jan 01 00:00:00 1970 +0000) 167 reworded(description) as fdf9bde5129a using amend by test (Thu Jan 01 00:00:00 1970 +0000)
144 (No patch available, successor is unknown locally) 168 (No patch available, successor is unknown locally)
145 169
146 170
147 $ hg obslog 7a230b46bf61 --patch -f 171 $ hg obslog 7a230b46bf61 --patch
148 o 7a230b46bf61 (2) A2 172 o 7a230b46bf61 (2) A2
173 | reworded(description) from fdf9bde5129a using amend by test (Thu Jan 01 00:00:00 1970 +0000)
174 | (No patch available, predecessor is unknown locally)
175 |
176 x fdf9bde5129a
177 | reworded(description) from 471f378eab4c using amend by test (Thu Jan 01 00:00:00 1970 +0000)
178 | (No patch available, context is not local)
149 | 179 |
150 @ 471f378eab4c (1) A0 180 @ 471f378eab4c (1) A0
151 reworded(description) as 7a230b46bf61 using amend by test (at Thu Jan 01 00:00:00 1970 +0000) 181
182
183 $ hg obslog 7a230b46bf61 --patch -f --no-origin
184 o 7a230b46bf61 (2) A2
185 |
186 @ 471f378eab4c (1) A0
187 reworded(description) as 7a230b46bf61 using amend by test (Thu Jan 01 00:00:00 1970 +0000)
152 diff -r 471f378eab4c -r 7a230b46bf61 changeset-description 188 diff -r 471f378eab4c -r 7a230b46bf61 changeset-description
153 --- a/changeset-description 189 --- a/changeset-description
154 +++ b/changeset-description 190 +++ b/changeset-description
155 @@ -1,1 +1,1 @@ 191 @@ -1,1 +1,1 @@
156 -A0 192 -A0
157 +A2 193 +A2
158 194
159 195
196 $ hg obslog 7a230b46bf61 --patch -f
197 o 7a230b46bf61 (2) A2
198 | reworded(description) from 471f378eab4c using amend by test (Thu Jan 01 00:00:00 1970 +0000)
199 | diff -r 471f378eab4c -r 7a230b46bf61 changeset-description
200 | --- a/changeset-description
201 | +++ b/changeset-description
202 | @@ -1,1 +1,1 @@
203 | -A0
204 | +A2
205 |
206 |
207 @ 471f378eab4c (1) A0
208
209
160 $ hg obslog 7a230b46bf61 --color=debug --patch 210 $ hg obslog 7a230b46bf61 --color=debug --patch
161 o [evolve.node|7a230b46bf61] [evolve.rev|(2)] [evolve.short_description|A2] 211 o [evolve.node|7a230b46bf61] [evolve.rev|(2)] [evolve.short_description|A2]
212 | [evolve.verb|reworded](description) from [evolve.node|fdf9bde5129a] using [evolve.operation|amend] by [evolve.user|test] [evolve.date|(Thu Jan 01 00:00:00 1970 +0000)]
213 | (No patch available, predecessor is unknown locally)
162 | 214 |
163 x [evolve.node evolve.missing_change_ctx|fdf9bde5129a] 215 x [evolve.node evolve.missing_change_ctx|fdf9bde5129a]
164 | [evolve.verb|reworded](description) as [evolve.node|7a230b46bf61] using [evolve.operation|amend] by [evolve.user|test] [evolve.date|(Thu Jan 01 00:00:00 1970 +0000)] 216 | [evolve.verb|reworded](description) from [evolve.node|471f378eab4c] using [evolve.operation|amend] by [evolve.user|test] [evolve.date|(Thu Jan 01 00:00:00 1970 +0000)]
165 | (No patch available, context is not local) 217 | (No patch available, context is not local)
166 | 218 |
167 @ [evolve.node|471f378eab4c] [evolve.rev|(1)] [evolve.short_description|A0] 219 @ [evolve.node|471f378eab4c] [evolve.rev|(1)] [evolve.short_description|A0]
168 [evolve.verb|reworded](description) as [evolve.node|fdf9bde5129a] using [evolve.operation|amend] by [evolve.user|test] [evolve.date|(Thu Jan 01 00:00:00 1970 +0000)] 220
169 (No patch available, successor is unknown locally) 221
170 222 $ hg obslog 7a230b46bf61 --graph --no-origin \
171 223 > -T '{node|short} {rev} {desc|firstline}\n{markers % "rewritten using {operations}"}\n'
172 $ hg obslog 7a230b46bf61 --graph \
173 > -T '{node|short} {rev} {desc|firstline}\n{markers % "rewritten using {operation}"}\n'
174 o 7a230b46bf61 2 A2 224 o 7a230b46bf61 2 A2
175 | 225 |
176 x fdf9bde5129a 226 x fdf9bde5129a
177 | rewritten using amend 227 | rewritten using amend
178 @ 471f378eab4c 1 A0 228 @ 471f378eab4c 1 A0
179 rewritten using amend 229 rewritten using amend
230
231 $ hg obslog 7a230b46bf61 --graph \
232 > -T '{node|short} {rev} {desc|firstline}\n{markers % "rewritten using {operations}"}\n'
233 o 7a230b46bf61 2 A2
234 | rewritten using amend
235 x fdf9bde5129a
236 | rewritten using amend
237 @ 471f378eab4c 1 A0
238
239
240 Test output with non-local changesets and various templates
241 ===========================================================
242
243 $ hg init $TESTTMP/obslog-non-local-templates
244 $ cd $TESTTMP/obslog-non-local-templates
245 $ cat << EOF >> .hg/hgrc
246 > [templates]
247 > fancy = '{desc|firstline}\n{markers % "{verb} using {operations} by {users} ({join(notes, "; ")})"}'
248 > fancier = '{desc|firstline}\n{markers % "{join(users, ", ")} had {verb} this commit using {join(operations, "/")} and said: {join(notes % "\"{note}\"", ", ")})"}'
249 > EOF
250
251 $ mkcommit A0
252 $ hg metaedit -m 'A1' -n 'note1' -d '42 0' --config devel.default-date='1 0' -q
253 $ HGUSER=alice hg amend -m 'A2' -n 'note2'
254 $ HGUSER=bob hg amend -m 'A3' -n 'note3'
255
256 $ hg debugobsolete
257 6ffd04c870fe2b73e7c885e508c4f1213a75c4d4 e481355d236800802337be3e637bd820870b04d2 0 (Thu Jan 01 00:00:01 1970 +0000) {'ef1': '33', 'note': 'note1', 'operation': 'metaedit', 'user': 'test'}
258 e481355d236800802337be3e637bd820870b04d2 65835bf83412a950e6a47f023690d5e6ae09718d 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '1', 'note': 'note2', 'operation': 'amend', 'user': 'alice'}
259 65835bf83412a950e6a47f023690d5e6ae09718d 41985e02b792daac8907f6b30b513bbf6e8e034d 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '1', 'note': 'note3', 'operation': 'amend', 'user': 'bob'}
260
261 $ hg strip 'desc(A1) + desc(A2)' --hidden --quiet --config extensions.strip=
262
263 $ hg obslog -f --no-origin
264 @ 41985e02b792 (1) A3
265 |
266 x 6ffd04c870fe (0) A0
267 rewritten(description, date) as 41985e02b792 using amend, metaedit by alice, bob, test (between Thu Jan 01 00:00:00 1970 +0000 and Thu Jan 01 00:00:01 1970 +0000)
268 note: note1
269 note: note2
270 note: note3
271
272 $ hg obslog -f
273 @ 41985e02b792 (1) A3
274 | rewritten(description, date) from 6ffd04c870fe using amend, metaedit by alice, bob, test (between Thu Jan 01 00:00:00 1970 +0000 and Thu Jan 01 00:00:01 1970 +0000)
275 | note: note1
276 | note: note2
277 | note: note3
278 |
279 x 6ffd04c870fe (0) A0
280
281 $ hg obslog -f -T fancy --no-origin
282 @ A3
283 |
284 x A0
285 rewritten using amend, metaedit by alice, bob, test (note1; note2; note3)
286
287 $ hg obslog -f -T fancy
288 @ A3
289 | rewritten using amend, metaedit by alice, bob, test (note1; note2; note3)
290 x A0
291
292
293 $ hg obslog -f -T fancier --no-origin
294 @ A3
295 |
296 x A0
297 alice, bob, test had rewritten this commit using amend/metaedit and said: "note1", "note2", "note3")
298
299 $ hg obslog -f -T fancier
300 @ A3
301 | alice, bob, test had rewritten this commit using amend/metaedit and said: "note1", "note2", "note3")
302 x A0
303