Mercurial > public > mercurial-scm > hg
comparison tests/test-check-code-hg.py @ 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 | 8b03c988efb3 |
children |
comparison
equal
deleted
inserted
replaced
11770:4b8dc59e22b9 | 11771:b0e3d3973440 |
---|---|
11 | 11 |
12 from mercurial import hg, ui | 12 from mercurial import hg, ui |
13 u = ui.ui() | 13 u = ui.ui() |
14 repo = hg.repository(u, rootdir) | 14 repo = hg.repository(u, rootdir) |
15 checked = 0 | 15 checked = 0 |
16 for f in repo[None]: | 16 wctx = repo[None] |
17 for f in wctx: | |
18 # ignore removed and unknown files | |
19 if f not in wctx: | |
20 continue | |
17 checked += 1 | 21 checked += 1 |
18 checkcode.checkfile(os.path.join(rootdir, f)) | 22 checkcode.checkfile(os.path.join(rootdir, f)) |
19 if not checked: | 23 if not checked: |
20 sys.stderr.write('no file checked!\n') | 24 sys.stderr.write('no file checked!\n') |