changeset 3744:d626fc9e3985

verify: add rename link checking
author Matt Mackall <mpm@selenic.com>
date Fri, 01 Dec 2006 02:35:46 -0600
parents 3a099154b110
children a095c13c173c
files mercurial/verify.py
diffstat 1 files changed, 12 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/verify.py	Fri Dec 01 02:24:56 2006 -0600
+++ b/mercurial/verify.py	Fri Dec 01 02:35:46 2006 -0600
@@ -179,6 +179,18 @@
                         (f, short(n), short(p1)))
             nodes[n] = 1
 
+            # check renames
+            try:
+                rp = fl.renamed(n)
+                if rp:
+                    fl2 = repo.file(rp[0])
+                    rev = fl2.rev(rp[1])
+            except KeyboardInterrupt:
+                repo.ui.warn(_("interrupted"))
+                raise
+            except Exception, inst:
+                err(_("checking rename on file %s %s: %s") % (f, short(n), inst))
+
         # cross-check
         for node in filenodes[f]:
             err(_("node %s in manifests not in %s") % (hex(node), f))