Patchwork D2567: lfs: use %d to encode int, not str()

login
register
mail settings
Submitter phabricator
Date March 2, 2018, 10:15 p.m.
Message ID <differential-rev-PHID-DREV-qiwmgtq7vlmrfq5zkhbq-req@phab.mercurial-scm.org>
Download mbox | patch
Permalink /patch/28729/
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/D2567

AFFECTED FILES
  hgext/lfs/wrapper.py

CHANGE DETAILS




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

Patch

diff --git a/hgext/lfs/wrapper.py b/hgext/lfs/wrapper.py
--- a/hgext/lfs/wrapper.py
+++ b/hgext/lfs/wrapper.py
@@ -90,7 +90,7 @@ 
 
     # replace contents with metadata
     longoid = 'sha256:%s' % oid
-    metadata = pointer.gitlfspointer(oid=longoid, size=str(len(text)))
+    metadata = pointer.gitlfspointer(oid=longoid, size='%d' % len(text))
 
     # by default, we expect the content to be binary. however, LFS could also
     # be used for non-binary content. add a special entry for non-binary data.