sapling/eden/scm/tests/test-eager-pull.t
Jun Wu e396cab669 dag: include roots in pull data
Summary:
The roots data will be useful for the client to check if the pulled commits are
going to overlap with its existed DAG.

Reviewed By: andll

Differential Revision: D29363808

fbshipit-source-id: e09d924d65537f59fd4ea209b568265d07a80e46
2021-06-24 15:12:58 -07:00

75 lines
1.2 KiB
Raku

#chg-compatible
$ configure modern
$ setconfig paths.default=test:e1 ui.traceback=1
$ setconfig treemanifest.flatcompat=0
# $ export LOG=edenscm::mercurial::eagerpeer=trace,eagerepo=trace
Disable SSH:
$ setconfig ui.ssh=false
Prepare Repo:
$ newremoterepo
$ setconfig paths.default=test:e1
$ drawdag <<EOS
> C
> |
> B
> |
> A
> EOS
$ hg push -r $C --to master --create
pushing rev 26805aba1e60 to destination test:e1 bookmark master
searching for changes
exporting bookmark master
$ newremoterepo
$ setconfig paths.default=test:e2
$ drawdag <<EOS
> E
> |
> D
> |
> C
> |
> B
> |
> A
> EOS
$ hg push -r $E --to master --create
pushing rev 9bc730a19041 to destination test:e2 bookmark master
searching for changes
exporting bookmark master
Pull:
$ newremoterepo
$ setconfig paths.default=test:e1
$ hg debugchangelog --migrate lazy
$ hg pull -r $C
pulling from test:e1
$ hg log -Gr 'all()' -T '{desc} {remotenames}'
o C remote/master
o B
o A
$ setconfig paths.default=test:e2
$ hg debugsegmentpull $C $E
Got 1 segments and 3 ids
$ hg log -Gr ::$E -T '{desc} {remotenames}'
o E
o D
o C remote/master
o B
o A