# HG changeset patch
# User Pierre-Yves David <pierre-yves.da...@octobus.net>
# Date 1595514630 -7200
#      Thu Jul 23 16:30:30 2020 +0200
# Branch stable
# Node ID 0e7bc548b4766d6da71dd6cf3f98c1fb8e6fa788
# Parent  b1ba2cd7af5a87e5b9006d042c9401e12a4cb9ef
# EXP-Topic push-obscheck
# Available At https://foss.heptapod.net/octobus/mercurial-devel/
#              hg pull https://foss.heptapod.net/octobus/mercurial-devel/ -r 
0e7bc548b476
push: test for checks preventing publishing obsolete changeset

The main difference from the previous test is how the changeset was obsoleted.
In this case it is an amend so publishing the orphan would also create phase
divergence. This must not go unnoticed.

diff --git a/tests/test-obsolete-check-push.t b/tests/test-obsolete-check-push.t
--- a/tests/test-obsolete-check-push.t
+++ b/tests/test-obsolete-check-push.t
@@ -208,3 +208,30 @@ check somethign prevent a silent publica
   [255]
 
   $ cd ../..
+
+Orphan from superseeding
+------------------------
+
+Make sure the only difference is phase:
+
+  $ cd check-superceed/client
+  $ hg push --force --rev 'desc("commit_")'
+  pushing to $TESTTMP/check-superceed/server
+  searching for changes
+  adding changesets
+  adding manifests
+  adding file changes
+  added 1 changesets with 0 changes to 0 files (+1 heads)
+  1 new obsolescence markers
+  obsoleted 1 changesets
+  1 new orphan changesets
+
+check somethign prevent a silent publication of the obsolete changeset
+
+  $ hg push --publish --new-branch
+  pushing to $TESTTMP/check-superceed/server
+  searching for changes
+  abort: push includes orphan changeset: c09d8ab29fda!
+  [255]
+
+  $ cd ../..

_______________________________________________
Mercurial-devel mailing list
Mercurial-devel@mercurial-scm.org
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel

Reply via email to