comparison python/hgrc.py @ 487:178419da6e0b

python/hgrc.py
author Jeff Hammel <jhammel@mozilla.com>
date Sat, 10 Aug 2013 21:25:40 -0700
parents c9aab7092af1
children 5f288c70acb6
comparison
equal deleted inserted replaced
486:c9aab7092af1 487:178419da6e0b
31 31
32 #@parser # decorator makes this x-form path -> ConfigParser automagically 32 #@parser # decorator makes this x-form path -> ConfigParser automagically
33 @section('paths') 33 @section('paths')
34 def set_default(parser, default): 34 def set_default(parser, default):
35 """set [paths]:default""" 35 """set [paths]:default"""
36 print 'OIOIOIOI!' 36 parser.set('paths', 'default-push', default_push)
37
37 38
38 @section('paths') 39 @section('paths')
39 def set_default_push(parser, default_push): 40 def set_default_push(parser, default_push):
40 """ 41 """
41 set [paths]:default-push to `default_push` 42 set [paths]:default-push to `default_push`
42 """ 43 """
43 if 'paths' not in parser.sections():
44 parser.add_section('paths')
45 parser.set('paths', 'default-push', default_push) 44 parser.set('paths', 'default-push', default_push)
46 45
47 46
48 def set_default_push_to_ssh(parser): 47 def set_default_push_to_ssh(parser):
49 """ 48 """