diff --git a/tests/test-branch-bookmark-suffix.t b/tests/test-branch-bookmark-suffix.t index a4b2ba5b5f45987c5756a563cffa0ca56d8350d6_dGVzdHMvdGVzdC1icmFuY2gtYm9va21hcmstc3VmZml4LnQ=..0db597e185a18fda06f49a3cfc74ab105434e21c_dGVzdHMvdGVzdC1icmFuY2gtYm9va21hcmstc3VmZml4LnQ= 100644 --- a/tests/test-branch-bookmark-suffix.t +++ b/tests/test-branch-bookmark-suffix.t @@ -8,7 +8,6 @@ $ git init -q --bare repo.git -#if with-path $ hg clone repo.git hgrepo updating to branch default 0 files updated, 0 files merged, 0 files removed, 0 files unresolved @@ -12,6 +11,7 @@ $ hg clone repo.git hgrepo updating to branch default 0 files updated, 0 files merged, 0 files removed, 0 files unresolved -#else - $ hg init hgrepo + $ cd hgrepo +#if without-path + $ rm .hg/hgrc #endif @@ -17,5 +17,4 @@ #endif - $ cd hgrepo $ hg branch -q branch1 $ hg bookmark branch1_bookmark $ echo f1 > f1 @@ -212,4 +211,5 @@ date: Mon Jan 01 00:00:10 2007 +0000 summary: add f1 + $ cd .. @@ -215,1 +215,70 @@ $ cd .. + +Now try pulling a diverged bookmark: + + $ rm -r hgrepo +#if with-path + $ hg clone -U repo.git hgrepo + importing 5 git commits + new changesets 40a840c1f8ae:faf44fc3a4e8 (5 drafts) +#else + $ hg init hgrepo + $ hg -R hgrepo pull repo.git + pulling from repo.git + importing 5 git commits + new changesets 40a840c1f8ae:faf44fc3a4e8 (5 drafts) + (run 'hg heads' to see heads, 'hg merge' to merge) +#endif + $ cd gitrepo + $ git checkout -q branch1 + $ fn_git_rebase branch3 + $ git push -f + To $TESTTMP/repo.git + + d8aef79...ce1d1c5 branch1 -> branch1 (forced update) + $ cd ../hgrepo + $ hg pull ../repo.git + pulling from ../repo.git + importing 1 git commits + new changesets 895d0307f8b7 (1 drafts) + (run 'hg update' to get a working copy) + $ hg log --graph + o changeset: 5:895d0307f8b7 + | bookmark: branch1_bookmark + | tag: default/branch1 (with-path !) + | tag: tip + | user: test <test@example.org> + | date: Mon Jan 01 00:00:12 2007 +0000 + | summary: append f1 + | + o changeset: 4:faf44fc3a4e8 + | bookmark: branch3_bookmark + | tag: default/branch3 (with-path !) + | user: test <test@example.org> + | date: Mon Jan 01 00:00:14 2007 +0000 + | summary: append f3 + | + o changeset: 3:ae8eb55f7090 + | bookmark: branch2_bookmark + | tag: default/branch2 (with-path !) + | user: test <test@example.org> + | date: Mon Jan 01 00:00:13 2007 +0000 + | summary: append f2 + | + o changeset: 2:600de9b6d498 + | branch: branch2 + | parent: 0:40a840c1f8ae + | user: test + | date: Mon Jan 01 00:00:11 2007 +0000 + | summary: add f2 + | + | o changeset: 1:8211cade99e4 + |/ user: test <test@example.org> + | date: Mon Jan 01 00:00:12 2007 +0000 + | summary: append f1 + | + o changeset: 0:40a840c1f8ae + branch: branch1 + user: test + date: Mon Jan 01 00:00:10 2007 +0000 + summary: add f1 + diff --git a/tests/test-pull-after-rebase.t b/tests/test-pull-after-rebase.t index a4b2ba5b5f45987c5756a563cffa0ca56d8350d6_dGVzdHMvdGVzdC1wdWxsLWFmdGVyLXJlYmFzZS50..0db597e185a18fda06f49a3cfc74ab105434e21c_dGVzdHMvdGVzdC1wdWxsLWFmdGVyLXJlYmFzZS50 100644 --- a/tests/test-pull-after-rebase.t +++ b/tests/test-pull-after-rebase.t @@ -101,3 +101,59 @@ |/ add beta o 0:ff7a2f2d8d7099694ae1e8b03838d40575bebb63 add alpha + + $ cd .. + +Now try rebasing that branch, from the Git side of things + + $ cd gitrepo + $ git checkout -q otherbranch + $ fn_git_rebase --onto branch otherbranch + $ git push -f + To $TESTTMP/repo.git + + c4cfa5e...e5023f9 otherbranch -> otherbranch (forced update) + $ cd .. + + $ cd hgrepo + $ hg pull + pulling from $TESTTMP/repo.git + no changes found + $ hg state + * otherbranch tip 4:f4bd265a9d39e5c4da2c0a752de5ea70335199c5 + | add gamma + | @ branch default/branch 3:52def9937d74e43b83dfded6ce0e5adf731b9d22 + | | add gamma + x | default/otherbranch 2:205a004356ef32b8da782afb89d9179d12ca31e9 + | | add gamma + | o master default/master 1:7fe02317c63d9ee324d4b5df7c9296085162da1b + |/ add beta + o 0:ff7a2f2d8d7099694ae1e8b03838d40575bebb63 + add alpha + + $ cd .. + +And finally, delete it: + + $ cd gitrepo + $ git push origin :otherbranch + To $TESTTMP/repo.git + - [deleted] otherbranch + $ cd .. + +And pull that: + + $ cd hgrepo + $ hg pull + pulling from $TESTTMP/repo.git + no changes found + $ hg state + * otherbranch tip 4:f4bd265a9d39e5c4da2c0a752de5ea70335199c5 + | add gamma + | @ branch default/branch 3:52def9937d74e43b83dfded6ce0e5adf731b9d22 + | | add gamma + x | 2:205a004356ef32b8da782afb89d9179d12ca31e9 + | | add gamma + | o master default/master 1:7fe02317c63d9ee324d4b5df7c9296085162da1b + |/ add beta + o 0:ff7a2f2d8d7099694ae1e8b03838d40575bebb63 + add alpha