Patchwork D2565: lfs: add some bytestring wrappers in blobstore.py

login
register
mail settings
Submitter phabricator
Date March 2, 2018, 10:20 p.m.
Message ID <9428d74bbcfc0366a11b2f0edf47f67d@localhost.localdomain>
Download mbox | patch
Permalink /patch/28734/
State Not Applicable
Headers show

Comments

phabricator - March 2, 2018, 10:20 p.m.
This revision was automatically updated to reflect the committed changes.
Closed by commit rHG4da09b46451e: lfs: add some bytestring wrappers in blobstore.py (authored by durin42, committed by ).

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D2565?vs=6388&id=6394

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

AFFECTED FILES
  hgext/lfs/blobstore.py

CHANGE DETAILS




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

Patch

diff --git a/hgext/lfs/blobstore.py b/hgext/lfs/blobstore.py
--- a/hgext/lfs/blobstore.py
+++ b/hgext/lfs/blobstore.py
@@ -18,6 +18,7 @@ 
 from mercurial import (
     error,
     pathutil,
+    pycompat,
     url as urlmod,
     util,
     vfs as vfsmod,
@@ -281,9 +282,9 @@ 
         See https://github.com/git-lfs/git-lfs/blob/master/docs/api/\
         basic-transfers.md
         """
-        oid = str(obj['oid'])
+        oid = pycompat.bytestr(obj['oid'])
 
-        href = str(obj['actions'][action].get('href'))
+        href = pycompat.bytestr(obj['actions'][action].get('href'))
         headers = obj['actions'][action].get('header', {}).items()
 
         request = util.urlreq.request(href)