# HG changeset patch # User Pierre-Yves David <pierre-yves.da...@octobus.net> # Date 1595514389 -7200 # Thu Jul 23 16:26:29 2020 +0200 # Branch stable # Node ID 89ef8e19853e11c106653add49bd33dda246be3c # Parent ac128543063466eae7d6c9c8859154360580879a # EXP-Topic push-obscheck # Available At https://foss.heptapod.net/octobus/mercurial-devel/ # hg pull https://foss.heptapod.net/octobus/mercurial-devel/ -r 89ef8e19853e 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 @@ -121,3 +121,61 @@ Pushing the result is prevented with a m [255] $ cd ../.. + + +Orphan from superseding +----------------------- + +Setup + + $ cp -R base check-superseded + $ cd check-superseded/client + $ hg up 'desc("commit_A0_")' + 2 files updated, 0 files merged, 0 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 is prevented with a message + + $ hg push --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