Skip to content

Commit

Permalink
robustcheckout: use pre-Py3.9 with syntax for multiple context mana…
Browse files Browse the repository at this point in the history
…gers (Bug 1762487)

Using `with (cm1, cm2, cm3):` is supported only on Python 3.9+.
Remove the parenthesis to fix `robustcheckout` on earlier versions
of Python.
  • Loading branch information
cgsheeh committed Apr 1, 2022
1 parent 88a77e3 commit a4198e1
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions hgext/robustcheckout/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -780,10 +780,8 @@ 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("sparse_update_config", "sparse-update-config"),
with repo.wlock(), repo.dirstate.parentchange(), timeit(
"sparse_update_config", "sparse-update-config"
):
# pylint --py3k: W1636
fcounts = list(
Expand Down

0 comments on commit a4198e1

Please sign in to comment.