##// END OF EJS Templates
phabricator: use named group for parsing differential reviews lines...
Tom Prince -
r35644:a0d33f4d default
parent child Browse files
Show More
@@ -166,7 +166,7 b' def getrepophid(repo):'
166
166
167 _differentialrevisiontagre = re.compile('\AD([1-9][0-9]*)\Z')
167 _differentialrevisiontagre = re.compile('\AD([1-9][0-9]*)\Z')
168 _differentialrevisiondescre = re.compile(
168 _differentialrevisiondescre = re.compile(
169 '^Differential Revision:\s*(?:.*)D([1-9][0-9]*)$', re.M)
169 '^Differential Revision:\s*(?P<url>(?:.*)D(?P<id>[1-9][0-9]*))$', re.M)
170
170
171 def getoldnodedrevmap(repo, nodelist):
171 def getoldnodedrevmap(repo, nodelist):
172 """find previous nodes that has been sent to Phabricator
172 """find previous nodes that has been sent to Phabricator
@@ -207,7 +207,7 b' def getoldnodedrevmap(repo, nodelist):'
207 # Check commit message
207 # Check commit message
208 m = _differentialrevisiondescre.search(ctx.description())
208 m = _differentialrevisiondescre.search(ctx.description())
209 if m:
209 if m:
210 toconfirm[node] = (1, set(precnodes), int(m.group(1)))
210 toconfirm[node] = (1, set(precnodes), int(m.group('id')))
211
211
212 # Double check if tags are genuine by collecting all old nodes from
212 # Double check if tags are genuine by collecting all old nodes from
213 # Phabricator, and expect precursors overlap with it.
213 # Phabricator, and expect precursors overlap with it.
@@ -442,7 +442,7 b' def phabsend(ui, repo, *revs, **opts):'
442 # Create a local tag to note the association, if commit message
442 # Create a local tag to note the association, if commit message
443 # does not have it already
443 # does not have it already
444 m = _differentialrevisiondescre.search(ctx.description())
444 m = _differentialrevisiondescre.search(ctx.description())
445 if not m or int(m.group(1)) != newrevid:
445 if not m or int(m.group('id')) != newrevid:
446 tagname = 'D%d' % newrevid
446 tagname = 'D%d' % newrevid
447 tags.tag(repo, tagname, ctx.node(), message=None, user=None,
447 tags.tag(repo, tagname, ctx.node(), message=None, user=None,
448 date=None, local=True)
448 date=None, local=True)
General Comments 0
You need to be logged in to leave comments. Login now