Mercurial > hgsubversion
comparison tests/test_util.py @ 1041:70090e2ee262
tests: assert that fetches actually succeed
author | Dan Villiom Podlaski Christiansen <dan@cabo.dk> |
---|---|
date | Fri, 02 Aug 2013 16:39:11 +0200 |
parents | aa043f64d8b7 |
children | 903c9c9dfe6a |
comparison
equal
deleted
inserted
replaced
1040:ada2400241c4 | 1041:70090e2ee262 |
---|---|
169 u.setconfig('hgsubversion', 'startrev', startrev) | 169 u.setconfig('hgsubversion', 'startrev', startrev) |
170 return u | 170 return u |
171 | 171 |
172 def dispatch(cmd): | 172 def dispatch(cmd): |
173 cmd = getattr(dispatchmod, 'request', lambda x: x)(cmd) | 173 cmd = getattr(dispatchmod, 'request', lambda x: x)(cmd) |
174 dispatchmod.dispatch(cmd) | 174 return dispatchmod.dispatch(cmd) |
175 | 175 |
176 def rmtree(path): | 176 def rmtree(path): |
177 # Read-only files cannot be removed under Windows | 177 # Read-only files cannot be removed under Windows |
178 for root, dirs, files in os.walk(path): | 178 for root, dirs, files in os.walk(path): |
179 for f in files: | 179 for f in files: |
368 if externals: | 368 if externals: |
369 config['hgsubversion.externals'] = str(externals) | 369 config['hgsubversion.externals'] = str(externals) |
370 for k,v in reversed(sorted(config.iteritems())): | 370 for k,v in reversed(sorted(config.iteritems())): |
371 cmd[:0] = ['--config', '%s=%s' % (k, v)] | 371 cmd[:0] = ['--config', '%s=%s' % (k, v)] |
372 | 372 |
373 dispatch(cmd) | 373 r = dispatch(cmd) |
374 assert not r, 'fetch of %s failed' % projectpath | |
374 | 375 |
375 return hg.repository(testui(), self.wc_path) | 376 return hg.repository(testui(), self.wc_path) |
376 | 377 |
377 def load_and_fetch(self, fixture_name, *args, **opts): | 378 def load_and_fetch(self, fixture_name, *args, **opts): |
378 if fixture_name.endswith('.svndump'): | 379 if fixture_name.endswith('.svndump'): |