D5159: phabricator: do more of the VCR work in demandimport.deactivated()

durin42 (Augie Fackler) phabricator at mercurial-scm.org
Fri Oct 19 16:53:41 EDT 2018


This revision was automatically updated to reflect the committed changes.
Closed by commit rHGb015f30a91fb: phabricator: do more of the VCR work in demandimport.deactivated() (authored by durin42, committed by ).

CHANGED PRIOR TO COMMIT
  https://phab.mercurial-scm.org/D5159?vs=12265&id=12283#toc

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D5159?vs=12265&id=12283

REVISION DETAIL
  https://phab.mercurial-scm.org/D5159

AFFECTED FILES
  hgext/phabricator.py

CHANGE DETAILS

diff --git a/hgext/phabricator.py b/hgext/phabricator.py
--- a/hgext/phabricator.py
+++ b/hgext/phabricator.py
@@ -131,14 +131,15 @@
                 with hgdemandimport.deactivated():
                     import vcr as vcrmod
                     import vcr.stubs as stubs
-                vcr = vcrmod.VCR(
-                    serializer=r'json',
-                    custom_patches=[
-                        (urlmod, 'httpconnection', stubs.VCRHTTPConnection),
-                        (urlmod, 'httpsconnection', stubs.VCRHTTPSConnection),
-                    ])
-                with vcr.use_cassette(cassette):
-                    return fn(*args, **kwargs)
+                    vcr = vcrmod.VCR(
+                        serializer=r'json',
+                        custom_patches=[
+                            (urlmod, 'httpconnection', stubs.VCRHTTPConnection),
+                            (urlmod, 'httpsconnection',
+                             stubs.VCRHTTPSConnection),
+                        ])
+                    with vcr.use_cassette(cassette):
+                        return fn(*args, **kwargs)
             return fn(*args, **kwargs)
         inner.__name__ = fn.__name__
         return command(name, fullflags, spec)(inner)



To: durin42, #hg-reviewers, pulkit
Cc: mercurial-devel


More information about the Mercurial-devel mailing list