Patchwork D10806: verify: expand a one liner into explicit commands

login
register
mail settings
Submitter phabricator
Date June 1, 2021, 9:53 a.m.
Message ID <differential-rev-PHID-DREV-axjy7rpic6siozsntpvn-req@mercurial-scm.org>
Download mbox | patch
Permalink /patch/49126/
State Superseded
Headers show

Comments

phabricator - June 1, 2021, 9:53 a.m.
marmoute created this revision.
Herald added a reviewer: hg-reviewers.
Herald added a subscriber: mercurial-patches.

REVISION SUMMARY
  The result is not longer, but it is more edible.

REPOSITORY
  rHG Mercurial

BRANCH
  default

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

AFFECTED FILES
  mercurial/verify.py

CHANGE DETAILS




To: marmoute, #hg-reviewers
Cc: mercurial-patches, mercurial-devel

Patch

diff --git a/mercurial/verify.py b/mercurial/verify.py
--- a/mercurial/verify.py
+++ b/mercurial/verify.py
@@ -139,11 +139,10 @@ 
                 if f and len(linkrevs) > 1:
                     try:
                         # attempt to filter down to real linkrevs
-                        linkrevs = [
-                            l
-                            for l in linkrevs
-                            if self.lrugetctx(l)[f].filenode() == node
-                        ]
+                        linkrevs = []
+                        for lr in linkrevs:
+                            if self.lrugetctx(lr)[f].filenode() == node:
+                                linkrevs.append(lr)
                     except Exception:
                         pass
                 self._warn(