D6102: py3: use fsencode for the vcr recording paths and strings for the custom_patches arguments

Kwan (Ian Moody) phabricator at mercurial-scm.org
Sat Mar 9 20:50:15 EST 2019


This revision was automatically updated to reflect the committed changes.
Closed by commit rHG2bad8f92cebf: py3: use fsencode for vcr recording paths and strings for custom_patches args (authored by Kwan, committed by ).

CHANGED PRIOR TO COMMIT
  https://phab.mercurial-scm.org/D6102?vs=14415&id=14429#toc

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D6102?vs=14415&id=14429

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

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
@@ -128,17 +128,18 @@
     fullflags = flags + _VCR_FLAGS
     def decorate(fn):
         def inner(*args, **kwargs):
-            cassette = kwargs.pop(r'test_vcr', None)
+            cassette = pycompat.fsdecode(kwargs.pop(r'test_vcr', None))
             if cassette:
                 import hgdemandimport
                 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',
+                            (urlmod, r'httpconnection',
+                             stubs.VCRHTTPConnection),
+                            (urlmod, r'httpsconnection',
                              stubs.VCRHTTPSConnection),
                         ])
                     with vcr.use_cassette(cassette):



To: Kwan, #hg-reviewers
Cc: mercurial-devel


More information about the Mercurial-devel mailing list