changeset 11771:b0e3d3973440

tests: only run check-code on tracked files
author Matt Mackall <mpm@selenic.com>
date Mon, 09 Aug 2010 12:25:01 -0500
parents 4b8dc59e22b9
children 6a5e159eb93e
files tests/test-check-code-hg.py
diffstat 1 files changed, 5 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/tests/test-check-code-hg.py	Mon Aug 09 16:08:33 2010 +0200
+++ b/tests/test-check-code-hg.py	Mon Aug 09 12:25:01 2010 -0500
@@ -13,7 +13,11 @@
 u = ui.ui()
 repo = hg.repository(u, rootdir)
 checked = 0
-for f in repo[None]:
+wctx = repo[None]
+for f in wctx:
+    # ignore removed and unknown files
+    if f not in wctx:
+        continue
     checked += 1
     checkcode.checkfile(os.path.join(rootdir, f))
 if not checked: