D10267: tests: update divergence test for `hg fix` to actually result in divergence

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

D10267: tests: update divergence test for `hg fix` to actually result in divergence

marmoute (Pierre-Yves David)
martinvonz created this revision.
Herald added a reviewer: hg-reviewers.
Herald added a subscriber: mercurial-patches.

REVISION SUMMARY
  We have a test that checks that `hg fix` errors out if it might cause
  divergence. However, the test simply prunes the commit it then tries
  to fix, so fixing it wouldn't actually cause divergence. That works
  because the implementation is simple enough that it doesn't notice the
  difference. I'm about to make the implementation smarter, so let's fix
  the test first.

REPOSITORY
  rHG Mercurial

BRANCH
  default

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

AFFECTED FILES
  tests/test-fix.t

CHANGE DETAILS

diff --git a/tests/test-fix.t b/tests/test-fix.t
--- a/tests/test-fix.t
+++ b/tests/test-fix.t
@@ -1106,14 +1106,13 @@
 
   $ printf "foo\n" > foo.changed
   $ hg commit -Aqm "foo"
-  $ hg debugobsolete `hg parents --template '{node}'`
-  1 new obsolescence markers
-  obsoleted 1 changesets
+  $ hg ci --amend -m rewritten
   $ hg --hidden fix -r 0
   abort: fixing obsolete revision could cause divergence
   [255]
 
   $ hg --hidden fix -r 0 --config experimental.evolution.allowdivergence=true
+  2 new content-divergent changesets
   $ hg cat -r tip foo.changed
   FOO
 



To: martinvonz, #hg-reviewers
Cc: mercurial-patches, mercurial-devel
_______________________________________________
Mercurial-devel mailing list
[hidden email]
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel