hgext/lfs/wrapper.py
changeset 36603 dcb6fbaa43a8
parent 36142 60dd840a7fdb
child 36604 f6b9f9ddd0de
equal deleted inserted replaced
36602:e30be4d2ac60 36603:dcb6fbaa43a8
    88     oid = hashlib.sha256(text).hexdigest()
    88     oid = hashlib.sha256(text).hexdigest()
    89     self.opener.lfslocalblobstore.write(oid, text)
    89     self.opener.lfslocalblobstore.write(oid, text)
    90 
    90 
    91     # replace contents with metadata
    91     # replace contents with metadata
    92     longoid = 'sha256:%s' % oid
    92     longoid = 'sha256:%s' % oid
    93     metadata = pointer.gitlfspointer(oid=longoid, size=str(len(text)))
    93     metadata = pointer.gitlfspointer(oid=longoid, size='%d' % len(text))
    94 
    94 
    95     # by default, we expect the content to be binary. however, LFS could also
    95     # by default, we expect the content to be binary. however, LFS could also
    96     # be used for non-binary content. add a special entry for non-binary data.
    96     # be used for non-binary content. add a special entry for non-binary data.
    97     # this will be used by filectx.isbinary().
    97     # this will be used by filectx.isbinary().
    98     if not util.binary(text):
    98     if not util.binary(text):