Patchwork D9658: rebase: add test to demonstrate an issue in dry-run

login
register
mail settings
Submitter phabricator
Date Dec. 26, 2020, 1 p.m.
Message ID <differential-rev-PHID-DREV-xnsap2r6db4ektzncv32-req@mercurial-scm.org>
Download mbox | patch
Permalink /patch/47969/
State Superseded
Headers show

Comments

phabricator - Dec. 26, 2020, 1 p.m.
khanchi97 created this revision.
Herald added a reviewer: hg-reviewers.
Herald added a subscriber: mercurial-patches.

REVISION SUMMARY
  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.

REPOSITORY
  rHG Mercurial

BRANCH
  default

REVISION DETAIL
  https://phab.mercurial-scm.org/D9658

AFFECTED FILES
  tests/test-rebase-inmemory.t

CHANGE DETAILS




To: khanchi97, #hg-reviewers
Cc: mercurial-patches, mercurial-devel

Patch

diff --git a/tests/test-rebase-inmemory.t b/tests/test-rebase-inmemory.t
--- a/tests/test-rebase-inmemory.t
+++ b/tests/test-rebase-inmemory.t
@@ -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