2019-12-10 02:24:31 +03:00
|
|
|
#chg-compatible
|
|
|
|
|
2018-10-27 04:52:14 +03:00
|
|
|
TODO: Make this test compatibile with obsstore enabled.
|
|
|
|
$ setconfig experimental.evolution=
|
2010-08-14 04:59:48 +04:00
|
|
|
$ echo "[extensions]" >> $HGRCPATH
|
|
|
|
$ echo "rebase=" >> $HGRCPATH
|
|
|
|
|
|
|
|
initialize repository
|
|
|
|
|
|
|
|
$ hg init
|
|
|
|
|
|
|
|
$ echo 'a' > a
|
|
|
|
$ hg ci -A -m "0"
|
|
|
|
adding a
|
|
|
|
|
|
|
|
$ echo 'b' > b
|
|
|
|
$ hg ci -A -m "1"
|
|
|
|
adding b
|
|
|
|
|
|
|
|
$ hg up 0
|
|
|
|
0 files updated, 0 files merged, 1 files removed, 0 files unresolved
|
|
|
|
$ echo 'c' > c
|
|
|
|
$ hg ci -A -m "2"
|
|
|
|
adding c
|
|
|
|
|
|
|
|
$ echo 'd' > d
|
|
|
|
$ hg ci -A -m "3"
|
|
|
|
adding d
|
|
|
|
|
|
|
|
$ hg bookmark -r 1 one
|
|
|
|
$ hg bookmark -r 3 two
|
2013-05-02 00:24:21 +04:00
|
|
|
$ hg up -q two
|
2010-08-14 04:59:48 +04:00
|
|
|
|
|
|
|
bookmark list
|
|
|
|
|
|
|
|
$ hg bookmark
|
|
|
|
one 1:925d80f479bb
|
2011-02-11 22:35:32 +03:00
|
|
|
* two 3:2ae46b1d99a7
|
2010-08-14 04:59:48 +04:00
|
|
|
|
|
|
|
rebase
|
|
|
|
|
2010-08-16 05:58:03 +04:00
|
|
|
$ hg rebase -s two -d one
|
2019-12-18 00:45:17 +03:00
|
|
|
rebasing 2ae46b1d99a7 "3" (two)
|
2017-12-11 06:50:57 +03:00
|
|
|
saved backup bundle to $TESTTMP/.hg/strip-backup/2ae46b1d99a7-e6b057bc-rebase.hg
|
2010-08-14 04:59:48 +04:00
|
|
|
|
|
|
|
$ hg log
|
2012-06-20 22:08:57 +04:00
|
|
|
changeset: 3:42e5ed2cdcf4
|
2011-02-11 21:47:39 +03:00
|
|
|
bookmark: two
|
2010-08-14 04:59:48 +04:00
|
|
|
parent: 1:925d80f479bb
|
|
|
|
user: test
|
|
|
|
date: Thu Jan 01 00:00:00 1970 +0000
|
|
|
|
summary: 3
|
|
|
|
|
|
|
|
changeset: 2:db815d6d32e6
|
|
|
|
parent: 0:f7b1eb17ad24
|
|
|
|
user: test
|
|
|
|
date: Thu Jan 01 00:00:00 1970 +0000
|
|
|
|
summary: 2
|
|
|
|
|
|
|
|
changeset: 1:925d80f479bb
|
2011-02-16 03:29:26 +03:00
|
|
|
bookmark: one
|
2010-08-14 04:59:48 +04:00
|
|
|
user: test
|
|
|
|
date: Thu Jan 01 00:00:00 1970 +0000
|
|
|
|
summary: 1
|
|
|
|
|
|
|
|
changeset: 0:f7b1eb17ad24
|
|
|
|
user: test
|
|
|
|
date: Thu Jan 01 00:00:00 1970 +0000
|
|
|
|
summary: 0
|
|
|
|
|
2015-04-13 21:54:02 +03:00
|
|
|
aborted rebase should restore active bookmark.
|
|
|
|
|
|
|
|
$ hg up 1
|
|
|
|
0 files updated, 0 files merged, 1 files removed, 0 files unresolved
|
|
|
|
(leaving bookmark two)
|
|
|
|
$ echo 'e' > d
|
|
|
|
$ hg ci -A -m "4"
|
|
|
|
adding d
|
|
|
|
$ hg bookmark three
|
|
|
|
$ hg rebase -s three -d two
|
2019-12-18 00:45:17 +03:00
|
|
|
rebasing dd7c838e8362 "4" (three)
|
2015-04-13 21:54:02 +03:00
|
|
|
merging d
|
2018-10-22 22:45:46 +03:00
|
|
|
warning: 1 conflicts while merging d! (edit, then use 'hg resolve --mark')
|
2015-04-13 21:54:02 +03:00
|
|
|
unresolved conflicts (see hg resolve, then hg rebase --continue)
|
|
|
|
[1]
|
|
|
|
$ hg rebase --abort
|
|
|
|
rebase aborted
|
|
|
|
$ hg bookmark
|
|
|
|
one 1:925d80f479bb
|
|
|
|
* three 4:dd7c838e8362
|
|
|
|
two 3:42e5ed2cdcf4
|
|
|
|
|
2015-05-15 07:35:06 +03:00
|
|
|
after aborted rebase, restoring a bookmark that has been removed should not fail
|
|
|
|
|
|
|
|
$ hg rebase -s three -d two
|
2019-12-18 00:45:17 +03:00
|
|
|
rebasing dd7c838e8362 "4" (three)
|
2015-05-15 07:35:06 +03:00
|
|
|
merging d
|
2018-10-22 22:45:46 +03:00
|
|
|
warning: 1 conflicts while merging d! (edit, then use 'hg resolve --mark')
|
2015-05-15 07:35:06 +03:00
|
|
|
unresolved conflicts (see hg resolve, then hg rebase --continue)
|
|
|
|
[1]
|
|
|
|
$ hg bookmark -d three
|
|
|
|
$ hg rebase --abort
|
|
|
|
rebase aborted
|
|
|
|
$ hg bookmark
|
|
|
|
one 1:925d80f479bb
|
|
|
|
two 3:42e5ed2cdcf4
|