##// END OF EJS Templates
verify: use some intermediate variables instead of a multi-liner...
marmoute -
r48156:34a92e84 default
parent child Browse files
Show More
@@ -46,6 +46,10 b' WARN_PARENT_DIR_UNKNOWN_REV = _('
46 b"parent-directory manifest refers to unknown revision %s"
46 b"parent-directory manifest refers to unknown revision %s"
47 )
47 )
48
48
49 WARN_UNKNOWN_COPY_SOURCE = _(
50 b"warning: copy source of '%s' not in parents of %s"
51 )
52
49
53
50 class verifier(object):
54 class verifier(object):
51 def __init__(self, repo, level=None):
55 def __init__(self, repo, level=None):
@@ -547,13 +551,7 b' class verifier(object):'
547 if lr is not None and ui.verbose:
551 if lr is not None and ui.verbose:
548 ctx = lrugetctx(lr)
552 ctx = lrugetctx(lr)
549 if not any(rp[0] in pctx for pctx in ctx.parents()):
553 if not any(rp[0] in pctx for pctx in ctx.parents()):
550 self._warn(
554 self._warn(WARN_UNKNOWN_COPY_SOURCE % (f, ctx))
551 _(
552 b"warning: copy source of '%s' not"
553 b" in parents of %s"
554 )
555 % (f, ctx)
556 )
557 fl2 = repo.file(rp[0])
555 fl2 = repo.file(rp[0])
558 if not len(fl2):
556 if not len(fl2):
559 self._err(
557 self._err(
General Comments 0
You need to be logged in to leave comments. Login now