sapling/eden/scm/tests/test-commitcloud-sync-rb-enabling2.t
Durham Goode 8ff3a8cbd5 py3: fix commit cloud tests
Summary: Makes all the commit cloud tests pass

Reviewed By: quark-zju

Differential Revision: D20927720

fbshipit-source-id: a863dc1b06258ac8d0ee907f51948c012a23dddc
2020-04-10 10:59:50 -07:00

85 lines
1.5 KiB
Perl

#chg-compatible
$ configure modern
$ newserver server
$ cd $TESTTMP/server
$ echo base > base
$ hg commit -Aqm base
$ hg bookmark master
$ clone server client1
$ hg --cwd client1 log -Gr 'all()' -T '{desc} {phase} {remotebookmarks}'
@ base public remote/master
$ clone server client2
$ hg --cwd client2 log -Gr 'all()' -T '{desc} {phase} {remotebookmarks}'
@ base public remote/master
Advance master
$ cd $TESTTMP/server
$ echo more >> base
$ hg commit -Aqm public1
Pull in client1
$ cd $TESTTMP/client1
$ hg pull -q
$ drawdag << 'EOS'
> X
> |
> desc(base)
> EOS
$ hg cloud sync -q
$ hg log -Gr 'all()' -T '{desc} {phase} {remotebookmarks}'
o X draft
|
| o public1 public remote/master
|/
@ base public
Advance master again.
$ cd $TESTTMP/server
$ echo more >> base
$ hg commit -Aqm public2
Sync in client2. The master bookmark gets synced to the same location as in
client1, but not in the server.
$ cd $TESTTMP/client2
$ hg cloud sync -q
$ hg log -Gr 'all()' -T '{desc} {phase} {remotebookmarks}'
o X draft
|
| o public1 public remote/master
|/
@ base public
Make changes in client2 and sync the changes to cloud.
$ drawdag << 'EOS'
> Y
> |
> desc(X)
> EOS
$ hg cloud sync -q
Sync back to client1. This does not cause lagged default/master.
$ cd $TESTTMP/client1
$ hg cloud sync -q
$ hg log -Gr 'all()' -T '{desc} {phase} {remotebookmarks}'
o Y draft
|
o X draft
|
| o public1 public remote/master
|/
@ base public