comparison tests/test_util.py @ 908:c4ee11a5d04c

pull: add a hgsubversion.unsafeskip option to omit unwanted revs
author Bryan O'Sullivan <bryano@fb.com>
date Wed, 16 May 2012 16:52:25 -0700
parents 04dfc23688b9
children 312f36a425f0
comparison
equal deleted inserted replaced
907:173065f9b715 908:c4ee11a5d04c
300 stdout=subprocess.PIPE, stderr=subprocess.STDOUT) 300 stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
301 proc.communicate() 301 proc.communicate()
302 return path 302 return path
303 303
304 def fetch(self, repo_path, subdir=None, stupid=False, layout='auto', startrev=0, 304 def fetch(self, repo_path, subdir=None, stupid=False, layout='auto', startrev=0,
305 externals=None, noupdate=True, dest=None): 305 externals=None, noupdate=True, dest=None, rev=None):
306 if layout == 'single': 306 if layout == 'single':
307 if subdir is None: 307 if subdir is None:
308 subdir = 'trunk' 308 subdir = 'trunk'
309 elif subdir is None: 309 elif subdir is None:
310 subdir = '' 310 subdir = ''
321 ] 321 ]
322 if stupid: 322 if stupid:
323 cmd.append('--stupid') 323 cmd.append('--stupid')
324 if noupdate: 324 if noupdate:
325 cmd.append('--noupdate') 325 cmd.append('--noupdate')
326 if rev is not None:
327 cmd.append('--rev=%s' % rev)
326 if externals: 328 if externals:
327 cmd[:0] = ['--config', 'hgsubversion.externals=%s' % externals] 329 cmd[:0] = ['--config', 'hgsubversion.externals=%s' % externals]
328 330
329 dispatch(cmd) 331 dispatch(cmd)
330 332