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.