Patchwork D7175: tests: add test showing incorrect note about not rebasing extinct commit

login
register
mail settings
Submitter phabricator
Date Oct. 26, 2019, 12:49 a.m.
Message ID <differential-rev-PHID-DREV-wmqkw5dc3ypybhgmphlt-req@mercurial-scm.org>
Download mbox | patch
Permalink /patch/42593/
State New
Headers show

Comments

phabricator - Oct. 26, 2019, 12:49 a.m.
martinvonz created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.

REVISION SUMMARY
  If all successors are obsolete, then rebasing the commit will not
  cause divergence.

REPOSITORY
  rHG Mercurial

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

AFFECTED FILES
  tests/test-rebase-obsolete.t

CHANGE DETAILS




To: martinvonz, #hg-reviewers
Cc: mercurial-devel

Patch

diff --git a/tests/test-rebase-obsolete.t b/tests/test-rebase-obsolete.t
--- a/tests/test-rebase-obsolete.t
+++ b/tests/test-rebase-obsolete.t
@@ -1534,6 +1534,14 @@ 
   rebasing 1:112478962961 "B" (B)
   note: not rebasing 3:26805aba1e60 "C" (C) and its descendants as this would cause divergence
 
+  $ hg debugobsolete $(hg log -r E -T '{node}')
+  1 new obsolescence markers
+  obsoleted 1 changesets
+  $ hg tag --local --remove E
+BROKEN: this rebase would not cause divergence
+  $ hg rebase -d D -s C
+  note: not rebasing 3:26805aba1e60 "C" (C) and its descendants as this would cause divergence
+
   $ cd ..
 
   $ hg init p2-succ-in-dest-c