# HG changeset patch # User Matt Mackall <mpm@selenic.com> # Date 1281374701 18000 # Mon Aug 09 12:25:01 2010 -0500 # Node ID b0e3d3973440889da117b719097bb97fce36d918 # Parent 4b8dc59e22b946451c1b5e23b11d6f3572989909 tests: only run check-code on tracked files diff --git a/tests/test-check-code-hg.py b/tests/test-check-code-hg.py --- a/tests/test-check-code-hg.py +++ b/tests/test-check-code-hg.py @@ -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: