Skip to content

Commit

Permalink
Bug 1835706 - Make robustcheckout compatible with mercurial 6.4. r=sh…
Browse files Browse the repository at this point in the history
…eehan

Differential Revision: https://phabricator.services.mozilla.com/D179391

--HG--
extra : moz-landing-system : lando
  • Loading branch information
glandium committed May 30, 2023
1 parent da8c687 commit c82cf9d
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions hgext/robustcheckout/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,9 @@
# Causes worker to purge caches on process exit and for task to retry.
EXIT_PURGE_CACHE = 72

testedwith = b"4.5 4.6 4.7 4.8 4.9 5.0 5.1 5.2 5.3 5.4 5.5 5.6 5.7 5.8 5.9"
testedwith = (
b"4.5 4.6 4.7 4.8 4.9 5.0 5.1 5.2 5.3 5.4 5.5 5.6 5.7 5.8 5.9 6.0 6.1 6.2 6.3 6.4"
)
minimumhgversion = b"4.5"

cmdtable = {}
Expand Down Expand Up @@ -806,7 +808,14 @@ def handlepullerror(e):
# one to change the sparse profile and another to update to the new
# revision. This is not desired. But there's not a good API in
# Mercurial to do this as one operation.
with repo.wlock(), repo.dirstate.parentchange(), timeit(
# TRACKING hg64 - Mercurial 6.4 and later require call to
# dirstate.changing_parents(repo)
def parentchange(repo):
if util.safehasattr(repo.dirstate, "changing_parents"):
return repo.dirstate.changing_parents(repo)
return repo.dirstate.parentchange()

with repo.wlock(), parentchange(repo), timeit(
"sparse_update_config", "sparse-update-config"
):
# pylint --py3k: W1636
Expand Down

0 comments on commit c82cf9d

Please sign in to comment.