changeset 46179:11f3d4458e3a

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
author Sushil khanchi <sushilkhanchi97@gmail.com>
date Sat, 26 Dec 2020 18:04:30 +0530
parents e3d595b7fbaa
children b7ccdb52e0f9
files tests/test-rebase-inmemory.t
diffstat 1 files changed, 8 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- 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