Mercurial > hg
changeset 41905:16d050678047
py3: use r'' for group name arguments to MatchObjects in phabricator.py
MatchObject group names are strings, not bytes. Using bytes in py3 leads to an
IndexError.
Differential Revision: https://phab.mercurial-scm.org/D6111
author | Ian Moody <moz-ian@perix.co.uk> |
---|---|
date | Fri, 08 Mar 2019 22:26:43 +0000 |
parents | 634b56b54e7c |
children | 2b21c7fbb3a1 |
files | hgext/phabricator.py |
diffstat | 1 files changed, 4 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/hgext/phabricator.py Sat Mar 09 01:58:51 2019 +0000 +++ b/hgext/phabricator.py Fri Mar 08 22:26:43 2019 +0000 @@ -304,7 +304,7 @@ # Check commit message m = _differentialrevisiondescre.search(ctx.description()) if m: - toconfirm[node] = (1, set(precnodes), int(m.group(b'id'))) + toconfirm[node] = (1, set(precnodes), int(m.group(r'id'))) # Double check if tags are genuine by collecting all old nodes from # Phabricator, and expect precursors overlap with it. @@ -555,7 +555,7 @@ # Create a local tag to note the association, if commit message # does not have it already m = _differentialrevisiondescre.search(ctx.description()) - if not m or int(m.group(b'id')) != newrevid: + if not m or int(m.group(r'id')) != newrevid: tagname = b'D%d' % newrevid tags.tag(repo, tagname, ctx.node(), message=None, user=None, date=None, local=True) @@ -1001,8 +1001,8 @@ m = _differentialrevisiondescre.search(ctx.description()) if m: return templateutil.hybriddict({ - b'url': m.group(b'url'), - b'id': b"D{}".format(m.group(b'id')), + b'url': m.group(r'url'), + b'id': b"D{}".format(m.group(r'id')), }) else: tags = ctx.repo().nodetags(ctx.node())