Mercurial > hg
comparison tests/test-rebase-inmemory.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 | feffeb18d412 |
children | 21733e8c924f |
comparison
equal
deleted
inserted
replaced
45770:96fcc37a9c80 | 45771:f90a5c211251 |
---|---|
40 c (no-eol) | 40 c (no-eol) |
41 $ hg cat -r 2 b | 41 $ hg cat -r 2 b |
42 b (no-eol) | 42 b (no-eol) |
43 $ hg rebase --debug -r b -d c | grep rebasing | 43 $ hg rebase --debug -r b -d c | grep rebasing |
44 rebasing in memory | 44 rebasing in memory |
45 rebasing 2:db0e82a16a62 "b" (b) | 45 rebasing 2:db0e82a16a62 b "b" |
46 $ hg tglog | 46 $ hg tglog |
47 o 3: ca58782ad1e4 'b' | 47 o 3: ca58782ad1e4 'b' |
48 | | 48 | |
49 o 2: 814f6bd05178 'c' | 49 o 2: 814f6bd05178 'c' |
50 | | 50 | |
100 b (no-eol) | 100 b (no-eol) |
101 $ hg cat -r 3 e | 101 $ hg cat -r 3 e |
102 somefile (no-eol) | 102 somefile (no-eol) |
103 $ hg rebase --debug -s b -d a | grep rebasing | 103 $ hg rebase --debug -s b -d a | grep rebasing |
104 rebasing in memory | 104 rebasing in memory |
105 rebasing 2:db0e82a16a62 "b" (b) | 105 rebasing 2:db0e82a16a62 b "b" |
106 $ hg tglog | 106 $ hg tglog |
107 o 3: fc055c3b4d33 'b' | 107 o 3: fc055c3b4d33 'b' |
108 | | 108 | |
109 | o 2: f56b71190a8f 'c' | 109 | o 2: f56b71190a8f 'c' |
110 | | | 110 | | |
116 c (no-eol) | 116 c (no-eol) |
117 $ hg cat -r 3 b | 117 $ hg cat -r 3 b |
118 b (no-eol) | 118 b (no-eol) |
119 $ hg rebase --debug -s 1 -d 3 | grep rebasing | 119 $ hg rebase --debug -s 1 -d 3 | grep rebasing |
120 rebasing in memory | 120 rebasing in memory |
121 rebasing 1:02952614a83d "d" (d) | 121 rebasing 1:02952614a83d d "d" |
122 rebasing 2:f56b71190a8f "c" | 122 rebasing 2:f56b71190a8f "c" |
123 $ hg tglog | 123 $ hg tglog |
124 o 3: 753feb6fd12a 'c' | 124 o 3: 753feb6fd12a 'c' |
125 | | 125 | |
126 o 2: 09c044d2cb43 'd' | 126 o 2: 09c044d2cb43 'd' |
147 Rebase the working copy parent | 147 Rebase the working copy parent |
148 $ hg up -C 3 | 148 $ hg up -C 3 |
149 0 files updated, 0 files merged, 0 files removed, 0 files unresolved | 149 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
150 $ hg rebase -r 3 -d 0 --debug | grep rebasing | 150 $ hg rebase -r 3 -d 0 --debug | grep rebasing |
151 rebasing in memory | 151 rebasing in memory |
152 rebasing 3:753feb6fd12a "c" (tip) | 152 rebasing 3:753feb6fd12a tip "c" |
153 $ hg tglog | 153 $ hg tglog |
154 @ 3: 844a7de3e617 'c' | 154 @ 3: 844a7de3e617 'c' |
155 | | 155 | |
156 | o 2: 09c044d2cb43 'd' | 156 | o 2: 09c044d2cb43 'd' |
157 | | | 157 | | |
177 | o 1: fc055c3b4d33 'b' | 177 | o 1: fc055c3b4d33 'b' |
178 |/ | 178 |/ |
179 o 0: b173517d0057 'a' | 179 o 0: b173517d0057 'a' |
180 | 180 |
181 $ hg rebase -r . -d 2 | 181 $ hg rebase -r . -d 2 |
182 rebasing 4:daf7dfc139cb "a/a" (tip) | 182 rebasing 4:daf7dfc139cb tip "a/a" |
183 saved backup bundle to $TESTTMP/repo2/.hg/strip-backup/daf7dfc139cb-fdbfcf4f-rebase.hg | 183 saved backup bundle to $TESTTMP/repo2/.hg/strip-backup/daf7dfc139cb-fdbfcf4f-rebase.hg |
184 | 184 |
185 $ hg tglog | 185 $ hg tglog |
186 @ 4: c6ad37a4f250 'a/a' | 186 @ 4: c6ad37a4f250 'a/a' |
187 | | 187 | |
218 o | 1: fc055c3b4d33 'b' | 218 o | 1: fc055c3b4d33 'b' |
219 |/ | 219 |/ |
220 o 0: b173517d0057 'a' | 220 o 0: b173517d0057 'a' |
221 | 221 |
222 $ hg rebase -r . -d 5 | 222 $ hg rebase -r . -d 5 |
223 rebasing 7:855e9797387e "added a back!" (tip) | 223 rebasing 7:855e9797387e tip "added a back!" |
224 saved backup bundle to $TESTTMP/repo2/.hg/strip-backup/855e9797387e-81ee4c5d-rebase.hg | 224 saved backup bundle to $TESTTMP/repo2/.hg/strip-backup/855e9797387e-81ee4c5d-rebase.hg |
225 | 225 |
226 $ hg tglog | 226 $ hg tglog |
227 @ 7: bb3f02be2688 'added a back!' | 227 @ 7: bb3f02be2688 'added a back!' |
228 | | 228 | |
244 $ echo c > c/subdir/file.txt | 244 $ echo c > c/subdir/file.txt |
245 $ hg add c/subdir/file.txt | 245 $ hg add c/subdir/file.txt |
246 $ hg ci -m 'c/subdir/file.txt' | 246 $ hg ci -m 'c/subdir/file.txt' |
247 $ hg rebase -r . -d 3 -n | 247 $ hg rebase -r . -d 3 -n |
248 starting dry-run rebase; repository will not be changed | 248 starting dry-run rebase; repository will not be changed |
249 rebasing 8:e147e6e3c490 "c/subdir/file.txt" (tip) | 249 rebasing 8:e147e6e3c490 tip "c/subdir/file.txt" |
250 abort: error: 'c/subdir/file.txt' conflicts with file 'c' in 3. | 250 abort: error: 'c/subdir/file.txt' conflicts with file 'c' in 3. |
251 [255] | 251 [255] |
252 FIXME: shouldn't need this, but when we hit path conflicts in dryrun mode, we | 252 FIXME: shouldn't need this, but when we hit path conflicts in dryrun mode, we |
253 don't clean up rebasestate. | 253 don't clean up rebasestate. |
254 $ hg rebase --abort | 254 $ hg rebase --abort |
707 $ hg co -qr ".^" | 707 $ hg co -qr ".^" |
708 $ chmod +x foo.txt | 708 $ chmod +x foo.txt |
709 $ hg ci -qAm 'add +x to foo.txt' | 709 $ hg ci -qAm 'add +x to foo.txt' |
710 issue5960: this was raising an AttributeError exception | 710 issue5960: this was raising an AttributeError exception |
711 $ hg rebase -r . -d 1 | 711 $ hg rebase -r . -d 1 |
712 rebasing 2:539b93e77479 "add +x to foo.txt" (tip) | 712 rebasing 2:539b93e77479 tip "add +x to foo.txt" |
713 saved backup bundle to $TESTTMP/no_exception/.hg/strip-backup/*.hg (glob) | 713 saved backup bundle to $TESTTMP/no_exception/.hg/strip-backup/*.hg (glob) |
714 $ hg diff -c tip | 714 $ hg diff -c tip |
715 diff --git a/foo.txt b/foo.txt | 715 diff --git a/foo.txt b/foo.txt |
716 old mode 100644 | 716 old mode 100644 |
717 new mode 100755 | 717 new mode 100755 |
770 $ hg ci -m 'modify a' | 770 $ hg ci -m 'modify a' |
771 $ hg co -q 0 | 771 $ hg co -q 0 |
772 $ hg mv a b | 772 $ hg mv a b |
773 $ hg ci -qm 'rename a to b' | 773 $ hg ci -qm 'rename a to b' |
774 $ hg rebase -d 1 | 774 $ hg rebase -d 1 |
775 rebasing 2:b977edf6f839 "rename a to b" (tip) | 775 rebasing 2:b977edf6f839 tip "rename a to b" |
776 merging a and b to b | 776 merging a and b to b |
777 saved backup bundle to $TESTTMP/rebase-rename/.hg/strip-backup/b977edf6f839-0864f570-rebase.hg | 777 saved backup bundle to $TESTTMP/rebase-rename/.hg/strip-backup/b977edf6f839-0864f570-rebase.hg |
778 $ hg st --copies --change . | 778 $ hg st --copies --change . |
779 A b | 779 A b |
780 a | 780 a |
791 $ hg ci -m 'make a empty' | 791 $ hg ci -m 'make a empty' |
792 $ hg co -q 0 | 792 $ hg co -q 0 |
793 $ hg mv a b | 793 $ hg mv a b |
794 $ hg ci -qm 'rename a to b' | 794 $ hg ci -qm 'rename a to b' |
795 $ hg rebase -d 1 | 795 $ hg rebase -d 1 |
796 rebasing 2:b977edf6f839 "rename a to b" (tip) | 796 rebasing 2:b977edf6f839 tip "rename a to b" |
797 merging a and b to b | 797 merging a and b to b |
798 saved backup bundle to $TESTTMP/rebase-rename-empty/.hg/strip-backup/b977edf6f839-0864f570-rebase.hg | 798 saved backup bundle to $TESTTMP/rebase-rename-empty/.hg/strip-backup/b977edf6f839-0864f570-rebase.hg |
799 $ hg st --copies --change . | 799 $ hg st --copies --change . |
800 A b | 800 A b |
801 a | 801 a |
811 $ hg ci -m 'rename a to b' | 811 $ hg ci -m 'rename a to b' |
812 $ hg co -q 0 | 812 $ hg co -q 0 |
813 $ echo a2 > a | 813 $ echo a2 > a |
814 $ hg ci -qm 'modify a' | 814 $ hg ci -qm 'modify a' |
815 $ hg rebase -r . -d 1 --collapse | 815 $ hg rebase -r . -d 1 --collapse |
816 rebasing 2:41c4ea50d4cf "modify a" (tip) | 816 rebasing 2:41c4ea50d4cf tip "modify a" |
817 merging b and a to b | 817 merging b and a to b |
818 saved backup bundle to $TESTTMP/rebase-rename-collapse/.hg/strip-backup/41c4ea50d4cf-b90b7994-rebase.hg | 818 saved backup bundle to $TESTTMP/rebase-rename-collapse/.hg/strip-backup/41c4ea50d4cf-b90b7994-rebase.hg |
819 $ cd .. | 819 $ cd .. |
820 | 820 |
821 Test rebasing when the file we are merging in destination is empty | 821 Test rebasing when the file we are merging in destination is empty |
848 +b | 848 +b |
849 $ hg ci -m "add b to foo" | 849 $ hg ci -m "add b to foo" |
850 created new head | 850 created new head |
851 | 851 |
852 $ hg rebase -r . -d 1 --config ui.merge=internal:merge3 | 852 $ hg rebase -r . -d 1 --config ui.merge=internal:merge3 |
853 rebasing 2:fb62b706688e "add b to foo" (tip) | 853 rebasing 2:fb62b706688e tip "add b to foo" |
854 merging foo | 854 merging foo |
855 hit merge conflicts; rebasing that commit again in the working copy | 855 hit merge conflicts; rebasing that commit again in the working copy |
856 merging foo | 856 merging foo |
857 warning: conflicts while merging foo! (edit, then use 'hg resolve --mark') | 857 warning: conflicts while merging foo! (edit, then use 'hg resolve --mark') |
858 unresolved conflicts (see 'hg resolve', then 'hg rebase --continue') | 858 unresolved conflicts (see 'hg resolve', then 'hg rebase --continue') |
941 o 0: d20a80d4def3 'base' | 941 o 0: d20a80d4def3 'base' |
942 | 942 |
943 $ hg rebase -s 2 -d 3 | 943 $ hg rebase -s 2 -d 3 |
944 rebasing 2:0194f1db184a "b" | 944 rebasing 2:0194f1db184a "b" |
945 note: not rebasing 2:0194f1db184a "b", its destination already has all its changes | 945 note: not rebasing 2:0194f1db184a "b", its destination already has all its changes |
946 rebasing 4:59c8292117b1 "merge" (tip) | 946 rebasing 4:59c8292117b1 tip "merge" |
947 saved backup bundle to $TESTTMP/keep_merge/.hg/strip-backup/0194f1db184a-aee31d03-rebase.hg | 947 saved backup bundle to $TESTTMP/keep_merge/.hg/strip-backup/0194f1db184a-aee31d03-rebase.hg |
948 $ hg tglog | 948 $ hg tglog |
949 o 3: 506e2454484b 'merge' | 949 o 3: 506e2454484b 'merge' |
950 |\ | 950 |\ |
951 | o 2: 531f80391e4a 'c' | 951 | o 2: 531f80391e4a 'c' |
967 $ echo foo > test; hg add test; hg ci -m b | 967 $ echo foo > test; hg add test; hg ci -m b |
968 $ hg up 0 -q | 968 $ hg up 0 -q |
969 $ echo bar > test; hg add test; hg ci -m c | 969 $ echo bar > test; hg add test; hg ci -m c |
970 created new head | 970 created new head |
971 $ hg rebase -d 2 -d 1 --tool :local | 971 $ hg rebase -d 2 -d 1 --tool :local |
972 rebasing 2:ca2749322ee5 "c" (tip) | 972 rebasing 2:ca2749322ee5 tip "c" |
973 note: not rebasing 2:ca2749322ee5 "c" (tip), its destination already has all its changes | 973 note: not rebasing 2:ca2749322ee5 tip "c", its destination already has all its changes |
974 saved backup bundle to $TESTTMP/nofilechanges/.hg/strip-backup/ca2749322ee5-6dc7e94b-rebase.hg | 974 saved backup bundle to $TESTTMP/nofilechanges/.hg/strip-backup/ca2749322ee5-6dc7e94b-rebase.hg |