author | Anton Shestakov <av6@dwimlabs.net> |
Thu, 30 May 2019 16:42:38 +0800 | |
changeset 42397 | 7752cd3a2f83 |
parent 36927 | 17a744c5e270 |
child 42613 | 35ebdbb38efb |
permissions | -rw-r--r-- |
36815
f4e9e89330d4
tests: simplify test-rebase-transaction.t
Martin von Zweigbergk <martinvonz@google.com>
parents:
34504
diff
changeset
|
1 |
Rebasing using a single transaction |
f4e9e89330d4
tests: simplify test-rebase-transaction.t
Martin von Zweigbergk <martinvonz@google.com>
parents:
34504
diff
changeset
|
2 |
|
30580
51e7c83e05ee
rebase: calculate ancestors for --base separately (issue5420)
Jun Wu <quark@fb.com>
parents:
diff
changeset
|
3 |
$ cat >> $HGRCPATH <<EOF |
51e7c83e05ee
rebase: calculate ancestors for --base separately (issue5420)
Jun Wu <quark@fb.com>
parents:
diff
changeset
|
4 |
> [extensions] |
51e7c83e05ee
rebase: calculate ancestors for --base separately (issue5420)
Jun Wu <quark@fb.com>
parents:
diff
changeset
|
5 |
> rebase= |
51e7c83e05ee
rebase: calculate ancestors for --base separately (issue5420)
Jun Wu <quark@fb.com>
parents:
diff
changeset
|
6 |
> drawdag=$TESTDIR/drawdag.py |
51e7c83e05ee
rebase: calculate ancestors for --base separately (issue5420)
Jun Wu <quark@fb.com>
parents:
diff
changeset
|
7 |
> |
36815
f4e9e89330d4
tests: simplify test-rebase-transaction.t
Martin von Zweigbergk <martinvonz@google.com>
parents:
34504
diff
changeset
|
8 |
> [rebase] |
f4e9e89330d4
tests: simplify test-rebase-transaction.t
Martin von Zweigbergk <martinvonz@google.com>
parents:
34504
diff
changeset
|
9 |
> singletransaction=True |
f4e9e89330d4
tests: simplify test-rebase-transaction.t
Martin von Zweigbergk <martinvonz@google.com>
parents:
34504
diff
changeset
|
10 |
> |
30580
51e7c83e05ee
rebase: calculate ancestors for --base separately (issue5420)
Jun Wu <quark@fb.com>
parents:
diff
changeset
|
11 |
> [phases] |
51e7c83e05ee
rebase: calculate ancestors for --base separately (issue5420)
Jun Wu <quark@fb.com>
parents:
diff
changeset
|
12 |
> publish=False |
51e7c83e05ee
rebase: calculate ancestors for --base separately (issue5420)
Jun Wu <quark@fb.com>
parents:
diff
changeset
|
13 |
> |
51e7c83e05ee
rebase: calculate ancestors for --base separately (issue5420)
Jun Wu <quark@fb.com>
parents:
diff
changeset
|
14 |
> [alias] |
51e7c83e05ee
rebase: calculate ancestors for --base separately (issue5420)
Jun Wu <quark@fb.com>
parents:
diff
changeset
|
15 |
> tglog = log -G --template "{rev}: {desc}" |
51e7c83e05ee
rebase: calculate ancestors for --base separately (issue5420)
Jun Wu <quark@fb.com>
parents:
diff
changeset
|
16 |
> EOF |
51e7c83e05ee
rebase: calculate ancestors for --base separately (issue5420)
Jun Wu <quark@fb.com>
parents:
diff
changeset
|
17 |
|
36815
f4e9e89330d4
tests: simplify test-rebase-transaction.t
Martin von Zweigbergk <martinvonz@google.com>
parents:
34504
diff
changeset
|
18 |
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
|
19 |
|
36815
f4e9e89330d4
tests: simplify test-rebase-transaction.t
Martin von Zweigbergk <martinvonz@google.com>
parents:
34504
diff
changeset
|
20 |
$ 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
|
21 |
$ hg debugdrawdag <<'EOF' |
609606d21765
rebase: use one dirstateguard for when using rebase.singletransaction
Durham Goode <durham@fb.com>
parents:
33558
diff
changeset
|
22 |
> Z |
609606d21765
rebase: use one dirstateguard for when using rebase.singletransaction
Durham Goode <durham@fb.com>
parents:
33558
diff
changeset
|
23 |
> | |
609606d21765
rebase: use one dirstateguard for when using rebase.singletransaction
Durham Goode <durham@fb.com>
parents:
33558
diff
changeset
|
24 |
> | D |
609606d21765
rebase: use one dirstateguard for when using rebase.singletransaction
Durham Goode <durham@fb.com>
parents:
33558
diff
changeset
|
25 |
> | | |
609606d21765
rebase: use one dirstateguard for when using rebase.singletransaction
Durham Goode <durham@fb.com>
parents:
33558
diff
changeset
|
26 |
> | C |
609606d21765
rebase: use one dirstateguard for when using rebase.singletransaction
Durham Goode <durham@fb.com>
parents:
33558
diff
changeset
|
27 |
> | | |
609606d21765
rebase: use one dirstateguard for when using rebase.singletransaction
Durham Goode <durham@fb.com>
parents:
33558
diff
changeset
|
28 |
> Y B |
609606d21765
rebase: use one dirstateguard for when using rebase.singletransaction
Durham Goode <durham@fb.com>
parents:
33558
diff
changeset
|
29 |
> |/ |
609606d21765
rebase: use one dirstateguard for when using rebase.singletransaction
Durham Goode <durham@fb.com>
parents:
33558
diff
changeset
|
30 |
> A |
609606d21765
rebase: use one dirstateguard for when using rebase.singletransaction
Durham Goode <durham@fb.com>
parents:
33558
diff
changeset
|
31 |
> EOF |
36927
17a744c5e270
rebase: also include commit of collapsed commits in single transaction
Martin von Zweigbergk <martinvonz@google.com>
parents:
36816
diff
changeset
|
32 |
- 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
|
33 |
$ 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
|
34 |
rebase status stored |
609606d21765
rebase: use one dirstateguard for when using rebase.singletransaction
Durham Goode <durham@fb.com>
parents:
33558
diff
changeset
|
35 |
$ hg tglog |
609606d21765
rebase: use one dirstateguard for when using rebase.singletransaction
Durham Goode <durham@fb.com>
parents:
33558
diff
changeset
|
36 |
o 5: D |
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 |
o 4: C |
609606d21765
rebase: use one dirstateguard for when using rebase.singletransaction
Durham Goode <durham@fb.com>
parents:
33558
diff
changeset
|
39 |
| |
609606d21765
rebase: use one dirstateguard for when using rebase.singletransaction
Durham Goode <durham@fb.com>
parents:
33558
diff
changeset
|
40 |
o 3: B |
609606d21765
rebase: use one dirstateguard for when using rebase.singletransaction
Durham Goode <durham@fb.com>
parents:
33558
diff
changeset
|
41 |
| |
609606d21765
rebase: use one dirstateguard for when using rebase.singletransaction
Durham Goode <durham@fb.com>
parents:
33558
diff
changeset
|
42 |
o 2: Z |
609606d21765
rebase: use one dirstateguard for when using rebase.singletransaction
Durham Goode <durham@fb.com>
parents:
33558
diff
changeset
|
43 |
| |
609606d21765
rebase: use one dirstateguard for when using rebase.singletransaction
Durham Goode <durham@fb.com>
parents:
33558
diff
changeset
|
44 |
o 1: Y |
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 0: A |
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 |
$ cd .. |
36816
9ab7eba99fe5
tests: add a few tests involving --collapse and rebase.singletransaction=1
Martin von Zweigbergk <martinvonz@google.com>
parents:
36815
diff
changeset
|
49 |
|
9ab7eba99fe5
tests: add a few tests involving --collapse and rebase.singletransaction=1
Martin von Zweigbergk <martinvonz@google.com>
parents:
36815
diff
changeset
|
50 |
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
|
51 |
|
9ab7eba99fe5
tests: add a few tests involving --collapse and rebase.singletransaction=1
Martin von Zweigbergk <martinvonz@google.com>
parents:
36815
diff
changeset
|
52 |
$ 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
|
53 |
$ 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
|
54 |
> Z |
9ab7eba99fe5
tests: add a few tests involving --collapse and rebase.singletransaction=1
Martin von Zweigbergk <martinvonz@google.com>
parents:
36815
diff
changeset
|
55 |
> | |
9ab7eba99fe5
tests: add a few tests involving --collapse and rebase.singletransaction=1
Martin von Zweigbergk <martinvonz@google.com>
parents:
36815
diff
changeset
|
56 |
> | D |
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 |
> | C |
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 |
> Y B |
9ab7eba99fe5
tests: add a few tests involving --collapse and rebase.singletransaction=1
Martin von Zweigbergk <martinvonz@google.com>
parents:
36815
diff
changeset
|
61 |
> |/ |
9ab7eba99fe5
tests: add a few tests involving --collapse and rebase.singletransaction=1
Martin von Zweigbergk <martinvonz@google.com>
parents:
36815
diff
changeset
|
62 |
> A |
9ab7eba99fe5
tests: add a few tests involving --collapse and rebase.singletransaction=1
Martin von Zweigbergk <martinvonz@google.com>
parents:
36815
diff
changeset
|
63 |
> EOF |
9ab7eba99fe5
tests: add a few tests involving --collapse and rebase.singletransaction=1
Martin von Zweigbergk <martinvonz@google.com>
parents:
36815
diff
changeset
|
64 |
- 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
|
65 |
- 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
|
66 |
$ 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
|
67 |
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
|
68 |
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
|
69 |
$ hg tglog |
9ab7eba99fe5
tests: add a few tests involving --collapse and rebase.singletransaction=1
Martin von Zweigbergk <martinvonz@google.com>
parents:
36815
diff
changeset
|
70 |
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
|
71 |
| * B |
9ab7eba99fe5
tests: add a few tests involving --collapse and rebase.singletransaction=1
Martin von Zweigbergk <martinvonz@google.com>
parents:
36815
diff
changeset
|
72 |
| * C |
9ab7eba99fe5
tests: add a few tests involving --collapse and rebase.singletransaction=1
Martin von Zweigbergk <martinvonz@google.com>
parents:
36815
diff
changeset
|
73 |
| * D |
9ab7eba99fe5
tests: add a few tests involving --collapse and rebase.singletransaction=1
Martin von Zweigbergk <martinvonz@google.com>
parents:
36815
diff
changeset
|
74 |
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
|
75 |
| |
9ab7eba99fe5
tests: add a few tests involving --collapse and rebase.singletransaction=1
Martin von Zweigbergk <martinvonz@google.com>
parents:
36815
diff
changeset
|
76 |
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
|
77 |
| |
9ab7eba99fe5
tests: add a few tests involving --collapse and rebase.singletransaction=1
Martin von Zweigbergk <martinvonz@google.com>
parents:
36815
diff
changeset
|
78 |
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
|
79 |
|
9ab7eba99fe5
tests: add a few tests involving --collapse and rebase.singletransaction=1
Martin von Zweigbergk <martinvonz@google.com>
parents:
36815
diff
changeset
|
80 |
$ cd .. |
9ab7eba99fe5
tests: add a few tests involving --collapse and rebase.singletransaction=1
Martin von Zweigbergk <martinvonz@google.com>
parents:
36815
diff
changeset
|
81 |
|
9ab7eba99fe5
tests: add a few tests involving --collapse and rebase.singletransaction=1
Martin von Zweigbergk <martinvonz@google.com>
parents:
36815
diff
changeset
|
82 |
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
|
83 |
continued |
9ab7eba99fe5
tests: add a few tests involving --collapse and rebase.singletransaction=1
Martin von Zweigbergk <martinvonz@google.com>
parents:
36815
diff
changeset
|
84 |
|
9ab7eba99fe5
tests: add a few tests involving --collapse and rebase.singletransaction=1
Martin von Zweigbergk <martinvonz@google.com>
parents:
36815
diff
changeset
|
85 |
$ 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
|
86 |
$ 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
|
87 |
> 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
|
88 |
> | |
9ab7eba99fe5
tests: add a few tests involving --collapse and rebase.singletransaction=1
Martin von Zweigbergk <martinvonz@google.com>
parents:
36815
diff
changeset
|
89 |
> | D |
9ab7eba99fe5
tests: add a few tests involving --collapse and rebase.singletransaction=1
Martin von Zweigbergk <martinvonz@google.com>
parents:
36815
diff
changeset
|
90 |
> | | |
9ab7eba99fe5
tests: add a few tests involving --collapse and rebase.singletransaction=1
Martin von Zweigbergk <martinvonz@google.com>
parents:
36815
diff
changeset
|
91 |
> | 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
|
92 |
> | | |
9ab7eba99fe5
tests: add a few tests involving --collapse and rebase.singletransaction=1
Martin von Zweigbergk <martinvonz@google.com>
parents:
36815
diff
changeset
|
93 |
> Y B |
9ab7eba99fe5
tests: add a few tests involving --collapse and rebase.singletransaction=1
Martin von Zweigbergk <martinvonz@google.com>
parents:
36815
diff
changeset
|
94 |
> |/ |
9ab7eba99fe5
tests: add a few tests involving --collapse and rebase.singletransaction=1
Martin von Zweigbergk <martinvonz@google.com>
parents:
36815
diff
changeset
|
95 |
> A |
9ab7eba99fe5
tests: add a few tests involving --collapse and rebase.singletransaction=1
Martin von Zweigbergk <martinvonz@google.com>
parents:
36815
diff
changeset
|
96 |
> EOF |
9ab7eba99fe5
tests: add a few tests involving --collapse and rebase.singletransaction=1
Martin von Zweigbergk <martinvonz@google.com>
parents:
36815
diff
changeset
|
97 |
$ hg rebase --collapse -b D -d Z |
9ab7eba99fe5
tests: add a few tests involving --collapse and rebase.singletransaction=1
Martin von Zweigbergk <martinvonz@google.com>
parents:
36815
diff
changeset
|
98 |
rebasing 1:112478962961 "B" (B) |
9ab7eba99fe5
tests: add a few tests involving --collapse and rebase.singletransaction=1
Martin von Zweigbergk <martinvonz@google.com>
parents:
36815
diff
changeset
|
99 |
rebasing 3:c26739dbe603 "C" (C) |
9ab7eba99fe5
tests: add a few tests involving --collapse and rebase.singletransaction=1
Martin von Zweigbergk <martinvonz@google.com>
parents:
36815
diff
changeset
|
100 |
merging conflict |
9ab7eba99fe5
tests: add a few tests involving --collapse and rebase.singletransaction=1
Martin von Zweigbergk <martinvonz@google.com>
parents:
36815
diff
changeset
|
101 |
warning: conflicts while merging conflict! (edit, then use 'hg resolve --mark') |
9ab7eba99fe5
tests: add a few tests involving --collapse and rebase.singletransaction=1
Martin von Zweigbergk <martinvonz@google.com>
parents:
36815
diff
changeset
|
102 |
unresolved conflicts (see hg resolve, then hg rebase --continue) |
9ab7eba99fe5
tests: add a few tests involving --collapse and rebase.singletransaction=1
Martin von Zweigbergk <martinvonz@google.com>
parents:
36815
diff
changeset
|
103 |
[1] |
9ab7eba99fe5
tests: add a few tests involving --collapse and rebase.singletransaction=1
Martin von Zweigbergk <martinvonz@google.com>
parents:
36815
diff
changeset
|
104 |
$ hg tglog |
9ab7eba99fe5
tests: add a few tests involving --collapse and rebase.singletransaction=1
Martin von Zweigbergk <martinvonz@google.com>
parents:
36815
diff
changeset
|
105 |
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
|
106 |
| |
9ab7eba99fe5
tests: add a few tests involving --collapse and rebase.singletransaction=1
Martin von Zweigbergk <martinvonz@google.com>
parents:
36815
diff
changeset
|
107 |
| @ 4: Z |
9ab7eba99fe5
tests: add a few tests involving --collapse and rebase.singletransaction=1
Martin von Zweigbergk <martinvonz@google.com>
parents:
36815
diff
changeset
|
108 |
| | |
9ab7eba99fe5
tests: add a few tests involving --collapse and rebase.singletransaction=1
Martin von Zweigbergk <martinvonz@google.com>
parents:
36815
diff
changeset
|
109 |
@ | 3: C |
9ab7eba99fe5
tests: add a few tests involving --collapse and rebase.singletransaction=1
Martin von Zweigbergk <martinvonz@google.com>
parents:
36815
diff
changeset
|
110 |
| | |
9ab7eba99fe5
tests: add a few tests involving --collapse and rebase.singletransaction=1
Martin von Zweigbergk <martinvonz@google.com>
parents:
36815
diff
changeset
|
111 |
| 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
|
112 |
| | |
9ab7eba99fe5
tests: add a few tests involving --collapse and rebase.singletransaction=1
Martin von Zweigbergk <martinvonz@google.com>
parents:
36815
diff
changeset
|
113 |
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
|
114 |
|/ |
9ab7eba99fe5
tests: add a few tests involving --collapse and rebase.singletransaction=1
Martin von Zweigbergk <martinvonz@google.com>
parents:
36815
diff
changeset
|
115 |
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
|
116 |
|
9ab7eba99fe5
tests: add a few tests involving --collapse and rebase.singletransaction=1
Martin von Zweigbergk <martinvonz@google.com>
parents:
36815
diff
changeset
|
117 |
$ hg st |
9ab7eba99fe5
tests: add a few tests involving --collapse and rebase.singletransaction=1
Martin von Zweigbergk <martinvonz@google.com>
parents:
36815
diff
changeset
|
118 |
M C |
9ab7eba99fe5
tests: add a few tests involving --collapse and rebase.singletransaction=1
Martin von Zweigbergk <martinvonz@google.com>
parents:
36815
diff
changeset
|
119 |
M conflict |
9ab7eba99fe5
tests: add a few tests involving --collapse and rebase.singletransaction=1
Martin von Zweigbergk <martinvonz@google.com>
parents:
36815
diff
changeset
|
120 |
A B |
9ab7eba99fe5
tests: add a few tests involving --collapse and rebase.singletransaction=1
Martin von Zweigbergk <martinvonz@google.com>
parents:
36815
diff
changeset
|
121 |
? conflict.orig |
9ab7eba99fe5
tests: add a few tests involving --collapse and rebase.singletransaction=1
Martin von Zweigbergk <martinvonz@google.com>
parents:
36815
diff
changeset
|
122 |
$ 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
|
123 |
$ 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
|
124 |
(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
|
125 |
continue: hg rebase --continue |
9ab7eba99fe5
tests: add a few tests involving --collapse and rebase.singletransaction=1
Martin von Zweigbergk <martinvonz@google.com>
parents:
36815
diff
changeset
|
126 |
$ hg rebase --continue |
9ab7eba99fe5
tests: add a few tests involving --collapse and rebase.singletransaction=1
Martin von Zweigbergk <martinvonz@google.com>
parents:
36815
diff
changeset
|
127 |
already rebased 1:112478962961 "B" (B) as 79bc8f4973ce |
9ab7eba99fe5
tests: add a few tests involving --collapse and rebase.singletransaction=1
Martin von Zweigbergk <martinvonz@google.com>
parents:
36815
diff
changeset
|
128 |
rebasing 3:c26739dbe603 "C" (C) |
9ab7eba99fe5
tests: add a few tests involving --collapse and rebase.singletransaction=1
Martin von Zweigbergk <martinvonz@google.com>
parents:
36815
diff
changeset
|
129 |
rebasing 5:d24bb333861c "D" (D tip) |
9ab7eba99fe5
tests: add a few tests involving --collapse and rebase.singletransaction=1
Martin von Zweigbergk <martinvonz@google.com>
parents:
36815
diff
changeset
|
130 |
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
|
131 |
$ hg tglog |
9ab7eba99fe5
tests: add a few tests involving --collapse and rebase.singletransaction=1
Martin von Zweigbergk <martinvonz@google.com>
parents:
36815
diff
changeset
|
132 |
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
|
133 |
| * B |
9ab7eba99fe5
tests: add a few tests involving --collapse and rebase.singletransaction=1
Martin von Zweigbergk <martinvonz@google.com>
parents:
36815
diff
changeset
|
134 |
| * C |
9ab7eba99fe5
tests: add a few tests involving --collapse and rebase.singletransaction=1
Martin von Zweigbergk <martinvonz@google.com>
parents:
36815
diff
changeset
|
135 |
| * D |
9ab7eba99fe5
tests: add a few tests involving --collapse and rebase.singletransaction=1
Martin von Zweigbergk <martinvonz@google.com>
parents:
36815
diff
changeset
|
136 |
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
|
137 |
| |
9ab7eba99fe5
tests: add a few tests involving --collapse and rebase.singletransaction=1
Martin von Zweigbergk <martinvonz@google.com>
parents:
36815
diff
changeset
|
138 |
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
|
139 |
| |
9ab7eba99fe5
tests: add a few tests involving --collapse and rebase.singletransaction=1
Martin von Zweigbergk <martinvonz@google.com>
parents:
36815
diff
changeset
|
140 |
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
|
141 |
|
9ab7eba99fe5
tests: add a few tests involving --collapse and rebase.singletransaction=1
Martin von Zweigbergk <martinvonz@google.com>
parents:
36815
diff
changeset
|
142 |
$ cd .. |
9ab7eba99fe5
tests: add a few tests involving --collapse and rebase.singletransaction=1
Martin von Zweigbergk <martinvonz@google.com>
parents:
36815
diff
changeset
|
143 |
|
9ab7eba99fe5
tests: add a few tests involving --collapse and rebase.singletransaction=1
Martin von Zweigbergk <martinvonz@google.com>
parents:
36815
diff
changeset
|
144 |
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
|
145 |
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
|
146 |
|
9ab7eba99fe5
tests: add a few tests involving --collapse and rebase.singletransaction=1
Martin von Zweigbergk <martinvonz@google.com>
parents:
36815
diff
changeset
|
147 |
$ 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
|
148 |
$ 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
|
149 |
> Z |
9ab7eba99fe5
tests: add a few tests involving --collapse and rebase.singletransaction=1
Martin von Zweigbergk <martinvonz@google.com>
parents:
36815
diff
changeset
|
150 |
> | |
9ab7eba99fe5
tests: add a few tests involving --collapse and rebase.singletransaction=1
Martin von Zweigbergk <martinvonz@google.com>
parents:
36815
diff
changeset
|
151 |
> | D |
9ab7eba99fe5
tests: add a few tests involving --collapse and rebase.singletransaction=1
Martin von Zweigbergk <martinvonz@google.com>
parents:
36815
diff
changeset
|
152 |
> | | |
9ab7eba99fe5
tests: add a few tests involving --collapse and rebase.singletransaction=1
Martin von Zweigbergk <martinvonz@google.com>
parents:
36815
diff
changeset
|
153 |
> | C |
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 |
> Y B |
9ab7eba99fe5
tests: add a few tests involving --collapse and rebase.singletransaction=1
Martin von Zweigbergk <martinvonz@google.com>
parents:
36815
diff
changeset
|
156 |
> |/ |
9ab7eba99fe5
tests: add a few tests involving --collapse and rebase.singletransaction=1
Martin von Zweigbergk <martinvonz@google.com>
parents:
36815
diff
changeset
|
157 |
> A |
9ab7eba99fe5
tests: add a few tests involving --collapse and rebase.singletransaction=1
Martin von Zweigbergk <martinvonz@google.com>
parents:
36815
diff
changeset
|
158 |
> EOF |
9ab7eba99fe5
tests: add a few tests involving --collapse and rebase.singletransaction=1
Martin von Zweigbergk <martinvonz@google.com>
parents:
36815
diff
changeset
|
159 |
$ HGEDITOR=false hg --config ui.interactive=1 rebase --collapse -b D -d Z |
9ab7eba99fe5
tests: add a few tests involving --collapse and rebase.singletransaction=1
Martin von Zweigbergk <martinvonz@google.com>
parents:
36815
diff
changeset
|
160 |
rebasing 1:112478962961 "B" (B) |
9ab7eba99fe5
tests: add a few tests involving --collapse and rebase.singletransaction=1
Martin von Zweigbergk <martinvonz@google.com>
parents:
36815
diff
changeset
|
161 |
rebasing 3:26805aba1e60 "C" (C) |
9ab7eba99fe5
tests: add a few tests involving --collapse and rebase.singletransaction=1
Martin von Zweigbergk <martinvonz@google.com>
parents:
36815
diff
changeset
|
162 |
rebasing 5:f585351a92f8 "D" (D tip) |
36927
17a744c5e270
rebase: also include commit of collapsed commits in single transaction
Martin von Zweigbergk <martinvonz@google.com>
parents:
36816
diff
changeset
|
163 |
transaction abort! |
17a744c5e270
rebase: also include commit of collapsed commits in single transaction
Martin von Zweigbergk <martinvonz@google.com>
parents:
36816
diff
changeset
|
164 |
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
|
165 |
abort: edit failed: false exited with status 1 |
9ab7eba99fe5
tests: add a few tests involving --collapse and rebase.singletransaction=1
Martin von Zweigbergk <martinvonz@google.com>
parents:
36815
diff
changeset
|
166 |
[255] |
9ab7eba99fe5
tests: add a few tests involving --collapse and rebase.singletransaction=1
Martin von Zweigbergk <martinvonz@google.com>
parents:
36815
diff
changeset
|
167 |
$ hg tglog |
9ab7eba99fe5
tests: add a few tests involving --collapse and rebase.singletransaction=1
Martin von Zweigbergk <martinvonz@google.com>
parents:
36815
diff
changeset
|
168 |
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
|
169 |
| |
36927
17a744c5e270
rebase: also include commit of collapsed commits in single transaction
Martin von Zweigbergk <martinvonz@google.com>
parents:
36816
diff
changeset
|
170 |
| 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
|
171 |
| | |
9ab7eba99fe5
tests: add a few tests involving --collapse and rebase.singletransaction=1
Martin von Zweigbergk <martinvonz@google.com>
parents:
36815
diff
changeset
|
172 |
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
|
173 |
| | |
9ab7eba99fe5
tests: add a few tests involving --collapse and rebase.singletransaction=1
Martin von Zweigbergk <martinvonz@google.com>
parents:
36815
diff
changeset
|
174 |
| 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
|
175 |
| | |
9ab7eba99fe5
tests: add a few tests involving --collapse and rebase.singletransaction=1
Martin von Zweigbergk <martinvonz@google.com>
parents:
36815
diff
changeset
|
176 |
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
|
177 |
|/ |
9ab7eba99fe5
tests: add a few tests involving --collapse and rebase.singletransaction=1
Martin von Zweigbergk <martinvonz@google.com>
parents:
36815
diff
changeset
|
178 |
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
|
179 |
|
9ab7eba99fe5
tests: add a few tests involving --collapse and rebase.singletransaction=1
Martin von Zweigbergk <martinvonz@google.com>
parents:
36815
diff
changeset
|
180 |
$ hg rebase --continue |
36927
17a744c5e270
rebase: also include commit of collapsed commits in single transaction
Martin von Zweigbergk <martinvonz@google.com>
parents:
36816
diff
changeset
|
181 |
rebasing 1:112478962961 "B" (B) |
17a744c5e270
rebase: also include commit of collapsed commits in single transaction
Martin von Zweigbergk <martinvonz@google.com>
parents:
36816
diff
changeset
|
182 |
rebasing 3:26805aba1e60 "C" (C) |
17a744c5e270
rebase: also include commit of collapsed commits in single transaction
Martin von Zweigbergk <martinvonz@google.com>
parents:
36816
diff
changeset
|
183 |
rebasing 5:f585351a92f8 "D" (D tip) |
36816
9ab7eba99fe5
tests: add a few tests involving --collapse and rebase.singletransaction=1
Martin von Zweigbergk <martinvonz@google.com>
parents:
36815
diff
changeset
|
184 |
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
|
185 |
$ hg tglog |
9ab7eba99fe5
tests: add a few tests involving --collapse and rebase.singletransaction=1
Martin von Zweigbergk <martinvonz@google.com>
parents:
36815
diff
changeset
|
186 |
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
|
187 |
| * B |
9ab7eba99fe5
tests: add a few tests involving --collapse and rebase.singletransaction=1
Martin von Zweigbergk <martinvonz@google.com>
parents:
36815
diff
changeset
|
188 |
| * C |
9ab7eba99fe5
tests: add a few tests involving --collapse and rebase.singletransaction=1
Martin von Zweigbergk <martinvonz@google.com>
parents:
36815
diff
changeset
|
189 |
| * D |
9ab7eba99fe5
tests: add a few tests involving --collapse and rebase.singletransaction=1
Martin von Zweigbergk <martinvonz@google.com>
parents:
36815
diff
changeset
|
190 |
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
|
191 |
| |
9ab7eba99fe5
tests: add a few tests involving --collapse and rebase.singletransaction=1
Martin von Zweigbergk <martinvonz@google.com>
parents:
36815
diff
changeset
|
192 |
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
|
193 |
| |
9ab7eba99fe5
tests: add a few tests involving --collapse and rebase.singletransaction=1
Martin von Zweigbergk <martinvonz@google.com>
parents:
36815
diff
changeset
|
194 |
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
|
195 |
|
9ab7eba99fe5
tests: add a few tests involving --collapse and rebase.singletransaction=1
Martin von Zweigbergk <martinvonz@google.com>
parents:
36815
diff
changeset
|
196 |
$ cd .. |