hgext/phabricator.py
changeset 41164 43fd1947301d
parent 41163 0101a35deae2
child 41387 876494fd967d
--- a/hgext/phabricator.py	Sat Jan 05 15:20:33 2019 -0500
+++ b/hgext/phabricator.py	Sat Jan 05 19:50:30 2019 -0500
@@ -997,3 +997,17 @@
             b'url': m.group(b'url'),
             b'id': b"D{}".format(m.group(b'id')),
         })
+    else:
+        tags = ctx.repo().nodetags(ctx.node())
+        for t in tags:
+            if _differentialrevisiontagre.match(t):
+                url = ctx.repo().ui.config(b'phabricator', b'url')
+                if not url.endswith(b'/'):
+                    url += b'/'
+                url += t
+
+                return templateutil.hybriddict({
+                    b'url': url,
+                    b'id': t,
+                })
+    return None