Mercurial > hg
diff mercurial/filelog.py @ 43077:687b865b95ad
formatting: byteify all mercurial/ and hgext/ string literals
Done with
python3.7 contrib/byteify-strings.py -i $(hg files 'set:mercurial/**.py - mercurial/thirdparty/** + hgext/**.py - hgext/fsmonitor/pywatchman/** - mercurial/__init__.py')
black -l 80 -t py33 -S $(hg files 'set:**.py - mercurial/thirdparty/** - "contrib/python-zstandard/**" - hgext/fsmonitor/pywatchman/**')
# skip-blame mass-reformatting only
Differential Revision: https://phab.mercurial-scm.org/D6972
author | Augie Fackler <augie@google.com> |
---|---|
date | Sun, 06 Oct 2019 09:48:39 -0400 |
parents | 2372284d9457 |
children | a5206e71c536 |
line wrap: on
line diff
--- a/mercurial/filelog.py Sun Oct 06 09:45:02 2019 -0400 +++ b/mercurial/filelog.py Sun Oct 06 09:48:39 2019 -0400 @@ -27,7 +27,7 @@ class filelog(object): def __init__(self, opener, path): self._revlog = revlog.revlog( - opener, '/'.join(('data', path + '.i')), censorable=True + opener, b'/'.join((b'data', path + b'.i')), censorable=True ) # Full name of the user visible file, relative to the repository root. # Used by LFS. @@ -144,8 +144,8 @@ if maybemissingparents: raise error.Abort( _( - 'revlog storage does not support missing ' - 'parents write mode' + b'revlog storage does not support missing ' + b'parents write mode' ) ) @@ -169,7 +169,7 @@ return storageutil.filtermetadata(self.revision(node)) def add(self, text, meta, transaction, link, p1=None, p2=None): - if meta or text.startswith('\1\n'): + if meta or text.startswith(b'\1\n'): text = storageutil.packmeta(meta, text) return self.addrevision(text, transaction, link, p1, p2) @@ -230,7 +230,7 @@ # Used by repo upgrade. def clone(self, tr, destrevlog, **kwargs): if not isinstance(destrevlog, filelog): - raise error.ProgrammingError('expected filelog to clone()') + raise error.ProgrammingError(b'expected filelog to clone()') return self._revlog.clone(tr, destrevlog._revlog, **kwargs)