Mercurial > hg
annotate tests/test-rebase-transaction.t @ 49393:b9fcf54030d7
subrepo: avoid opening console window for non-native subrepos on Windows
Prevent annoying command prompt windows popping up when using TortoiseHG with
Git and SVN subrepos by passing creationflags=subprocess.CREATE_NO_WINDOW to
subprocess.Popen.
author | derekbrowncmu@gmail.com |
---|---|
date | Mon, 18 Jul 2022 03:29:53 -0400 |
parents | ac362d5a7893 |
children | 27fd12eca557 |
rev | line source |
---|---|
42613
35ebdbb38efb
continue: added support for rebase
Taapas Agrawal <taapas2897@gmail.com>
parents:
36927
diff
changeset
|
1 #testcases continuecommand continueflag |
36815
f4e9e89330d4
tests: simplify test-rebase-transaction.t
Martin von Zweigbergk <martinvonz@google.com>
parents:
34504
diff
changeset
|
2 Rebasing using a single transaction |
f4e9e89330d4
tests: simplify test-rebase-transaction.t
Martin von Zweigbergk <martinvonz@google.com>
parents:
34504
diff
changeset
|
3 |
30580
51e7c83e05ee
rebase: calculate ancestors for --base separately (issue5420)
Jun Wu <quark@fb.com>
parents:
diff
changeset
|
4 $ cat >> $HGRCPATH <<EOF |
51e7c83e05ee
rebase: calculate ancestors for --base separately (issue5420)
Jun Wu <quark@fb.com>
parents:
diff
changeset
|
5 > [extensions] |
51e7c83e05ee
rebase: calculate ancestors for --base separately (issue5420)
Jun Wu <quark@fb.com>
parents:
diff
changeset
|
6 > rebase= |
51e7c83e05ee
rebase: calculate ancestors for --base separately (issue5420)
Jun Wu <quark@fb.com>
parents:
diff
changeset
|
7 > drawdag=$TESTDIR/drawdag.py |
51e7c83e05ee
rebase: calculate ancestors for --base separately (issue5420)
Jun Wu <quark@fb.com>
parents:
diff
changeset
|
8 > |
36815
f4e9e89330d4
tests: simplify test-rebase-transaction.t
Martin von Zweigbergk <martinvonz@google.com>
parents:
34504
diff
changeset
|
9 > [rebase] |
f4e9e89330d4
tests: simplify test-rebase-transaction.t
Martin von Zweigbergk <martinvonz@google.com>
parents:
34504
diff
changeset
|
10 > singletransaction=True |
f4e9e89330d4
tests: simplify test-rebase-transaction.t
Martin von Zweigbergk <martinvonz@google.com>
parents:
34504
diff
changeset
|
11 > |
30580
51e7c83e05ee
rebase: calculate ancestors for --base separately (issue5420)
Jun Wu <quark@fb.com>
parents:
diff
changeset
|
12 > [phases] |
51e7c83e05ee
rebase: calculate ancestors for --base separately (issue5420)
Jun Wu <quark@fb.com>
parents:
diff
changeset
|
13 > publish=False |
51e7c83e05ee
rebase: calculate ancestors for --base separately (issue5420)
Jun Wu <quark@fb.com>
parents:
diff
changeset
|
14 > |
51e7c83e05ee
rebase: calculate ancestors for --base separately (issue5420)
Jun Wu <quark@fb.com>
parents:
diff
changeset
|
15 > [alias] |
51e7c83e05ee
rebase: calculate ancestors for --base separately (issue5420)
Jun Wu <quark@fb.com>
parents:
diff
changeset
|
16 > tglog = log -G --template "{rev}: {desc}" |
51e7c83e05ee
rebase: calculate ancestors for --base separately (issue5420)
Jun Wu <quark@fb.com>
parents:
diff
changeset
|
17 > EOF |
51e7c83e05ee
rebase: calculate ancestors for --base separately (issue5420)
Jun Wu <quark@fb.com>
parents:
diff
changeset
|
18 |
42613
35ebdbb38efb
continue: added support for rebase
Taapas Agrawal <taapas2897@gmail.com>
parents:
36927
diff
changeset
|
19 #if continueflag |
35ebdbb38efb
continue: added support for rebase
Taapas Agrawal <taapas2897@gmail.com>
parents:
36927
diff
changeset
|
20 $ cat >> $HGRCPATH <<EOF |
35ebdbb38efb
continue: added support for rebase
Taapas Agrawal <taapas2897@gmail.com>
parents:
36927
diff
changeset
|
21 > [alias] |
35ebdbb38efb
continue: added support for rebase
Taapas Agrawal <taapas2897@gmail.com>
parents:
36927
diff
changeset
|
22 > continue = rebase --continue |
35ebdbb38efb
continue: added support for rebase
Taapas Agrawal <taapas2897@gmail.com>
parents:
36927
diff
changeset
|
23 > EOF |
35ebdbb38efb
continue: added support for rebase
Taapas Agrawal <taapas2897@gmail.com>
parents:
36927
diff
changeset
|
24 #endif |
35ebdbb38efb
continue: added support for rebase
Taapas Agrawal <taapas2897@gmail.com>
parents:
36927
diff
changeset
|
25 |
36815
f4e9e89330d4
tests: simplify test-rebase-transaction.t
Martin von Zweigbergk <martinvonz@google.com>
parents:
34504
diff
changeset
|
26 Check that a simple rebase works |
33619
609606d21765
rebase: use one dirstateguard for when using rebase.singletransaction
Durham Goode <durham@fb.com>
parents:
33558
diff
changeset
|
27 |
36815
f4e9e89330d4
tests: simplify test-rebase-transaction.t
Martin von Zweigbergk <martinvonz@google.com>
parents:
34504
diff
changeset
|
28 $ hg init simple && cd simple |
33619
609606d21765
rebase: use one dirstateguard for when using rebase.singletransaction
Durham Goode <durham@fb.com>
parents:
33558
diff
changeset
|
29 $ hg debugdrawdag <<'EOF' |
609606d21765
rebase: use one dirstateguard for when using rebase.singletransaction
Durham Goode <durham@fb.com>
parents:
33558
diff
changeset
|
30 > Z |
609606d21765
rebase: use one dirstateguard for when using rebase.singletransaction
Durham Goode <durham@fb.com>
parents:
33558
diff
changeset
|
31 > | |
609606d21765
rebase: use one dirstateguard for when using rebase.singletransaction
Durham Goode <durham@fb.com>
parents:
33558
diff
changeset
|
32 > | D |
609606d21765
rebase: use one dirstateguard for when using rebase.singletransaction
Durham Goode <durham@fb.com>
parents:
33558
diff
changeset
|
33 > | | |
609606d21765
rebase: use one dirstateguard for when using rebase.singletransaction
Durham Goode <durham@fb.com>
parents:
33558
diff
changeset
|
34 > | C |
609606d21765
rebase: use one dirstateguard for when using rebase.singletransaction
Durham Goode <durham@fb.com>
parents:
33558
diff
changeset
|
35 > | | |
609606d21765
rebase: use one dirstateguard for when using rebase.singletransaction
Durham Goode <durham@fb.com>
parents:
33558
diff
changeset
|
36 > Y B |
609606d21765
rebase: use one dirstateguard for when using rebase.singletransaction
Durham Goode <durham@fb.com>
parents:
33558
diff
changeset
|
37 > |/ |
609606d21765
rebase: use one dirstateguard for when using rebase.singletransaction
Durham Goode <durham@fb.com>
parents:
33558
diff
changeset
|
38 > A |
609606d21765
rebase: use one dirstateguard for when using rebase.singletransaction
Durham Goode <durham@fb.com>
parents:
33558
diff
changeset
|
39 > EOF |
36927
17a744c5e270
rebase: also include commit of collapsed commits in single transaction
Martin von Zweigbergk <martinvonz@google.com>
parents:
36816
diff
changeset
|
40 - We should only see one status stored message. It comes from the start. |
33619
609606d21765
rebase: use one dirstateguard for when using rebase.singletransaction
Durham Goode <durham@fb.com>
parents:
33558
diff
changeset
|
41 $ hg rebase --debug -b D -d Z | grep 'status stored' |
609606d21765
rebase: use one dirstateguard for when using rebase.singletransaction
Durham Goode <durham@fb.com>
parents:
33558
diff
changeset
|
42 rebase status stored |
609606d21765
rebase: use one dirstateguard for when using rebase.singletransaction
Durham Goode <durham@fb.com>
parents:
33558
diff
changeset
|
43 $ hg tglog |
609606d21765
rebase: use one dirstateguard for when using rebase.singletransaction
Durham Goode <durham@fb.com>
parents:
33558
diff
changeset
|
44 o 5: D |
609606d21765
rebase: use one dirstateguard for when using rebase.singletransaction
Durham Goode <durham@fb.com>
parents:
33558
diff
changeset
|
45 | |
609606d21765
rebase: use one dirstateguard for when using rebase.singletransaction
Durham Goode <durham@fb.com>
parents:
33558
diff
changeset
|
46 o 4: C |
609606d21765
rebase: use one dirstateguard for when using rebase.singletransaction
Durham Goode <durham@fb.com>
parents:
33558
diff
changeset
|
47 | |
609606d21765
rebase: use one dirstateguard for when using rebase.singletransaction
Durham Goode <durham@fb.com>
parents:
33558
diff
changeset
|
48 o 3: B |
609606d21765
rebase: use one dirstateguard for when using rebase.singletransaction
Durham Goode <durham@fb.com>
parents:
33558
diff
changeset
|
49 | |
609606d21765
rebase: use one dirstateguard for when using rebase.singletransaction
Durham Goode <durham@fb.com>
parents:
33558
diff
changeset
|
50 o 2: Z |
609606d21765
rebase: use one dirstateguard for when using rebase.singletransaction
Durham Goode <durham@fb.com>
parents:
33558
diff
changeset
|
51 | |
609606d21765
rebase: use one dirstateguard for when using rebase.singletransaction
Durham Goode <durham@fb.com>
parents:
33558
diff
changeset
|
52 o 1: Y |
609606d21765
rebase: use one dirstateguard for when using rebase.singletransaction
Durham Goode <durham@fb.com>
parents:
33558
diff
changeset
|
53 | |
609606d21765
rebase: use one dirstateguard for when using rebase.singletransaction
Durham Goode <durham@fb.com>
parents:
33558
diff
changeset
|
54 o 0: A |
609606d21765
rebase: use one dirstateguard for when using rebase.singletransaction
Durham Goode <durham@fb.com>
parents:
33558
diff
changeset
|
55 |
609606d21765
rebase: use one dirstateguard for when using rebase.singletransaction
Durham Goode <durham@fb.com>
parents:
33558
diff
changeset
|
56 $ cd .. |
36816
9ab7eba99fe5
tests: add a few tests involving --collapse and rebase.singletransaction=1
Martin von Zweigbergk <martinvonz@google.com>
parents:
36815
diff
changeset
|
57 |
9ab7eba99fe5
tests: add a few tests involving --collapse and rebase.singletransaction=1
Martin von Zweigbergk <martinvonz@google.com>
parents:
36815
diff
changeset
|
58 Check that --collapse works |
9ab7eba99fe5
tests: add a few tests involving --collapse and rebase.singletransaction=1
Martin von Zweigbergk <martinvonz@google.com>
parents:
36815
diff
changeset
|
59 |
9ab7eba99fe5
tests: add a few tests involving --collapse and rebase.singletransaction=1
Martin von Zweigbergk <martinvonz@google.com>
parents:
36815
diff
changeset
|
60 $ hg init collapse && cd collapse |
9ab7eba99fe5
tests: add a few tests involving --collapse and rebase.singletransaction=1
Martin von Zweigbergk <martinvonz@google.com>
parents:
36815
diff
changeset
|
61 $ hg debugdrawdag <<'EOF' |
9ab7eba99fe5
tests: add a few tests involving --collapse and rebase.singletransaction=1
Martin von Zweigbergk <martinvonz@google.com>
parents:
36815
diff
changeset
|
62 > Z |
9ab7eba99fe5
tests: add a few tests involving --collapse and rebase.singletransaction=1
Martin von Zweigbergk <martinvonz@google.com>
parents:
36815
diff
changeset
|
63 > | |
9ab7eba99fe5
tests: add a few tests involving --collapse and rebase.singletransaction=1
Martin von Zweigbergk <martinvonz@google.com>
parents:
36815
diff
changeset
|
64 > | D |
9ab7eba99fe5
tests: add a few tests involving --collapse and rebase.singletransaction=1
Martin von Zweigbergk <martinvonz@google.com>
parents:
36815
diff
changeset
|
65 > | | |
9ab7eba99fe5
tests: add a few tests involving --collapse and rebase.singletransaction=1
Martin von Zweigbergk <martinvonz@google.com>
parents:
36815
diff
changeset
|
66 > | C |
9ab7eba99fe5
tests: add a few tests involving --collapse and rebase.singletransaction=1
Martin von Zweigbergk <martinvonz@google.com>
parents:
36815
diff
changeset
|
67 > | | |
9ab7eba99fe5
tests: add a few tests involving --collapse and rebase.singletransaction=1
Martin von Zweigbergk <martinvonz@google.com>
parents:
36815
diff
changeset
|
68 > Y B |
9ab7eba99fe5
tests: add a few tests involving --collapse and rebase.singletransaction=1
Martin von Zweigbergk <martinvonz@google.com>
parents:
36815
diff
changeset
|
69 > |/ |
9ab7eba99fe5
tests: add a few tests involving --collapse and rebase.singletransaction=1
Martin von Zweigbergk <martinvonz@google.com>
parents:
36815
diff
changeset
|
70 > A |
9ab7eba99fe5
tests: add a few tests involving --collapse and rebase.singletransaction=1
Martin von Zweigbergk <martinvonz@google.com>
parents:
36815
diff
changeset
|
71 > EOF |
9ab7eba99fe5
tests: add a few tests involving --collapse and rebase.singletransaction=1
Martin von Zweigbergk <martinvonz@google.com>
parents:
36815
diff
changeset
|
72 - We should only see two status stored messages. One from the start, one from |
36927
17a744c5e270
rebase: also include commit of collapsed commits in single transaction
Martin von Zweigbergk <martinvonz@google.com>
parents:
36816
diff
changeset
|
73 - cmdutil.commitforceeditor() which forces tr.writepending() |
36816
9ab7eba99fe5
tests: add a few tests involving --collapse and rebase.singletransaction=1
Martin von Zweigbergk <martinvonz@google.com>
parents:
36815
diff
changeset
|
74 $ hg rebase --collapse --debug -b D -d Z | grep 'status stored' |
9ab7eba99fe5
tests: add a few tests involving --collapse and rebase.singletransaction=1
Martin von Zweigbergk <martinvonz@google.com>
parents:
36815
diff
changeset
|
75 rebase status stored |
9ab7eba99fe5
tests: add a few tests involving --collapse and rebase.singletransaction=1
Martin von Zweigbergk <martinvonz@google.com>
parents:
36815
diff
changeset
|
76 rebase status stored |
9ab7eba99fe5
tests: add a few tests involving --collapse and rebase.singletransaction=1
Martin von Zweigbergk <martinvonz@google.com>
parents:
36815
diff
changeset
|
77 $ hg tglog |
9ab7eba99fe5
tests: add a few tests involving --collapse and rebase.singletransaction=1
Martin von Zweigbergk <martinvonz@google.com>
parents:
36815
diff
changeset
|
78 o 3: Collapsed revision |
9ab7eba99fe5
tests: add a few tests involving --collapse and rebase.singletransaction=1
Martin von Zweigbergk <martinvonz@google.com>
parents:
36815
diff
changeset
|
79 | * B |
9ab7eba99fe5
tests: add a few tests involving --collapse and rebase.singletransaction=1
Martin von Zweigbergk <martinvonz@google.com>
parents:
36815
diff
changeset
|
80 | * C |
9ab7eba99fe5
tests: add a few tests involving --collapse and rebase.singletransaction=1
Martin von Zweigbergk <martinvonz@google.com>
parents:
36815
diff
changeset
|
81 | * D |
9ab7eba99fe5
tests: add a few tests involving --collapse and rebase.singletransaction=1
Martin von Zweigbergk <martinvonz@google.com>
parents:
36815
diff
changeset
|
82 o 2: Z |
9ab7eba99fe5
tests: add a few tests involving --collapse and rebase.singletransaction=1
Martin von Zweigbergk <martinvonz@google.com>
parents:
36815
diff
changeset
|
83 | |
9ab7eba99fe5
tests: add a few tests involving --collapse and rebase.singletransaction=1
Martin von Zweigbergk <martinvonz@google.com>
parents:
36815
diff
changeset
|
84 o 1: Y |
9ab7eba99fe5
tests: add a few tests involving --collapse and rebase.singletransaction=1
Martin von Zweigbergk <martinvonz@google.com>
parents:
36815
diff
changeset
|
85 | |
9ab7eba99fe5
tests: add a few tests involving --collapse and rebase.singletransaction=1
Martin von Zweigbergk <martinvonz@google.com>
parents:
36815
diff
changeset
|
86 o 0: A |
9ab7eba99fe5
tests: add a few tests involving --collapse and rebase.singletransaction=1
Martin von Zweigbergk <martinvonz@google.com>
parents:
36815
diff
changeset
|
87 |
9ab7eba99fe5
tests: add a few tests involving --collapse and rebase.singletransaction=1
Martin von Zweigbergk <martinvonz@google.com>
parents:
36815
diff
changeset
|
88 $ cd .. |
9ab7eba99fe5
tests: add a few tests involving --collapse and rebase.singletransaction=1
Martin von Zweigbergk <martinvonz@google.com>
parents:
36815
diff
changeset
|
89 |
9ab7eba99fe5
tests: add a few tests involving --collapse and rebase.singletransaction=1
Martin von Zweigbergk <martinvonz@google.com>
parents:
36815
diff
changeset
|
90 With --collapse, check that conflicts can be resolved and rebase can then be |
9ab7eba99fe5
tests: add a few tests involving --collapse and rebase.singletransaction=1
Martin von Zweigbergk <martinvonz@google.com>
parents:
36815
diff
changeset
|
91 continued |
9ab7eba99fe5
tests: add a few tests involving --collapse and rebase.singletransaction=1
Martin von Zweigbergk <martinvonz@google.com>
parents:
36815
diff
changeset
|
92 |
9ab7eba99fe5
tests: add a few tests involving --collapse and rebase.singletransaction=1
Martin von Zweigbergk <martinvonz@google.com>
parents:
36815
diff
changeset
|
93 $ hg init collapse-conflict && cd collapse-conflict |
9ab7eba99fe5
tests: add a few tests involving --collapse and rebase.singletransaction=1
Martin von Zweigbergk <martinvonz@google.com>
parents:
36815
diff
changeset
|
94 $ hg debugdrawdag <<'EOF' |
9ab7eba99fe5
tests: add a few tests involving --collapse and rebase.singletransaction=1
Martin von Zweigbergk <martinvonz@google.com>
parents:
36815
diff
changeset
|
95 > Z # Z/conflict=Z |
9ab7eba99fe5
tests: add a few tests involving --collapse and rebase.singletransaction=1
Martin von Zweigbergk <martinvonz@google.com>
parents:
36815
diff
changeset
|
96 > | |
9ab7eba99fe5
tests: add a few tests involving --collapse and rebase.singletransaction=1
Martin von Zweigbergk <martinvonz@google.com>
parents:
36815
diff
changeset
|
97 > | D |
9ab7eba99fe5
tests: add a few tests involving --collapse and rebase.singletransaction=1
Martin von Zweigbergk <martinvonz@google.com>
parents:
36815
diff
changeset
|
98 > | | |
9ab7eba99fe5
tests: add a few tests involving --collapse and rebase.singletransaction=1
Martin von Zweigbergk <martinvonz@google.com>
parents:
36815
diff
changeset
|
99 > | C # C/conflict=C |
9ab7eba99fe5
tests: add a few tests involving --collapse and rebase.singletransaction=1
Martin von Zweigbergk <martinvonz@google.com>
parents:
36815
diff
changeset
|
100 > | | |
9ab7eba99fe5
tests: add a few tests involving --collapse and rebase.singletransaction=1
Martin von Zweigbergk <martinvonz@google.com>
parents:
36815
diff
changeset
|
101 > Y B |
9ab7eba99fe5
tests: add a few tests involving --collapse and rebase.singletransaction=1
Martin von Zweigbergk <martinvonz@google.com>
parents:
36815
diff
changeset
|
102 > |/ |
9ab7eba99fe5
tests: add a few tests involving --collapse and rebase.singletransaction=1
Martin von Zweigbergk <martinvonz@google.com>
parents:
36815
diff
changeset
|
103 > A |
9ab7eba99fe5
tests: add a few tests involving --collapse and rebase.singletransaction=1
Martin von Zweigbergk <martinvonz@google.com>
parents:
36815
diff
changeset
|
104 > EOF |
9ab7eba99fe5
tests: add a few tests involving --collapse and rebase.singletransaction=1
Martin von Zweigbergk <martinvonz@google.com>
parents:
36815
diff
changeset
|
105 $ hg rebase --collapse -b D -d Z |
45771
f90a5c211251
rebase: change and standarize template for rebase's one-line summary
Martin von Zweigbergk <martinvonz@google.com>
parents:
45150
diff
changeset
|
106 rebasing 1:112478962961 B "B" |
f90a5c211251
rebase: change and standarize template for rebase's one-line summary
Martin von Zweigbergk <martinvonz@google.com>
parents:
45150
diff
changeset
|
107 rebasing 3:c26739dbe603 C "C" |
36816
9ab7eba99fe5
tests: add a few tests involving --collapse and rebase.singletransaction=1
Martin von Zweigbergk <martinvonz@google.com>
parents:
36815
diff
changeset
|
108 merging conflict |
9ab7eba99fe5
tests: add a few tests involving --collapse and rebase.singletransaction=1
Martin von Zweigbergk <martinvonz@google.com>
parents:
36815
diff
changeset
|
109 warning: conflicts while merging conflict! (edit, then use 'hg resolve --mark') |
45150
dc5e5577af39
error: unify the error message formats for 'rebase' and 'unshelve'
Daniel Ploch <dploch@google.com>
parents:
44347
diff
changeset
|
110 unresolved conflicts (see 'hg resolve', then 'hg rebase --continue') |
45826
21733e8c924f
errors: add config that lets user get more detailed exit codes
Martin von Zweigbergk <martinvonz@google.com>
parents:
45771
diff
changeset
|
111 [240] |
36816
9ab7eba99fe5
tests: add a few tests involving --collapse and rebase.singletransaction=1
Martin von Zweigbergk <martinvonz@google.com>
parents:
36815
diff
changeset
|
112 $ hg tglog |
9ab7eba99fe5
tests: add a few tests involving --collapse and rebase.singletransaction=1
Martin von Zweigbergk <martinvonz@google.com>
parents:
36815
diff
changeset
|
113 o 5: D |
9ab7eba99fe5
tests: add a few tests involving --collapse and rebase.singletransaction=1
Martin von Zweigbergk <martinvonz@google.com>
parents:
36815
diff
changeset
|
114 | |
9ab7eba99fe5
tests: add a few tests involving --collapse and rebase.singletransaction=1
Martin von Zweigbergk <martinvonz@google.com>
parents:
36815
diff
changeset
|
115 | @ 4: Z |
9ab7eba99fe5
tests: add a few tests involving --collapse and rebase.singletransaction=1
Martin von Zweigbergk <martinvonz@google.com>
parents:
36815
diff
changeset
|
116 | | |
44347
9c9cfecd4600
rebase: don't use rebased node as dirstate p2 (BC)
Martin von Zweigbergk <martinvonz@google.com>
parents:
42613
diff
changeset
|
117 % | 3: C |
36816
9ab7eba99fe5
tests: add a few tests involving --collapse and rebase.singletransaction=1
Martin von Zweigbergk <martinvonz@google.com>
parents:
36815
diff
changeset
|
118 | | |
9ab7eba99fe5
tests: add a few tests involving --collapse and rebase.singletransaction=1
Martin von Zweigbergk <martinvonz@google.com>
parents:
36815
diff
changeset
|
119 | o 2: Y |
9ab7eba99fe5
tests: add a few tests involving --collapse and rebase.singletransaction=1
Martin von Zweigbergk <martinvonz@google.com>
parents:
36815
diff
changeset
|
120 | | |
9ab7eba99fe5
tests: add a few tests involving --collapse and rebase.singletransaction=1
Martin von Zweigbergk <martinvonz@google.com>
parents:
36815
diff
changeset
|
121 o | 1: B |
9ab7eba99fe5
tests: add a few tests involving --collapse and rebase.singletransaction=1
Martin von Zweigbergk <martinvonz@google.com>
parents:
36815
diff
changeset
|
122 |/ |
9ab7eba99fe5
tests: add a few tests involving --collapse and rebase.singletransaction=1
Martin von Zweigbergk <martinvonz@google.com>
parents:
36815
diff
changeset
|
123 o 0: A |
9ab7eba99fe5
tests: add a few tests involving --collapse and rebase.singletransaction=1
Martin von Zweigbergk <martinvonz@google.com>
parents:
36815
diff
changeset
|
124 |
9ab7eba99fe5
tests: add a few tests involving --collapse and rebase.singletransaction=1
Martin von Zweigbergk <martinvonz@google.com>
parents:
36815
diff
changeset
|
125 $ hg st |
9ab7eba99fe5
tests: add a few tests involving --collapse and rebase.singletransaction=1
Martin von Zweigbergk <martinvonz@google.com>
parents:
36815
diff
changeset
|
126 M conflict |
9ab7eba99fe5
tests: add a few tests involving --collapse and rebase.singletransaction=1
Martin von Zweigbergk <martinvonz@google.com>
parents:
36815
diff
changeset
|
127 A B |
44347
9c9cfecd4600
rebase: don't use rebased node as dirstate p2 (BC)
Martin von Zweigbergk <martinvonz@google.com>
parents:
42613
diff
changeset
|
128 A C |
36816
9ab7eba99fe5
tests: add a few tests involving --collapse and rebase.singletransaction=1
Martin von Zweigbergk <martinvonz@google.com>
parents:
36815
diff
changeset
|
129 ? conflict.orig |
9ab7eba99fe5
tests: add a few tests involving --collapse and rebase.singletransaction=1
Martin von Zweigbergk <martinvonz@google.com>
parents:
36815
diff
changeset
|
130 $ echo resolved > conflict |
9ab7eba99fe5
tests: add a few tests involving --collapse and rebase.singletransaction=1
Martin von Zweigbergk <martinvonz@google.com>
parents:
36815
diff
changeset
|
131 $ hg resolve -m |
9ab7eba99fe5
tests: add a few tests involving --collapse and rebase.singletransaction=1
Martin von Zweigbergk <martinvonz@google.com>
parents:
36815
diff
changeset
|
132 (no more unresolved files) |
9ab7eba99fe5
tests: add a few tests involving --collapse and rebase.singletransaction=1
Martin von Zweigbergk <martinvonz@google.com>
parents:
36815
diff
changeset
|
133 continue: hg rebase --continue |
42613
35ebdbb38efb
continue: added support for rebase
Taapas Agrawal <taapas2897@gmail.com>
parents:
36927
diff
changeset
|
134 $ hg continue |
45771
f90a5c211251
rebase: change and standarize template for rebase's one-line summary
Martin von Zweigbergk <martinvonz@google.com>
parents:
45150
diff
changeset
|
135 already rebased 1:112478962961 B "B" as 79bc8f4973ce |
f90a5c211251
rebase: change and standarize template for rebase's one-line summary
Martin von Zweigbergk <martinvonz@google.com>
parents:
45150
diff
changeset
|
136 rebasing 3:c26739dbe603 C "C" |
f90a5c211251
rebase: change and standarize template for rebase's one-line summary
Martin von Zweigbergk <martinvonz@google.com>
parents:
45150
diff
changeset
|
137 rebasing 5:d24bb333861c D tip "D" |
36816
9ab7eba99fe5
tests: add a few tests involving --collapse and rebase.singletransaction=1
Martin von Zweigbergk <martinvonz@google.com>
parents:
36815
diff
changeset
|
138 saved backup bundle to $TESTTMP/collapse-conflict/.hg/strip-backup/112478962961-b5b34645-rebase.hg |
9ab7eba99fe5
tests: add a few tests involving --collapse and rebase.singletransaction=1
Martin von Zweigbergk <martinvonz@google.com>
parents:
36815
diff
changeset
|
139 $ hg tglog |
9ab7eba99fe5
tests: add a few tests involving --collapse and rebase.singletransaction=1
Martin von Zweigbergk <martinvonz@google.com>
parents:
36815
diff
changeset
|
140 o 3: Collapsed revision |
9ab7eba99fe5
tests: add a few tests involving --collapse and rebase.singletransaction=1
Martin von Zweigbergk <martinvonz@google.com>
parents:
36815
diff
changeset
|
141 | * B |
9ab7eba99fe5
tests: add a few tests involving --collapse and rebase.singletransaction=1
Martin von Zweigbergk <martinvonz@google.com>
parents:
36815
diff
changeset
|
142 | * C |
9ab7eba99fe5
tests: add a few tests involving --collapse and rebase.singletransaction=1
Martin von Zweigbergk <martinvonz@google.com>
parents:
36815
diff
changeset
|
143 | * D |
9ab7eba99fe5
tests: add a few tests involving --collapse and rebase.singletransaction=1
Martin von Zweigbergk <martinvonz@google.com>
parents:
36815
diff
changeset
|
144 o 2: Z |
9ab7eba99fe5
tests: add a few tests involving --collapse and rebase.singletransaction=1
Martin von Zweigbergk <martinvonz@google.com>
parents:
36815
diff
changeset
|
145 | |
9ab7eba99fe5
tests: add a few tests involving --collapse and rebase.singletransaction=1
Martin von Zweigbergk <martinvonz@google.com>
parents:
36815
diff
changeset
|
146 o 1: Y |
9ab7eba99fe5
tests: add a few tests involving --collapse and rebase.singletransaction=1
Martin von Zweigbergk <martinvonz@google.com>
parents:
36815
diff
changeset
|
147 | |
9ab7eba99fe5
tests: add a few tests involving --collapse and rebase.singletransaction=1
Martin von Zweigbergk <martinvonz@google.com>
parents:
36815
diff
changeset
|
148 o 0: A |
9ab7eba99fe5
tests: add a few tests involving --collapse and rebase.singletransaction=1
Martin von Zweigbergk <martinvonz@google.com>
parents:
36815
diff
changeset
|
149 |
9ab7eba99fe5
tests: add a few tests involving --collapse and rebase.singletransaction=1
Martin von Zweigbergk <martinvonz@google.com>
parents:
36815
diff
changeset
|
150 $ cd .. |
9ab7eba99fe5
tests: add a few tests involving --collapse and rebase.singletransaction=1
Martin von Zweigbergk <martinvonz@google.com>
parents:
36815
diff
changeset
|
151 |
9ab7eba99fe5
tests: add a few tests involving --collapse and rebase.singletransaction=1
Martin von Zweigbergk <martinvonz@google.com>
parents:
36815
diff
changeset
|
152 With --collapse, check that the commit message editing can be canceled and |
9ab7eba99fe5
tests: add a few tests involving --collapse and rebase.singletransaction=1
Martin von Zweigbergk <martinvonz@google.com>
parents:
36815
diff
changeset
|
153 rebase can then be continued |
9ab7eba99fe5
tests: add a few tests involving --collapse and rebase.singletransaction=1
Martin von Zweigbergk <martinvonz@google.com>
parents:
36815
diff
changeset
|
154 |
9ab7eba99fe5
tests: add a few tests involving --collapse and rebase.singletransaction=1
Martin von Zweigbergk <martinvonz@google.com>
parents:
36815
diff
changeset
|
155 $ hg init collapse-cancel-editor && cd collapse-cancel-editor |
9ab7eba99fe5
tests: add a few tests involving --collapse and rebase.singletransaction=1
Martin von Zweigbergk <martinvonz@google.com>
parents:
36815
diff
changeset
|
156 $ hg debugdrawdag <<'EOF' |
9ab7eba99fe5
tests: add a few tests involving --collapse and rebase.singletransaction=1
Martin von Zweigbergk <martinvonz@google.com>
parents:
36815
diff
changeset
|
157 > Z |
9ab7eba99fe5
tests: add a few tests involving --collapse and rebase.singletransaction=1
Martin von Zweigbergk <martinvonz@google.com>
parents:
36815
diff
changeset
|
158 > | |
9ab7eba99fe5
tests: add a few tests involving --collapse and rebase.singletransaction=1
Martin von Zweigbergk <martinvonz@google.com>
parents:
36815
diff
changeset
|
159 > | D |
9ab7eba99fe5
tests: add a few tests involving --collapse and rebase.singletransaction=1
Martin von Zweigbergk <martinvonz@google.com>
parents:
36815
diff
changeset
|
160 > | | |
9ab7eba99fe5
tests: add a few tests involving --collapse and rebase.singletransaction=1
Martin von Zweigbergk <martinvonz@google.com>
parents:
36815
diff
changeset
|
161 > | C |
9ab7eba99fe5
tests: add a few tests involving --collapse and rebase.singletransaction=1
Martin von Zweigbergk <martinvonz@google.com>
parents:
36815
diff
changeset
|
162 > | | |
9ab7eba99fe5
tests: add a few tests involving --collapse and rebase.singletransaction=1
Martin von Zweigbergk <martinvonz@google.com>
parents:
36815
diff
changeset
|
163 > Y B |
9ab7eba99fe5
tests: add a few tests involving --collapse and rebase.singletransaction=1
Martin von Zweigbergk <martinvonz@google.com>
parents:
36815
diff
changeset
|
164 > |/ |
9ab7eba99fe5
tests: add a few tests involving --collapse and rebase.singletransaction=1
Martin von Zweigbergk <martinvonz@google.com>
parents:
36815
diff
changeset
|
165 > A |
9ab7eba99fe5
tests: add a few tests involving --collapse and rebase.singletransaction=1
Martin von Zweigbergk <martinvonz@google.com>
parents:
36815
diff
changeset
|
166 > EOF |
9ab7eba99fe5
tests: add a few tests involving --collapse and rebase.singletransaction=1
Martin von Zweigbergk <martinvonz@google.com>
parents:
36815
diff
changeset
|
167 $ HGEDITOR=false hg --config ui.interactive=1 rebase --collapse -b D -d Z |
45771
f90a5c211251
rebase: change and standarize template for rebase's one-line summary
Martin von Zweigbergk <martinvonz@google.com>
parents:
45150
diff
changeset
|
168 rebasing 1:112478962961 B "B" |
f90a5c211251
rebase: change and standarize template for rebase's one-line summary
Martin von Zweigbergk <martinvonz@google.com>
parents:
45150
diff
changeset
|
169 rebasing 3:26805aba1e60 C "C" |
f90a5c211251
rebase: change and standarize template for rebase's one-line summary
Martin von Zweigbergk <martinvonz@google.com>
parents:
45150
diff
changeset
|
170 rebasing 5:f585351a92f8 D tip "D" |
36927
17a744c5e270
rebase: also include commit of collapsed commits in single transaction
Martin von Zweigbergk <martinvonz@google.com>
parents:
36816
diff
changeset
|
171 transaction abort! |
17a744c5e270
rebase: also include commit of collapsed commits in single transaction
Martin von Zweigbergk <martinvonz@google.com>
parents:
36816
diff
changeset
|
172 rollback completed |
36816
9ab7eba99fe5
tests: add a few tests involving --collapse and rebase.singletransaction=1
Martin von Zweigbergk <martinvonz@google.com>
parents:
36815
diff
changeset
|
173 abort: edit failed: false exited with status 1 |
45877
ac362d5a7893
errors: introduce CanceledError and use it in a few places
Martin von Zweigbergk <martinvonz@google.com>
parents:
45826
diff
changeset
|
174 [250] |
36816
9ab7eba99fe5
tests: add a few tests involving --collapse and rebase.singletransaction=1
Martin von Zweigbergk <martinvonz@google.com>
parents:
36815
diff
changeset
|
175 $ hg tglog |
9ab7eba99fe5
tests: add a few tests involving --collapse and rebase.singletransaction=1
Martin von Zweigbergk <martinvonz@google.com>
parents:
36815
diff
changeset
|
176 o 5: D |
9ab7eba99fe5
tests: add a few tests involving --collapse and rebase.singletransaction=1
Martin von Zweigbergk <martinvonz@google.com>
parents:
36815
diff
changeset
|
177 | |
36927
17a744c5e270
rebase: also include commit of collapsed commits in single transaction
Martin von Zweigbergk <martinvonz@google.com>
parents:
36816
diff
changeset
|
178 | o 4: Z |
36816
9ab7eba99fe5
tests: add a few tests involving --collapse and rebase.singletransaction=1
Martin von Zweigbergk <martinvonz@google.com>
parents:
36815
diff
changeset
|
179 | | |
9ab7eba99fe5
tests: add a few tests involving --collapse and rebase.singletransaction=1
Martin von Zweigbergk <martinvonz@google.com>
parents:
36815
diff
changeset
|
180 o | 3: C |
9ab7eba99fe5
tests: add a few tests involving --collapse and rebase.singletransaction=1
Martin von Zweigbergk <martinvonz@google.com>
parents:
36815
diff
changeset
|
181 | | |
9ab7eba99fe5
tests: add a few tests involving --collapse and rebase.singletransaction=1
Martin von Zweigbergk <martinvonz@google.com>
parents:
36815
diff
changeset
|
182 | o 2: Y |
9ab7eba99fe5
tests: add a few tests involving --collapse and rebase.singletransaction=1
Martin von Zweigbergk <martinvonz@google.com>
parents:
36815
diff
changeset
|
183 | | |
9ab7eba99fe5
tests: add a few tests involving --collapse and rebase.singletransaction=1
Martin von Zweigbergk <martinvonz@google.com>
parents:
36815
diff
changeset
|
184 o | 1: B |
9ab7eba99fe5
tests: add a few tests involving --collapse and rebase.singletransaction=1
Martin von Zweigbergk <martinvonz@google.com>
parents:
36815
diff
changeset
|
185 |/ |
9ab7eba99fe5
tests: add a few tests involving --collapse and rebase.singletransaction=1
Martin von Zweigbergk <martinvonz@google.com>
parents:
36815
diff
changeset
|
186 o 0: A |
9ab7eba99fe5
tests: add a few tests involving --collapse and rebase.singletransaction=1
Martin von Zweigbergk <martinvonz@google.com>
parents:
36815
diff
changeset
|
187 |
42613
35ebdbb38efb
continue: added support for rebase
Taapas Agrawal <taapas2897@gmail.com>
parents:
36927
diff
changeset
|
188 $ hg continue |
45771
f90a5c211251
rebase: change and standarize template for rebase's one-line summary
Martin von Zweigbergk <martinvonz@google.com>
parents:
45150
diff
changeset
|
189 rebasing 1:112478962961 B "B" |
f90a5c211251
rebase: change and standarize template for rebase's one-line summary
Martin von Zweigbergk <martinvonz@google.com>
parents:
45150
diff
changeset
|
190 rebasing 3:26805aba1e60 C "C" |
f90a5c211251
rebase: change and standarize template for rebase's one-line summary
Martin von Zweigbergk <martinvonz@google.com>
parents:
45150
diff
changeset
|
191 rebasing 5:f585351a92f8 D tip "D" |
36816
9ab7eba99fe5
tests: add a few tests involving --collapse and rebase.singletransaction=1
Martin von Zweigbergk <martinvonz@google.com>
parents:
36815
diff
changeset
|
192 saved backup bundle to $TESTTMP/collapse-cancel-editor/.hg/strip-backup/112478962961-cb2a9b47-rebase.hg |
9ab7eba99fe5
tests: add a few tests involving --collapse and rebase.singletransaction=1
Martin von Zweigbergk <martinvonz@google.com>
parents:
36815
diff
changeset
|
193 $ hg tglog |
9ab7eba99fe5
tests: add a few tests involving --collapse and rebase.singletransaction=1
Martin von Zweigbergk <martinvonz@google.com>
parents:
36815
diff
changeset
|
194 o 3: Collapsed revision |
9ab7eba99fe5
tests: add a few tests involving --collapse and rebase.singletransaction=1
Martin von Zweigbergk <martinvonz@google.com>
parents:
36815
diff
changeset
|
195 | * B |
9ab7eba99fe5
tests: add a few tests involving --collapse and rebase.singletransaction=1
Martin von Zweigbergk <martinvonz@google.com>
parents:
36815
diff
changeset
|
196 | * C |
9ab7eba99fe5
tests: add a few tests involving --collapse and rebase.singletransaction=1
Martin von Zweigbergk <martinvonz@google.com>
parents:
36815
diff
changeset
|
197 | * D |
9ab7eba99fe5
tests: add a few tests involving --collapse and rebase.singletransaction=1
Martin von Zweigbergk <martinvonz@google.com>
parents:
36815
diff
changeset
|
198 o 2: Z |
9ab7eba99fe5
tests: add a few tests involving --collapse and rebase.singletransaction=1
Martin von Zweigbergk <martinvonz@google.com>
parents:
36815
diff
changeset
|
199 | |
9ab7eba99fe5
tests: add a few tests involving --collapse and rebase.singletransaction=1
Martin von Zweigbergk <martinvonz@google.com>
parents:
36815
diff
changeset
|
200 o 1: Y |
9ab7eba99fe5
tests: add a few tests involving --collapse and rebase.singletransaction=1
Martin von Zweigbergk <martinvonz@google.com>
parents:
36815
diff
changeset
|
201 | |
9ab7eba99fe5
tests: add a few tests involving --collapse and rebase.singletransaction=1
Martin von Zweigbergk <martinvonz@google.com>
parents:
36815
diff
changeset
|
202 o 0: A |
9ab7eba99fe5
tests: add a few tests involving --collapse and rebase.singletransaction=1
Martin von Zweigbergk <martinvonz@google.com>
parents:
36815
diff
changeset
|
203 |
9ab7eba99fe5
tests: add a few tests involving --collapse and rebase.singletransaction=1
Martin von Zweigbergk <martinvonz@google.com>
parents:
36815
diff
changeset
|
204 $ cd .. |