From patchwork Fri Mar 2 22:15:24 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: D2567: lfs: use %d to encode int, not str() From: phabricator X-Patchwork-Id: 28729 Message-Id: To: mercurial-devel@mercurial-scm.org Date: Fri, 2 Mar 2018 22:15:24 +0000 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 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.