Mercurial > hg-stable
diff hgext/largefiles/overrides.py @ 41769:1eb2fc21da12
cleanup: prefer nested context managers to \-continuations
I'd prefer Python accept a tuple of context managers, but alas it
isn't meant to be. This will have to suffice.
Differential Revision: https://phab.mercurial-scm.org/D5994
author | Augie Fackler <augie@google.com> |
---|---|
date | Wed, 20 Feb 2019 18:02:28 -0500 |
parents | 0531dff73d0b |
children | 87a34c767384 |
line wrap: on
line diff
--- a/hgext/largefiles/overrides.py Wed Feb 20 19:28:51 2019 -0500 +++ b/hgext/largefiles/overrides.py Wed Feb 20 18:02:28 2019 -0500 @@ -664,9 +664,9 @@ _('destination largefile already exists')) copiedfiles.append((src, dest)) orig(src, dest, *args, **kwargs) - with extensions.wrappedfunction(util, 'copyfile', overridecopyfile), \ - extensions.wrappedfunction(scmutil, 'match', overridematch): - result += orig(ui, repo, listpats, opts, rename) + with extensions.wrappedfunction(util, 'copyfile', overridecopyfile): + with extensions.wrappedfunction(scmutil, 'match', overridematch): + result += orig(ui, repo, listpats, opts, rename) lfdirstate = lfutil.openlfdirstate(ui, repo) for (src, dest) in copiedfiles: