Mercurial > public > mercurial-scm > hg-stable
diff mercurial/revlogutils/deltas.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 | c59eb1560c44 |
line wrap: on
line diff
--- a/mercurial/revlogutils/deltas.py Sun Oct 06 09:45:02 2019 -0400 +++ b/mercurial/revlogutils/deltas.py Sun Oct 06 09:48:39 2019 -0400 @@ -514,7 +514,7 @@ # special case deltas which replace entire base; no need to decode # base revision. this neatly avoids censored bases, which throw when # they're decoded. - hlen = struct.calcsize(">lll") + hlen = struct.calcsize(b">lll") if delta[:hlen] == mdiff.replacediffheader( revlog.rawsize(baserev), len(delta) - hlen ): @@ -531,7 +531,7 @@ revlog.checkhash(fulltext, expectednode, p1=p1, p2=p2) if flags & REVIDX_ISCENSORED: raise error.StorageError( - _('node %s is not censored') % expectednode + _(b'node %s is not censored') % expectednode ) except error.CensoredNodeError: # must pass the censored index flag to add censored revisions @@ -726,7 +726,7 @@ def _findsnapshots(revlog, cache, start_rev): """find snapshot from start_rev to tip""" - if util.safehasattr(revlog.index, 'findsnapshots'): + if util.safehasattr(revlog.index, b'findsnapshots'): revlog.index.findsnapshots(cache, start_rev) else: deltaparent = revlog.deltaparent