Mercurial > hg
comparison hgext/lfs/pointer.py @ 36602:e30be4d2ac60
lfs: use byteskwargs() on some **kwargs for python 3 compat
Differential Revision: https://phab.mercurial-scm.org/D2566
author | Augie Fackler <augie@google.com> |
---|---|
date | Fri, 02 Mar 2018 11:07:07 -0500 |
parents | 95bd9e396774 |
children | fb6226c15e54 |
comparison
equal
deleted
inserted
replaced
36601:4da09b46451e | 36602:e30be4d2ac60 |
---|---|
11 | 11 |
12 from mercurial.i18n import _ | 12 from mercurial.i18n import _ |
13 | 13 |
14 from mercurial import ( | 14 from mercurial import ( |
15 error, | 15 error, |
16 pycompat, | |
16 ) | 17 ) |
17 | 18 |
18 class InvalidPointer(error.RevlogError): | 19 class InvalidPointer(error.RevlogError): |
19 pass | 20 pass |
20 | 21 |
21 class gitlfspointer(dict): | 22 class gitlfspointer(dict): |
22 VERSION = 'https://git-lfs.github.com/spec/v1' | 23 VERSION = 'https://git-lfs.github.com/spec/v1' |
23 | 24 |
24 def __init__(self, *args, **kwargs): | 25 def __init__(self, *args, **kwargs): |
25 self['version'] = self.VERSION | 26 self['version'] = self.VERSION |
26 super(gitlfspointer, self).__init__(*args, **kwargs) | 27 super(gitlfspointer, self).__init__(*args) |
28 self.update(pycompat.byteskwargs(kwargs)) | |
27 | 29 |
28 @classmethod | 30 @classmethod |
29 def deserialize(cls, text): | 31 def deserialize(cls, text): |
30 try: | 32 try: |
31 return cls(l.split(' ', 1) for l in text.splitlines()).validate() | 33 return cls(l.split(' ', 1) for l in text.splitlines()).validate() |