Patchwork D10814: verify: use some intermediate variables instead of a multi-liner

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

Comments

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

REVISION SUMMARY
  This is shorter and easier to read as the indentation remains the same.

REPOSITORY
  rHG Mercurial

BRANCH
  default

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

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
@@ -345,9 +345,8 @@ 
                     if fl == b't':
                         if not match.visitdir(fullpath):
                             continue
-                        subdirnodes.setdefault(fullpath + b'/', {}).setdefault(
-                            fn, []
-                        ).append(lr)
+                        sdn = subdirnodes.setdefault(fullpath + b'/', {})
+                        sdn.setdefault(fn, []).append(lr)
                     else:
                         if not match(fullpath):
                             continue