# HG changeset patch # User Pierre-Yves David # Date 1586150800 -7200 # Node ID f560d23639e18bfa96365fd860bf120fb6dedce7 # Parent b20d04641c0fcdce14e910b8a93d06c61a9a5ea0 head-checking: ignore obsoleted section when checking head creation locally Same as for the server side check, these do not need to be taken in account. diff -r b20d04641c0f -r f560d23639e1 hgext3rd/evolve/headchecking.py --- a/hgext3rd/evolve/headchecking.py Wed Mar 11 23:56:11 2020 +0100 +++ b/hgext3rd/evolve/headchecking.py Mon Apr 06 07:26:40 2020 +0200 @@ -83,7 +83,7 @@ nh = localcandidate.pop() current_branch = branchinfo(pushop, unfi, nh) # run this check early to skip the evaluation of the whole branch - if torev(nh) in futurecommon or ispublic(torev(nh)): + if ispublic(torev(nh)) or not unfi[nh].obsolete(): newhs.add(nh) continue @@ -105,7 +105,9 @@ # * if we have no markers to push to obsolete it. if ( any(ispublic(torev(n)) for n in branchnodes) - or any(torev(n) in futurecommon for n in branchnodes) + or (any(torev(n) in futurecommon and not unfi[n].obsolete() for n in branchnodes)) + # XXX `hasoutmarker` does not guarantee the changeset to be + # obsolete, nor obsoleted by the push. or any(not hasoutmarker(n) for n in branchnodes) ): newhs.add(nh) diff -r b20d04641c0f -r f560d23639e1 tests/test-single-head-obsolescence-named-branch-A1.t --- a/tests/test-single-head-obsolescence-named-branch-A1.t Wed Mar 11 23:56:11 2020 +0100 +++ b/tests/test-single-head-obsolescence-named-branch-A1.t Mon Apr 06 07:26:40 2020 +0200 @@ -96,9 +96,7 @@ Actual testing -------------- -(force push to make sure we get the changeset on the remote) - - $ hg push -r 'desc("B1")' --force + $ hg push -r 'desc("B1")' pushing to $TESTTMP/A1/server searching for changes adding changesets diff -r b20d04641c0f -r f560d23639e1 tests/test-single-head-obsolescence-named-branch-A3.t --- a/tests/test-single-head-obsolescence-named-branch-A3.t Wed Mar 11 23:56:11 2020 +0100 +++ b/tests/test-single-head-obsolescence-named-branch-A3.t Mon Apr 06 07:26:40 2020 +0200 @@ -104,9 +104,7 @@ Actual testing -------------- -(force push to make sure we get the changeset on the remote) - - $ hg push -r 'desc("C1")' --force + $ hg push -r 'desc("C1")' pushing to $TESTTMP/A3/server searching for changes adding changesets