From patchwork Thu Jul 23 15:40:46 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [3, of, 5, STABLE, REGRESSION] push: another test for checks preventing pushing orphaness to a server From: Pierre-Yves David X-Patchwork-Id: 46846 Message-Id: To: mercurial-devel@mercurial-scm.org Date: Thu, 23 Jul 2020 17:40:46 +0200 # HG changeset patch # User Pierre-Yves David # Date 1595514389 -7200 # Thu Jul 23 16:26:29 2020 +0200 # Branch stable # Node ID c7a435ee409a9d8c03ed6a8da36e2333c611636a # Parent 9bde0395be897160955882984ccc520167e0b363 # EXP-Topic push-obscheck # Available At https://foss.heptapod.net/octobus/mercurial-devel/ # hg pull https://foss.heptapod.net/octobus/mercurial-devel/ -r c7a435ee409a push: another test for checks preventing pushing orphaness to a server In this one, orphan was create with and amend instead of a prune. 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 @@ -122,3 +122,61 @@ Pushing the result if prevented with a m [255] $ cd ../.. + + +Orphan from superseeding +------------------------ + +Setup + + $ cp -R base check-superceed + $ cd check-superceed/client + $ hg up 'desc("commit_A0_")' + 1 files updated, 0 files merged, 1 files removed, 0 files unresolved + $ hg branch other + marked working directory as branch other + $ hg commit --amend -m commit_A1_ + 1 new orphan changesets + $ hg log -G + @ changeset: 4:df9b82a99e21 + | branch: other + | tag: tip + | parent: 0:1e4be0697311 + | user: test + | date: Thu Jan 01 00:00:00 1970 +0000 + | summary: commit_A1_ + | + | o changeset: 3:16affbe0f986 + |/ branch: unrelated + | parent: 0:1e4be0697311 + | user: test + | date: Thu Jan 01 00:00:00 1970 +0000 + | summary: unrelated + | + | * changeset: 2:c09d8ab29fda + | | user: test + | | date: Thu Jan 01 00:00:00 1970 +0000 + | | instability: orphan + | | summary: commit_B0_ + | | + | x changeset: 1:37624bf21024 + |/ user: test + | date: Thu Jan 01 00:00:00 1970 +0000 + | obsolete: rewritten using amend as 4:df9b82a99e21 + | summary: commit_A0_ + | + o changeset: 0:1e4be0697311 + user: test + date: Thu Jan 01 00:00:00 1970 +0000 + summary: root + + +Pushing the result if prevented with a message + + $ hg push --new-branch + pushing to $TESTTMP/check-superceed/server + searching for changes + abort: push includes orphan changeset: c09d8ab29fda! + [255] + + $ cd ../..