comparison silvermirror/hg.py @ 31:2adda506392b

STUB: silvermirror/hg.py
author Jeff Hammel <k0scist@gmail.com>
date Fri, 31 Jan 2014 20:34:34 -0800
parents 19ee8dfe2325
children fa1fe03ad924
comparison
equal deleted inserted replaced
30:19ee8dfe2325 31:2adda506392b
18 18
19 def update(host, path): 19 def update(host, path):
20 """ 20 """
21 get changes from host on path 21 get changes from host on path
22 """ 22 """
23 _ui = ui.ui()
24 url = '%s/%s' % (host, path) 23 url = '%s/%s' % (host, path)
25 try: 24 try:
26 repo = hg.repository(_ui, path) 25 repo = hg.repository(path)
27 print 'Updating %s:' % path 26 print ('Updating {}:'.format(path))
28 except Exception, e: 27 except Exception, e:
29 import pdb;pdb.set_trace()
30 repo = hg.repository(_ui, url) 28 repo = hg.repository(_ui, url)
31 print ('Cloning {}:'.format(path)) 29 print ('Cloning {} -> {}'.format(url, path))
32 commands.clone(_ui, repo, pull=False, uncompressed=False, rev=None, noupdate=False) 30 commands.clone(_ui, repo, pull=False, uncompressed=False, rev=None, noupdate=False)
33 return 31 return
34 32
35 commands.pull(_ui, repo, url, rev=None, force=False, update=True) 33 commands.pull(_ui, repo, url, rev=None, force=False, update=True)
36 34