Mercurial > public > mercurial-scm > hg
comparison hgext/phabricator.py @ 41906:2b21c7fbb3a1
py3: use % instead of .format() on a bytestring
Differential Revision: https://phab.mercurial-scm.org/D6112
author | Ian Moody <moz-ian@perix.co.uk> |
---|---|
date | Sat, 09 Mar 2019 02:07:09 +0000 |
parents | 16d050678047 |
children | e7b84ffb06d9 |
comparison
equal
deleted
inserted
replaced
41905:16d050678047 | 41906:2b21c7fbb3a1 |
---|---|
1000 ctx = context.resource(mapping, b'ctx') | 1000 ctx = context.resource(mapping, b'ctx') |
1001 m = _differentialrevisiondescre.search(ctx.description()) | 1001 m = _differentialrevisiondescre.search(ctx.description()) |
1002 if m: | 1002 if m: |
1003 return templateutil.hybriddict({ | 1003 return templateutil.hybriddict({ |
1004 b'url': m.group(r'url'), | 1004 b'url': m.group(r'url'), |
1005 b'id': b"D{}".format(m.group(r'id')), | 1005 b'id': b"D%s" % m.group(r'id'), |
1006 }) | 1006 }) |
1007 else: | 1007 else: |
1008 tags = ctx.repo().nodetags(ctx.node()) | 1008 tags = ctx.repo().nodetags(ctx.node()) |
1009 for t in tags: | 1009 for t in tags: |
1010 if _differentialrevisiontagre.match(t): | 1010 if _differentialrevisiontagre.match(t): |