2019-12-10 02:24:31 +03:00
|
|
|
#chg-compatible
|
|
|
|
|
2020-06-11 03:33:43 +03:00
|
|
|
$ configure mutation-norecord
|
2015-11-14 05:10:52 +03:00
|
|
|
|
|
|
|
Set up
|
2020-01-20 13:42:49 +03:00
|
|
|
$ enable rebase remotenames tweakdefaults
|
2015-11-14 05:10:52 +03:00
|
|
|
|
|
|
|
$ hg init repo
|
|
|
|
$ echo a > repo/a
|
|
|
|
$ hg -R repo commit -qAm aa
|
|
|
|
$ hg -R repo bookmark one -i
|
|
|
|
$ echo b > repo/b
|
|
|
|
$ hg -R repo commit -qAm bb
|
|
|
|
$ hg -R repo bookmark two -i
|
|
|
|
$ echo c > repo/c
|
|
|
|
$ hg -R repo commit -qAm cc
|
|
|
|
$ hg -R repo bookmark three -i
|
|
|
|
$ hg clone -q repo clone
|
|
|
|
$ cd clone
|
|
|
|
|
|
|
|
Test that hg pull --rebase aborts without --dest
|
|
|
|
$ hg log -G --all -T '{node|short} {bookmarks} {remotenames}'
|
2019-02-13 06:48:27 +03:00
|
|
|
@ 083f922fc4a9 default/three
|
2020-10-20 03:05:23 +03:00
|
|
|
│
|
2015-11-14 05:10:52 +03:00
|
|
|
o 301d76bdc3ae default/two
|
2020-10-20 03:05:23 +03:00
|
|
|
│
|
2015-11-14 05:10:52 +03:00
|
|
|
o 8f0162e483d0 default/one
|
|
|
|
|
|
|
|
$ hg up -q default/one
|
|
|
|
$ touch foo
|
|
|
|
$ hg commit -qAm 'foo'
|
|
|
|
$ hg pull --rebase
|
|
|
|
abort: you must use a bookmark with tracking or manually specify a destination for the rebase
|
|
|
|
(set up tracking with `hg book <name> -t <destination>` or manually supply --dest / -d)
|
|
|
|
[255]
|
|
|
|
$ hg bookmark bm
|
|
|
|
$ hg pull --rebase
|
|
|
|
abort: you must use a bookmark with tracking or manually specify a destination for the rebase
|
|
|
|
(set up tracking with `hg book -t <destination>` or manually supply --dest / -d)
|
|
|
|
[255]
|
|
|
|
$ hg book bm -t default/two
|
|
|
|
$ hg pull --rebase
|
2016-01-08 05:30:24 +03:00
|
|
|
pulling from $TESTTMP/repo (glob)
|
2015-11-14 05:10:52 +03:00
|
|
|
searching for changes
|
|
|
|
no changes found
|
2019-12-18 00:45:17 +03:00
|
|
|
rebasing 3de6bbccf693 "foo" (bm)
|
2015-11-14 05:10:52 +03:00
|
|
|
$ hg pull --rebase --dest three
|
2016-01-08 05:30:24 +03:00
|
|
|
pulling from $TESTTMP/repo (glob)
|
2015-11-14 05:10:52 +03:00
|
|
|
searching for changes
|
|
|
|
no changes found
|
2019-12-18 00:45:17 +03:00
|
|
|
rebasing 54ac787ff1c5 "foo" (bm)
|
2015-11-14 05:10:52 +03:00
|
|
|
|
|
|
|
Test that hg pull --update aborts without --dest
|
|
|
|
$ hg pull --update
|
|
|
|
abort: you must specify a destination for the update
|
|
|
|
(use `hg pull --update --dest <destination>`)
|
|
|
|
[255]
|
|
|
|
$ hg pull --update --dest one
|
2016-01-08 05:30:24 +03:00
|
|
|
pulling from $TESTTMP/repo (glob)
|
2015-11-14 05:10:52 +03:00
|
|
|
searching for changes
|
|
|
|
no changes found
|
|
|
|
0 files updated, 0 files merged, 3 files removed, 0 files unresolved
|
|
|
|
(leaving bookmark bm)
|
|
|
|
|
2015-11-26 05:23:07 +03:00
|
|
|
Test that setting a defaultdest allows --update and --rebase to work
|
|
|
|
$ hg pull --update --config tweakdefaults.defaultdest=two
|
2016-01-08 05:30:24 +03:00
|
|
|
pulling from $TESTTMP/repo (glob)
|
2015-11-26 05:23:07 +03:00
|
|
|
searching for changes
|
|
|
|
no changes found
|
|
|
|
1 files updated, 0 files merged, 0 files removed, 0 files unresolved
|
|
|
|
$ hg log -G --all -T '{node|short} {bookmarks} {remotenames}'
|
|
|
|
o 5413b62180b7 bm
|
2020-10-20 03:05:23 +03:00
|
|
|
│
|
2019-02-13 06:48:27 +03:00
|
|
|
o 083f922fc4a9 default/three
|
2020-10-20 03:05:23 +03:00
|
|
|
│
|
2015-11-26 05:23:07 +03:00
|
|
|
@ 301d76bdc3ae default/two
|
2020-10-20 03:05:23 +03:00
|
|
|
│
|
2015-11-26 05:23:07 +03:00
|
|
|
o 8f0162e483d0 default/one
|
|
|
|
|
|
|
|
$ echo d > d
|
|
|
|
$ hg commit -qAm d
|
|
|
|
$ hg pull --rebase --config tweakdefaults.defaultdest=three
|
2016-01-08 05:30:24 +03:00
|
|
|
pulling from $TESTTMP/repo (glob)
|
2015-11-26 05:23:07 +03:00
|
|
|
searching for changes
|
|
|
|
no changes found
|
2019-12-18 00:45:17 +03:00
|
|
|
rebasing 50f3f60b4841 "d"
|
2015-11-26 05:23:07 +03:00
|
|
|
$ hg log -G --all -T '{node|short} {bookmarks} {remotenames}'
|
|
|
|
@ ba0f83735c95
|
2020-10-20 03:05:23 +03:00
|
|
|
│
|
|
|
|
│ o 5413b62180b7 bm
|
|
|
|
├─╯
|
2019-02-13 06:48:27 +03:00
|
|
|
o 083f922fc4a9 default/three
|
2020-10-20 03:05:23 +03:00
|
|
|
│
|
2015-11-26 05:23:07 +03:00
|
|
|
o 301d76bdc3ae default/two
|
2020-10-20 03:05:23 +03:00
|
|
|
│
|
2015-11-26 05:23:07 +03:00
|
|
|
o 8f0162e483d0 default/one
|
|
|
|
|
2017-05-31 20:58:49 +03:00
|
|
|
Test that hg pull --rebase also works with a --tool argument
|
|
|
|
$ echo d created at remote > ../repo/d
|
|
|
|
$ hg -R ../repo update three -q
|
|
|
|
$ hg -R ../repo commit -qAm 'remote d'
|
|
|
|
$ hg pull --rebase --dest three --tool internal:union
|
|
|
|
pulling from $TESTTMP/repo (glob)
|
|
|
|
searching for changes
|
|
|
|
adding changesets
|
|
|
|
adding manifests
|
|
|
|
adding file changes
|
2019-11-07 21:50:10 +03:00
|
|
|
added 1 changesets with 1 changes to 1 files
|
2019-10-16 02:28:01 +03:00
|
|
|
rebasing ba0f83735c95 "d"
|
2017-05-31 20:58:49 +03:00
|
|
|
merging d
|
|
|
|
$ hg log -G --all -T '{node|short} {bookmarks} {remotenames}'
|
|
|
|
@ d6553cf01770
|
2020-10-20 03:05:23 +03:00
|
|
|
│
|
2019-02-13 06:48:27 +03:00
|
|
|
o e8aa3bc9f3f0 default/three
|
2020-10-20 03:05:23 +03:00
|
|
|
│
|
|
|
|
│ o 5413b62180b7 bm
|
|
|
|
├─╯
|
2017-05-31 20:58:49 +03:00
|
|
|
o 083f922fc4a9
|
2020-10-20 03:05:23 +03:00
|
|
|
│
|
2017-05-31 20:58:49 +03:00
|
|
|
o 301d76bdc3ae default/two
|
2020-10-20 03:05:23 +03:00
|
|
|
│
|
2017-05-31 20:58:49 +03:00
|
|
|
o 8f0162e483d0 default/one
|
|
|
|
|
|
|
|
$ cat d
|
|
|
|
d created at remote
|
|
|
|
d
|