Mercurial > hg
comparison hgext/absorb.py @ 41260:c146651a78e1
absorb: add a pycompat.bytestr() to fix --edit-lines functionality on Python 3
Differential Revision: https://phab.mercurial-scm.org/D5610
author | Augie Fackler <augie@google.com> |
---|---|
date | Wed, 16 Jan 2019 11:33:43 -0500 |
parents | e993a86cfcb8 |
children | 876494fd967d |
comparison
equal
deleted
inserted
replaced
41259:194e43c2bac9 | 41260:c146651a78e1 |
---|---|
487 if l.startswith('HG:'): | 487 if l.startswith('HG:'): |
488 continue | 488 continue |
489 if l[colonpos - 1:colonpos + 2] != ' : ': | 489 if l[colonpos - 1:colonpos + 2] != ' : ': |
490 raise error.Abort(_('malformed line: %s') % l) | 490 raise error.Abort(_('malformed line: %s') % l) |
491 linecontent = l[colonpos + 2:] | 491 linecontent = l[colonpos + 2:] |
492 for i, ch in enumerate(l[leftpadpos:colonpos - 1]): | 492 for i, ch in enumerate( |
493 pycompat.bytestr(l[leftpadpos:colonpos - 1])): | |
493 if ch == 'y': | 494 if ch == 'y': |
494 contents[visiblefctxs[i][0]] += linecontent | 495 contents[visiblefctxs[i][0]] += linecontent |
495 # chunkstats is hard to calculate if anything changes, therefore | 496 # chunkstats is hard to calculate if anything changes, therefore |
496 # set them to just a simple value (1, 1). | 497 # set them to just a simple value (1, 1). |
497 if editedtext != editortext: | 498 if editedtext != editortext: |