# HG changeset patch # User Pierre-Yves David # Date 2020-07-23 14:30:30 # Node ID 559ebfb5a58e6a17f20f6b344beb37649fada1b6 # Parent 5ff77aaba1e4b04c1b6d6872a0e97ae84d767a56 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 ../..