Mercurial > hg
comparison mercurial/verify.py @ 47362:fb43853975b4
verify: use some intermediate variables instead of a multi-liner
This is shorter and easier to read as the indentation remains the same.
Differential Revision: https://phab.mercurial-scm.org/D10814
author | Pierre-Yves David <pierre-yves.david@octobus.net> |
---|---|
date | Tue, 01 Jun 2021 09:06:33 +0200 |
parents | bfb0ed91bb5e |
children | 9823b3489e90 |
comparison
equal
deleted
inserted
replaced
47361:bfb0ed91bb5e | 47362:fb43853975b4 |
---|---|
343 continue | 343 continue |
344 fullpath = dir + _normpath(f) | 344 fullpath = dir + _normpath(f) |
345 if fl == b't': | 345 if fl == b't': |
346 if not match.visitdir(fullpath): | 346 if not match.visitdir(fullpath): |
347 continue | 347 continue |
348 subdirnodes.setdefault(fullpath + b'/', {}).setdefault( | 348 sdn = subdirnodes.setdefault(fullpath + b'/', {}) |
349 fn, [] | 349 sdn.setdefault(fn, []).append(lr) |
350 ).append(lr) | |
351 else: | 350 else: |
352 if not match(fullpath): | 351 if not match(fullpath): |
353 continue | 352 continue |
354 filenodes.setdefault(fullpath, {}).setdefault(fn, lr) | 353 filenodes.setdefault(fullpath, {}).setdefault(fn, lr) |
355 except Exception as inst: | 354 except Exception as inst: |