mercurial/verify.py
changeset 47367 34a92e84267e
parent 47366 15f6887c9c68
child 47368 1a0f177b300a
equal deleted inserted replaced
47366:15f6887c9c68 47367:34a92e84267e
    42     b'hint: run "hg debugrebuildfncache" to recover from corrupt fncache\n'
    42     b'hint: run "hg debugrebuildfncache" to recover from corrupt fncache\n'
    43 )
    43 )
    44 
    44 
    45 WARN_PARENT_DIR_UNKNOWN_REV = _(
    45 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 )
       
    48 
       
    49 WARN_UNKNOWN_COPY_SOURCE = _(
       
    50     b"warning: copy source of '%s' not in parents of %s"
    47 )
    51 )
    48 
    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):
   545                     rp = fl.renamed(n)
   549                     rp = fl.renamed(n)
   546                     if rp:
   550                     if rp:
   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(
   560                                 lr,
   558                                 lr,
   561                                 _(
   559                                 _(