rebase: add test to demonstrate an issue in dry-run
In dry-run mode, the case when there is nothing to rebase
is not handled correctly. Added test show that it try to
abort a rebase while there is no rebase in progress.
This will be fixed in next patch.
Differential Revision: https://phab.mercurial-scm.org/D9658
--- a/tests/test-rebase-inmemory.t Mon Dec 28 01:40:08 2020 +0100
+++ b/tests/test-rebase-inmemory.t Sat Dec 26 18:04:30 2020 +0530
@@ -338,6 +338,14 @@
abort: cannot specify both --abort and --dry-run
[10]
+When nothing to rebase
+ $ hg reb -r . -d '.^' -n
+ starting dry-run rebase; repository will not be changed
+ nothing to rebase
+ dry-run rebase completed successfully; run without -n/--dry-run to perform this rebase
+ abort: no rebase in progress
+ [20]
+
Check dryrun gives correct results when there is no conflict in rebasing
$ hg rebase -s 2 -d 6 -n
starting dry-run rebase; repository will not be changed