mirror of
https://github.com/facebook/sapling.git
synced 2024-10-10 00:45:18 +03:00
7e5548cda2
Summary: When connecting to a commit cloud workspace where there are no draft commits to pull, no local bookmarks to sync, but the remote bookmarks in the local repo are ahead of the ones in the commit cloud workspace, we fail to sync the remote bookmarks to the server. This results in the remote bookmark rewinding on the next sync. Reviewed By: quark-zju Differential Revision: D27291237 fbshipit-source-id: 8ba56542492fda26b9cecb6726ddd1b85ed5c180
74 lines
1.3 KiB
Raku
74 lines
1.3 KiB
Raku
#chg-compatible
|
|
|
|
$ configure modern
|
|
$ setconfig infinitepush.branchpattern=re:scratch/.+
|
|
|
|
$ showgraph() {
|
|
> hg log -G -T "{desc}: {phase} {bookmarks} {remotenames}" -r "all()"
|
|
> }
|
|
|
|
$ newserver server
|
|
$ cd $TESTTMP/server
|
|
$ echo base > base
|
|
$ hg commit -Aqm base
|
|
$ echo 1 > public1
|
|
$ hg commit -Aqm public1
|
|
$ hg bookmark master
|
|
|
|
$ cd $TESTTMP
|
|
$ clone server client1
|
|
$ cd client1
|
|
$ hg up -q remote/master
|
|
$ hg cloud sync -q
|
|
$ showgraph
|
|
@ public1: public remote/master
|
|
│
|
|
o base: public
|
|
|
|
|
|
$ cd $TESTTMP
|
|
$ cd server
|
|
$ echo 2 > public2
|
|
$ hg commit -Aqm public2
|
|
|
|
$ cd $TESTTMP
|
|
$ clone server client2
|
|
$ cd client2
|
|
$ hg up -q remote/master
|
|
$ hg cloud sync -q
|
|
$ showgraph
|
|
@ public2: public remote/master
|
|
│
|
|
o public1: public
|
|
│
|
|
o base: public
|
|
|
|
|
|
$ cd $TESTTMP
|
|
$ cd client1
|
|
$ hg cloud sync -q
|
|
$ showgraph
|
|
@ public1: public remote/master
|
|
│
|
|
o base: public
|
|
|
|
BUG! The sync should have pushed remote/master forwards.
|
|
|
|
$ echo 1 > file
|
|
$ hg commit -Aqm draft1
|
|
$ hg cloud sync -q
|
|
|
|
$ cd $TESTTMP
|
|
$ cd client2
|
|
$ hg cloud sync -q
|
|
$ showgraph
|
|
o draft1: draft
|
|
│
|
|
│ @ public2: draft
|
|
├─╯
|
|
o public1: public remote/master
|
|
│
|
|
o base: public
|
|
|
|
BUG! Master moved backwards and now public2 is draft.
|
|
$ |