Mercurial > hg
comparison tests/test-rebase-detach.t @ 45771:f90a5c211251
rebase: change and standarize template for rebase's one-line summary
This removes the default template in rebase and switches to a
centrally defined template. I've simplified it a bit to avoid the
conditional parenthesis. I've also added labels so the different parts
can be easily colored. The template is somewhat similar to what we've
used internally at Google for a few years.
I'm happy to change the template if others have opinions. Should we
reuse the `color.log.` names as I have?
Differential Revision: https://phab.mercurial-scm.org/D9252
author | Martin von Zweigbergk <martinvonz@google.com> |
---|---|
date | Tue, 27 Oct 2020 15:33:15 -0700 |
parents | dc5e5577af39 |
children | 21733e8c924f |
comparison
equal
deleted
inserted
replaced
45770:96fcc37a9c80 | 45771:f90a5c211251 |
---|---|
22 > A | 22 > A |
23 > EOF | 23 > EOF |
24 $ hg phase --force --secret D | 24 $ hg phase --force --secret D |
25 | 25 |
26 $ hg rebase -s D -d B | 26 $ hg rebase -s D -d B |
27 rebasing 3:e7b3f00ed42e "D" (D tip) | 27 rebasing 3:e7b3f00ed42e D tip "D" |
28 saved backup bundle to $TESTTMP/a1/.hg/strip-backup/e7b3f00ed42e-6f368371-rebase.hg | 28 saved backup bundle to $TESTTMP/a1/.hg/strip-backup/e7b3f00ed42e-6f368371-rebase.hg |
29 | 29 |
30 $ hg log -G --template "{rev}:{phase} '{desc}' {branches}\n" | 30 $ hg log -G --template "{rev}:{phase} '{desc}' {branches}\n" |
31 o 3:secret 'D' | 31 o 3:secret 'D' |
32 | | 32 | |
58 > |/ | 58 > |/ |
59 > A | 59 > A |
60 > EOF | 60 > EOF |
61 | 61 |
62 $ hg rebase -s D -d B | 62 $ hg rebase -s D -d B |
63 rebasing 3:e7b3f00ed42e "D" (D) | 63 rebasing 3:e7b3f00ed42e D "D" |
64 rebasing 4:69a34c08022a "E" (E tip) | 64 rebasing 4:69a34c08022a E tip "E" |
65 saved backup bundle to $TESTTMP/a2/.hg/strip-backup/e7b3f00ed42e-a2ec7cea-rebase.hg | 65 saved backup bundle to $TESTTMP/a2/.hg/strip-backup/e7b3f00ed42e-a2ec7cea-rebase.hg |
66 | 66 |
67 $ hg tglog | 67 $ hg tglog |
68 o 4: ee79e0744528 'E' | 68 o 4: ee79e0744528 'E' |
69 | | 69 | |
95 > |/ | 95 > |/ |
96 > A | 96 > A |
97 > EOF | 97 > EOF |
98 | 98 |
99 $ hg rebase -s C -d B | 99 $ hg rebase -s C -d B |
100 rebasing 2:dc0947a82db8 "C" (C) | 100 rebasing 2:dc0947a82db8 C "C" |
101 rebasing 3:e7b3f00ed42e "D" (D tip) | 101 rebasing 3:e7b3f00ed42e D tip "D" |
102 saved backup bundle to $TESTTMP/a3/.hg/strip-backup/dc0947a82db8-b8481714-rebase.hg | 102 saved backup bundle to $TESTTMP/a3/.hg/strip-backup/dc0947a82db8-b8481714-rebase.hg |
103 | 103 |
104 $ hg tglog | 104 $ hg tglog |
105 o 3: 7375f3dbfb0f 'D' | 105 o 3: 7375f3dbfb0f 'D' |
106 | | 106 | |
134 > A | 134 > A |
135 > EOF | 135 > EOF |
136 $ hg phase --force --secret E | 136 $ hg phase --force --secret E |
137 | 137 |
138 $ hg rebase --collapse -s D -d B | 138 $ hg rebase --collapse -s D -d B |
139 rebasing 3:e7b3f00ed42e "D" (D) | 139 rebasing 3:e7b3f00ed42e D "D" |
140 rebasing 4:69a34c08022a "E" (E tip) | 140 rebasing 4:69a34c08022a E tip "E" |
141 saved backup bundle to $TESTTMP/a4/.hg/strip-backup/e7b3f00ed42e-a2ec7cea-rebase.hg | 141 saved backup bundle to $TESTTMP/a4/.hg/strip-backup/e7b3f00ed42e-a2ec7cea-rebase.hg |
142 | 142 |
143 $ hg log -G --template "{rev}:{phase} '{desc}' {branches}\n" | 143 $ hg log -G --template "{rev}:{phase} '{desc}' {branches}\n" |
144 o 3:secret 'Collapsed revision | 144 o 3:secret 'Collapsed revision |
145 | * D | 145 | * D |
171 > | | 171 > | |
172 > A B | 172 > A B |
173 > EOF | 173 > EOF |
174 | 174 |
175 $ hg rebase -s C -d B | 175 $ hg rebase -s C -d B |
176 rebasing 2:dc0947a82db8 "C" (C) | 176 rebasing 2:dc0947a82db8 C "C" |
177 rebasing 3:e7b3f00ed42e "D" (D) | 177 rebasing 3:e7b3f00ed42e D "D" |
178 rebasing 4:69a34c08022a "E" (E tip) | 178 rebasing 4:69a34c08022a E tip "E" |
179 saved backup bundle to $TESTTMP/a5/.hg/strip-backup/dc0947a82db8-3eefec98-rebase.hg | 179 saved backup bundle to $TESTTMP/a5/.hg/strip-backup/dc0947a82db8-3eefec98-rebase.hg |
180 | 180 |
181 $ hg tglog | 181 $ hg tglog |
182 o 4: e3d0c70d606d 'E' | 182 o 4: e3d0c70d606d 'E' |
183 | | 183 | |
189 | 189 |
190 o 0: 426bada5c675 'A' | 190 o 0: 426bada5c675 'A' |
191 | 191 |
192 $ hg rebase -d 1 -s 3 | 192 $ hg rebase -d 1 -s 3 |
193 rebasing 3:e9153d36a1af "D" | 193 rebasing 3:e9153d36a1af "D" |
194 rebasing 4:e3d0c70d606d "E" (tip) | 194 rebasing 4:e3d0c70d606d tip "E" |
195 saved backup bundle to $TESTTMP/a5/.hg/strip-backup/e9153d36a1af-db7388ed-rebase.hg | 195 saved backup bundle to $TESTTMP/a5/.hg/strip-backup/e9153d36a1af-db7388ed-rebase.hg |
196 $ hg tglog | 196 $ hg tglog |
197 o 4: 2c24e540eccd 'E' | 197 o 4: 2c24e540eccd 'E' |
198 | | 198 | |
199 o 3: 73f786ed52ff 'D' | 199 o 3: 73f786ed52ff 'D' |
246 | o 1: 7fb047a69f22 'E' | 246 | o 1: 7fb047a69f22 'E' |
247 |/ | 247 |/ |
248 o 0: 426bada5c675 'A' | 248 o 0: 426bada5c675 'A' |
249 | 249 |
250 $ hg rebase -s I -d H --collapse --config ui.merge=internal:other | 250 $ hg rebase -s I -d H --collapse --config ui.merge=internal:other |
251 rebasing 5:b92d164ad3cb "I" (I) | 251 rebasing 5:b92d164ad3cb I "I" |
252 rebasing 6:0cfbc7e8faaf "Merge" | 252 rebasing 6:0cfbc7e8faaf "Merge" |
253 rebasing 7:c6aaf0d259c0 "J" (tip) | 253 rebasing 7:c6aaf0d259c0 tip "J" |
254 saved backup bundle to $TESTTMP/a6/.hg/strip-backup/b92d164ad3cb-88fd7ab7-rebase.hg | 254 saved backup bundle to $TESTTMP/a6/.hg/strip-backup/b92d164ad3cb-88fd7ab7-rebase.hg |
255 | 255 |
256 $ hg tglog | 256 $ hg tglog |
257 @ 5: 65079693dac4 'Collapsed revision | 257 @ 5: 65079693dac4 'Collapsed revision |
258 | * I | 258 | * I |
292 $ echo 'B2' > B | 292 $ echo 'B2' > B |
293 $ hg ci -A -m 'B2' | 293 $ hg ci -A -m 'B2' |
294 adding B | 294 adding B |
295 $ hg phase --force --secret . | 295 $ hg phase --force --secret . |
296 $ hg rebase -s . -d B --config ui.merge=internal:merge | 296 $ hg rebase -s . -d B --config ui.merge=internal:merge |
297 rebasing 3:17b4880d2402 "B2" (tip) | 297 rebasing 3:17b4880d2402 tip "B2" |
298 merging B | 298 merging B |
299 warning: conflicts while merging B! (edit, then use 'hg resolve --mark') | 299 warning: conflicts while merging B! (edit, then use 'hg resolve --mark') |
300 unresolved conflicts (see 'hg resolve', then 'hg rebase --continue') | 300 unresolved conflicts (see 'hg resolve', then 'hg rebase --continue') |
301 [1] | 301 [1] |
302 $ hg resolve --all -t internal:local | 302 $ hg resolve --all -t internal:local |
303 (no more unresolved files) | 303 (no more unresolved files) |
304 continue: hg rebase --continue | 304 continue: hg rebase --continue |
305 $ hg rebase -c | 305 $ hg rebase -c |
306 rebasing 3:17b4880d2402 "B2" (tip) | 306 rebasing 3:17b4880d2402 tip "B2" |
307 note: not rebasing 3:17b4880d2402 "B2" (tip), its destination already has all its changes | 307 note: not rebasing 3:17b4880d2402 tip "B2", its destination already has all its changes |
308 saved backup bundle to $TESTTMP/a7/.hg/strip-backup/17b4880d2402-1ae1f6cc-rebase.hg | 308 saved backup bundle to $TESTTMP/a7/.hg/strip-backup/17b4880d2402-1ae1f6cc-rebase.hg |
309 $ hg log -G --template "{rev}:{phase} '{desc}' {branches}\n" | 309 $ hg log -G --template "{rev}:{phase} '{desc}' {branches}\n" |
310 o 2:draft 'C' | 310 o 2:draft 'C' |
311 | | 311 | |
312 | @ 1:draft 'B' | 312 | @ 1:draft 'B' |