2019-12-10 02:24:31 +03:00
|
|
|
#chg-compatible
|
|
|
|
|
2020-01-20 13:42:49 +03:00
|
|
|
$ configure mutation-norecord
|
|
|
|
$ enable amend rebase
|
2018-08-15 09:13:19 +03:00
|
|
|
$ setconfig rebase.experimental.inmemory=True
|
|
|
|
$ setconfig rebase.singletransaction=True
|
|
|
|
$ setconfig amend.autorestack=no-conflict
|
|
|
|
$ mkcommit() {
|
|
|
|
> echo "$1" > "$1"
|
|
|
|
> hg add "$1"
|
|
|
|
> hg ci -m "add $1"
|
|
|
|
> }
|
|
|
|
|
|
|
|
Test invalid value for amend.autorestack
|
|
|
|
$ newrepo
|
|
|
|
$ hg debugdrawdag<<'EOS'
|
|
|
|
> D
|
|
|
|
> |
|
|
|
|
> C C_old
|
|
|
|
> | | # amend: B_old -> B
|
|
|
|
> B B_old # amend: C_old -> C
|
|
|
|
> | /
|
|
|
|
> |/
|
|
|
|
> A
|
|
|
|
> EOS
|
|
|
|
$ hg update -qC B
|
|
|
|
$ echo "new content" > B
|
|
|
|
$ showgraph
|
2020-10-09 06:30:01 +03:00
|
|
|
o 3c36beb5705f D
|
2020-10-20 03:05:23 +03:00
|
|
|
│
|
|
|
|
│ o 26805aba1e60 C
|
|
|
|
│ │
|
|
|
|
x │ 07863d11c289 C_old
|
|
|
|
│ │
|
|
|
|
│ @ 112478962961 B
|
|
|
|
│ │
|
|
|
|
x │ 3326d5194fc9 B_old
|
|
|
|
├─╯
|
2020-10-09 06:30:01 +03:00
|
|
|
o 426bada5c675 A
|
2018-08-15 09:13:19 +03:00
|
|
|
$ hg amend -m "B'"
|
|
|
|
restacking children automatically (unless they conflict)
|
2019-10-16 02:28:01 +03:00
|
|
|
rebasing 26805aba1e60 "C" (C)
|
2018-08-15 09:13:19 +03:00
|
|
|
$ showgraph
|
2020-10-09 06:30:01 +03:00
|
|
|
o 5676eb48a524 C
|
2020-10-20 03:05:23 +03:00
|
|
|
│
|
2020-10-09 06:30:01 +03:00
|
|
|
@ 180681c3ccd0 B'
|
2020-10-20 03:05:23 +03:00
|
|
|
│
|
|
|
|
│ o 3c36beb5705f D
|
|
|
|
│ │
|
|
|
|
│ x 07863d11c289 C_old
|
|
|
|
│ │
|
|
|
|
│ x 3326d5194fc9 B_old
|
|
|
|
├─╯
|
2020-10-09 06:30:01 +03:00
|
|
|
o 426bada5c675 A
|
2018-08-15 09:13:19 +03:00
|
|
|
$ hg rebase --restack
|
2019-10-16 02:28:01 +03:00
|
|
|
rebasing 3c36beb5705f "D" (D)
|
2018-08-15 09:13:19 +03:00
|
|
|
$ showgraph
|
2020-10-09 06:30:01 +03:00
|
|
|
o d1e904d06977 D
|
2020-10-20 03:05:23 +03:00
|
|
|
│
|
2020-10-09 06:30:01 +03:00
|
|
|
o 5676eb48a524 C
|
2020-10-20 03:05:23 +03:00
|
|
|
│
|
2020-10-09 06:30:01 +03:00
|
|
|
@ 180681c3ccd0 B'
|
2020-10-20 03:05:23 +03:00
|
|
|
│
|
2020-10-09 06:30:01 +03:00
|
|
|
o 426bada5c675 A
|