comparison python/install_config.py @ 577:9b9b66c2c1fc

syntax
author Jeff Hammel <k0scist@gmail.com>
date Mon, 20 Jan 2014 14:27:47 -0800
parents be90af6dfd47
children c16238544fca
comparison
equal deleted inserted replaced
576:637c9fac3f8d 577:9b9b66c2c1fc
59 commands = [ 59 commands = [
60 ['hg', 'init'], 60 ['hg', 'init'],
61 ['hg', 'pull', SRC], 61 ['hg', 'pull', SRC],
62 ['hg', 'update', '-C'], 62 ['hg', 'update', '-C'],
63 ] 63 ]
64 @classmethd 64 @classmethod
65 def write_hgrc(self): 65 def write_hgrc(self):
66 hgrc = """[paths] 66 hgrc = """[paths]
67 default = http://k0s.org/hg/config 67 default = http://k0s.org/hg/config
68 default-push = ssh://k0s.org/hg/config 68 default-push = ssh://k0s.org/hg/config
69 """ 69 """
70 with file('.hg/hgrc', 'w') as f 70 with file('.hg/hgrc', 'w') as f:
71 f.write(hgrc) 71 f.write(hgrc)
72 def __call__(self): 72 def __call__(self):
73 Step.__call__(self) 73 Step.__call__(self)
74 self.write_hgrc() 74 self.write_hgrc()
75 75
76 # 76 #
77 # 77 #
78 #@requires(Command('git')) 78 #@requires(Command('git'))
79 #class GitInstall 79 #class GitInstall
80 80
81 ### legacy -v 81 ### legacy -v
82 82
83 commands = [ 83 commands = [
84 ['hg', 'init'], 84 ['hg', 'init'],
85 ['hg', 'pull', SRC], 85 ['hg', 'pull', SRC],