# 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 e741ef8d1b76060f6c49fbef0082efe19246cde7 # Parent 099d3b7cfef487b42c408c54345cdccb5cf9be98 # EXP-Topic push-obscheck # Available At https://foss.heptapod.net/octobus/mercurial-devel/ # hg pull https://foss.heptapod.net/octobus/mercurial-devel/ -r e741ef8d1b76 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 @@ -207,3 +207,30 @@ Check something prevents a silent public [255] $ cd ../.. + +Orphan from superseding +----------------------- + +Make sure the only difference is phase: + + $ cd check-superseded/client + $ hg push --force --rev 'not desc("unrelated")' + pushing to $TESTTMP/check-superseded/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 something prevents a silent publication of the obsolete changeset + + $ hg push --publish --new-branch + pushing to $TESTTMP/check-superseded/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