changeset 480:529fd4e1087e

python/hgrc.py
author Jeff Hammel <jhammel@mozilla.com>
date Sat, 10 Aug 2013 20:35:50 -0700
parents 0a9e1e0d077c
children 65e38d33acae
files python/hgrc.py
diffstat 1 files changed, 9 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/python/hgrc.py	Sat Aug 10 19:51:35 2013 -0700
+++ b/python/hgrc.py	Sat Aug 10 20:35:50 2013 -0700
@@ -14,8 +14,16 @@
 import urlparse
 from ConfigParser import RawConfigParser as ConfigParser
 
+class section(object):
+    def __init__(self, function, section_name, *section_names):
+        self.function = function
+        self.sections = [section_name]
+        self.sections.extend(section_names)
+    def __call__(self, parser):
+        import pdb; pdb.set_trace()
+
 #@parser # decorator makes this x-form path -> ConfigParser automagically
-#@section('paths')
+@section('paths')
 def set_default(parser, default):
     """set [paths]:default"""