Mercurial > hg-stable
comparison mercurial/verify.py @ 36372:a4d41ba4ad23
verify: don't reimplement any()
Differential Revision: https://phab.mercurial-scm.org/D2372
author | Martin von Zweigbergk <martinvonz@google.com> |
---|---|
date | Tue, 06 Feb 2018 08:49:37 -0800 |
parents | acc8e6e52af6 |
children | d85ef895d5f6 |
comparison
equal
deleted
inserted
replaced
36371:ddd9474d2e08 | 36372:a4d41ba4ad23 |
---|---|
454 # check renames | 454 # check renames |
455 try: | 455 try: |
456 if rp: | 456 if rp: |
457 if lr is not None and ui.verbose: | 457 if lr is not None and ui.verbose: |
458 ctx = lrugetctx(lr) | 458 ctx = lrugetctx(lr) |
459 found = False | 459 if not any(rp[0] in pctx for pctx in ctx.parents()): |
460 for pctx in ctx.parents(): | |
461 if rp[0] in pctx: | |
462 found = True | |
463 break | |
464 if not found: | |
465 self.warn(_("warning: copy source of '%s' not" | 460 self.warn(_("warning: copy source of '%s' not" |
466 " in parents of %s") % (f, ctx)) | 461 " in parents of %s") % (f, ctx)) |
467 fl2 = repo.file(rp[0]) | 462 fl2 = repo.file(rp[0]) |
468 if not len(fl2): | 463 if not len(fl2): |
469 self.err(lr, _("empty or missing copy source " | 464 self.err(lr, _("empty or missing copy source " |