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

login
register
mail settings
Submitter phabricator
Date March 2, 2018, 10:20 p.m.
Message ID <dc466bd1e16bcbf4deecff005eab3f3e@localhost.localdomain>
Download mbox | patch
Permalink /patch/28735/
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 rHGdcb6fbaa43a8: lfs: use %d to encode int, not str() (authored by durin42, committed by ).

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D2567?vs=6390&id=6396

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

AFFECTED FILES
  hgext/lfs/wrapper.py

CHANGE DETAILS




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