Mercurial > hgsubversion
comparison tests/test_util.py @ 772:f3af4fe98d37
test_util: make manifest filter use shared list of files to ignore
author | Dan Villiom Podlaski Christiansen <danchr@gmail.com> |
---|---|
date | Tue, 30 Nov 2010 02:54:11 +0100 |
parents | bc5c176b63eb |
children | e698be84c22d |
comparison
equal
deleted
inserted
replaced
771:768639283275 | 772:f3af4fe98d37 |
---|---|
21 from mercurial import dispatch | 21 from mercurial import dispatch |
22 from mercurial import hg | 22 from mercurial import hg |
23 from mercurial import i18n | 23 from mercurial import i18n |
24 from mercurial import node | 24 from mercurial import node |
25 from mercurial import ui | 25 from mercurial import ui |
26 from mercurial import util | |
26 from mercurial import extensions | 27 from mercurial import extensions |
27 | 28 |
28 try: | 29 try: |
29 SkipTest = unittest.SkipTest | 30 SkipTest = unittest.SkipTest |
30 except AttributeError: | 31 except AttributeError: |
135 if not isinstance(option, str): | 136 if not isinstance(option, str): |
136 raise TypeError('requiresoption takes a string argument') | 137 raise TypeError('requiresoption takes a string argument') |
137 return decorator | 138 return decorator |
138 | 139 |
139 def filtermanifest(manifest): | 140 def filtermanifest(manifest): |
140 return filter(lambda x: x not in ('.hgtags', '.hgsvnexternals', ), | 141 return [f for f in manifest if f not in util.ignoredfiles] |
141 manifest) | |
142 | 142 |
143 def fileurl(path): | 143 def fileurl(path): |
144 path = os.path.abspath(path).replace(os.sep, '/') | 144 path = os.path.abspath(path).replace(os.sep, '/') |
145 drive, path = os.path.splitdrive(path) | 145 drive, path = os.path.splitdrive(path) |
146 if drive: | 146 if drive: |