D7513: phabricator: fix processing of tags/desc in getoldnodedrevmap()

dlax (Denis Laxalde) phabricator at mercurial-scm.org
Tue Dec 10 11:17:45 EST 2019


Closed by commit rHG16b607e9f714: phabricator: fix processing of tags/desc in getoldnodedrevmap() (authored by dlax).
This revision was automatically updated to reflect the committed changes.

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D7513?vs=18339&id=18580

CHANGES SINCE LAST ACTION
  https://phab.mercurial-scm.org/D7513/new/

REVISION DETAIL
  https://phab.mercurial-scm.org/D7513

AFFECTED FILES
  hgext/phabricator.py

CHANGE DETAILS

diff --git a/hgext/phabricator.py b/hgext/phabricator.py
--- a/hgext/phabricator.py
+++ b/hgext/phabricator.py
@@ -403,12 +403,15 @@
                     m = _differentialrevisiontagre.match(tag)
                     if m:
                         toconfirm[node] = (0, set(precnodes), int(m.group(1)))
-                        continue
-
-        # Check commit message
-        m = _differentialrevisiondescre.search(ctx.description())
-        if m:
-            toconfirm[node] = (1, set(precnodes), int(m.group('id')))
+                        break
+                else:
+                    continue  # move to next predecessor
+                break  # found a tag, stop
+        else:
+            # Check commit message
+            m = _differentialrevisiondescre.search(ctx.description())
+            if m:
+                toconfirm[node] = (1, set(precnodes), int(m.group('id')))
 
     # Double check if tags are genuine by collecting all old nodes from
     # Phabricator, and expect precursors overlap with it.



To: dlax, #hg-reviewers, pulkit
Cc: Kwan, mercurial-devel


More information about the Mercurial-devel mailing list