Mercurial > hg
comparison mercurial/ui.py @ 3346:1700a103458e
move the parsing of --config options to commands.py
author | Alexis S. L. Carvalho <alexis@cecm.usp.br> |
---|---|
date | Tue, 10 Oct 2006 18:43:20 -0300 |
parents | a09be4317f9c |
children | bce7c1b4c1c8 |
comparison
equal
deleted
inserted
replaced
3345:a09be4317f9c | 3346:1700a103458e |
---|---|
58 self.quiet = (self.quiet or quiet) and not verbose and not debug | 58 self.quiet = (self.quiet or quiet) and not verbose and not debug |
59 self.verbose = ((self.verbose or verbose) or debug) and not self.quiet | 59 self.verbose = ((self.verbose or verbose) or debug) and not self.quiet |
60 self.debugflag = (self.debugflag or debug) | 60 self.debugflag = (self.debugflag or debug) |
61 self.interactive = (self.interactive and interactive) | 61 self.interactive = (self.interactive and interactive) |
62 self.traceback = self.traceback or traceback | 62 self.traceback = self.traceback or traceback |
63 for cfg in config: | 63 for section, name, value in config: |
64 try: | 64 self.setconfig(section, name, value) |
65 name, value = cfg.split('=', 1) | |
66 section, name = name.split('.', 1) | |
67 if not section or not name: | |
68 raise IndexError | |
69 self.setconfig(section, name, value) | |
70 except (IndexError, ValueError): | |
71 raise util.Abort(_('malformed --config option: %s') % cfg) | |
72 | 65 |
73 def readconfig(self, fn, root=None): | 66 def readconfig(self, fn, root=None): |
74 if isinstance(fn, basestring): | 67 if isinstance(fn, basestring): |
75 fn = [fn] | 68 fn = [fn] |
76 for f in fn: | 69 for f in fn: |