mercurial/verify.py
changeset 47369 041d6515bb0f
parent 47368 1a0f177b300a
child 47370 ab5fd39cb402
equal deleted inserted replaced
47368:1a0f177b300a 47369:041d6515bb0f
    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 = _(
    49 WARN_UNKNOWN_COPY_SOURCE = _(
    50     b"warning: copy source of '%s' not in parents of %s"
    50     b"warning: copy source of '%s' not in parents of %s"
       
    51 )
       
    52 
       
    53 WARN_NULLID_COPY_SOURCE = _(
       
    54     b"warning: %s@%s: copy source revision is nullid %s:%s\n"
    51 )
    55 )
    52 
    56 
    53 
    57 
    54 class verifier(object):
    58 class verifier(object):
    55     def __init__(self, repo, level=None):
    59     def __init__(self, repo, level=None):
   555                         fl2 = repo.file(rp[0])
   559                         fl2 = repo.file(rp[0])
   556                         if not len(fl2):
   560                         if not len(fl2):
   557                             m = _(b"empty or missing copy source revlog %s:%s")
   561                             m = _(b"empty or missing copy source revlog %s:%s")
   558                             self._err(lr, m % (rp[0], short(rp[1])), f)
   562                             self._err(lr, m % (rp[0], short(rp[1])), f)
   559                         elif rp[1] == self.repo.nullid:
   563                         elif rp[1] == self.repo.nullid:
   560                             ui.note(
   564                             msg = WARN_NULLID_COPY_SOURCE
   561                                 _(
   565                             msg %= (f, lr, rp[0], short(rp[1]))
   562                                     b"warning: %s@%s: copy source"
   566                             ui.note(msg)
   563                                     b" revision is nullid %s:%s\n"
       
   564                                 )
       
   565                                 % (f, lr, rp[0], short(rp[1]))
       
   566                             )
       
   567                         else:
   567                         else:
   568                             fl2.rev(rp[1])
   568                             fl2.rev(rp[1])
   569                 except Exception as inst:
   569                 except Exception as inst:
   570                     self._exc(
   570                     self._exc(
   571                         lr, _(b"checking rename of %s") % short(n), inst, f
   571                         lr, _(b"checking rename of %s") % short(n), inst, f