# HG changeset patch # User Augie Fackler # Date 2019-01-16 16:33:43 # Node ID c146651a78e12840902da95acef712c8fec48624 # Parent 194e43c2bac9c0d3b68898dc72a9d20e2b281ac5 absorb: add a pycompat.bytestr() to fix --edit-lines functionality on Python 3 Differential Revision: https://phab.mercurial-scm.org/D5610 diff --git a/contrib/python3-whitelist b/contrib/python3-whitelist --- a/contrib/python3-whitelist +++ b/contrib/python3-whitelist @@ -1,4 +1,5 @@ test-abort-checkin.t +test-absorb-edit-lines.t test-absorb-filefixupstate.py test-absorb-phase.t test-absorb-rename.t diff --git a/hgext/absorb.py b/hgext/absorb.py --- a/hgext/absorb.py +++ b/hgext/absorb.py @@ -489,7 +489,8 @@ class filefixupstate(object): if l[colonpos - 1:colonpos + 2] != ' : ': raise error.Abort(_('malformed line: %s') % l) linecontent = l[colonpos + 2:] - for i, ch in enumerate(l[leftpadpos:colonpos - 1]): + for i, ch in enumerate( + pycompat.bytestr(l[leftpadpos:colonpos - 1])): if ch == 'y': contents[visiblefctxs[i][0]] += linecontent # chunkstats is hard to calculate if anything changes, therefore