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

login
register
mail settings
Submitter phabricator
Date March 2, 2018, 10:15 p.m.
Message ID <differential-rev-PHID-DREV-ez55emc23maiywkibrrp-req@phab.mercurial-scm.org>
Download mbox | patch
Permalink /patch/28728/
State Superseded
Headers show

Comments

phabricator - March 2, 2018, 10:15 p.m.
durin42 created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.

REPOSITORY
  rHG Mercurial

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

AFFECTED FILES
  hgext/lfs/blobstore.py

CHANGE DETAILS




To: durin42, #hg-reviewers
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)