Mercurial > public > mercurial-scm > hg-stable
comparison tests/test-rebase-parameters.t @ 44301:830eae18b2f3
rebase: abort if the user tries to rebase the working copy
I think it's more correct to treat `hg rebase -r 'wdir()' -d foo`
as `hg co -m foo`, but I'm instead making it error out. That's partly
because it's probably what the user wanted (in the case I heard from a
user, they had done `hg rebase -s f` where `f` resolved to `wdir()`)
and partly because I don't want to think about more complicated cases
where the user specifies the working copy together with other commits.
Differential Revision: https://phab.mercurial-scm.org/D8057
author | Martin von Zweigbergk <martinvonz@google.com> |
---|---|
date | Fri, 31 Jan 2020 10:53:50 -0800 |
parents | 6e4ff6a766c2 |
children | 9c9cfecd4600 |
comparison
equal
deleted
inserted
replaced
44300:6e4ff6a766c2 | 44301:830eae18b2f3 |
---|---|
91 $ hg rebase --rev '1 & !1' --dest 8 | 91 $ hg rebase --rev '1 & !1' --dest 8 |
92 empty "rev" revision set - nothing to rebase | 92 empty "rev" revision set - nothing to rebase |
93 [1] | 93 [1] |
94 | 94 |
95 $ hg rebase --rev 'wdir()' --dest 6 | 95 $ hg rebase --rev 'wdir()' --dest 6 |
96 abort: working directory revision cannot be specified | 96 abort: cannot rebase the working copy |
97 [255] | 97 [255] |
98 | 98 |
99 $ hg rebase --source 'wdir()' --dest 6 2>&1 | grep assert | 99 $ hg rebase --source 'wdir()' --dest 6 |
100 assert rebaseset | 100 abort: cannot rebase the working copy |
101 [255] | |
101 | 102 |
102 $ hg rebase --source '1 & !1' --dest 8 | 103 $ hg rebase --source '1 & !1' --dest 8 |
103 empty "source" revision set - nothing to rebase | 104 empty "source" revision set - nothing to rebase |
104 [1] | 105 [1] |
105 | 106 |