sapling/eden/scm/tests/test-rebase-copy-relations.t
Jun Wu 868c2b0108 mutationstore: copy entries automatically on flush
Summary:
Similar to D7121487 (af8ecd5f80) but works for mutation store. This makes sure at the Rust
layer, mutation entries won't get lost after rebasing or metaeditting a set of
commits where a subset of the commits being edited has mutation relations.

Unlike the Python layer, the Rust layer works for mutation chains. Therefore
some of the tests changes.

Reviewed By: markbt

Differential Revision: D22174991

fbshipit-source-id: d62f7c1071fc71f939ec8771ac5968b992aa253c
2020-07-02 13:22:34 -07:00

60 lines
1.1 KiB
Perl

#chg-compatible
$ enable rebase
$ setconfig experimental.evolution.allowdivergence=1
$ newrepo repo
$ drawdag <<'EOS'
> D # D is orphaned.
> |
> C2 C C1 # amend: C -> C1 -> C2
> \|/
> B Z
> |/
> A
> EOS
$ cp -R ../repo ../repob
C -> C2 relation is copied with singletransaction.
$ hg rebase -s $B -d $Z --config rebase.singletransaction=true
rebasing 112478962961 "B"
rebasing 26805aba1e60 "C"
rebasing f585351a92f8 "D"
rebasing 039c3379aaa9 "C2"
$ hg log -G -T '{node|short} {desc}'
o b97425e89b0c C2
|
| o f7f4f5b9173a D
| |
| x e709467ba6ed C
|/
o d74d19e598c8 B
|
o 262e37e34f63 Z
|
o 426bada5c675 A
FIXME: This does not quite work yet without singletransaction.
$ cd $TESTTMP/repob
$ hg rebase -s $B -d $Z --config rebase.singletransaction=false
rebasing 112478962961 "B"
rebasing 26805aba1e60 "C"
rebasing f585351a92f8 "D"
rebasing 039c3379aaa9 "C2"
$ hg log -G -T '{node|short} {desc}'
o b97425e89b0c C2
|
| o f7f4f5b9173a D
| |
| o e709467ba6ed C
|/
o d74d19e598c8 B
|
o 262e37e34f63 Z
|
o 426bada5c675 A