Mercurial > hg > mercurial-crew-with-dirclash
diff mercurial/ui.py @ 1637:3b1b44b917f4
Add new bdiff based unidiff generation.
author | mason@suse.com |
---|---|
date | Tue, 24 Jan 2006 15:02:10 +1300 |
parents | c50bddfbc812 |
children | 6f67a4c93493 876e4e6ad82b e4abeafd6eb1 |
line wrap: on
line diff
--- a/mercurial/ui.py +++ b/mercurial/ui.py @@ -23,6 +23,7 @@ class ui(object): self.interactive = self.configbool("ui", "interactive", True) self.updateopts(verbose, debug, quiet, interactive) + self.diffcache = None def updateopts(self, verbose=False, debug=False, quiet=False, interactive=True): @@ -76,6 +77,23 @@ class ui(object): def extensions(self): return self.configitems("extensions") + def diffopts(self): + if self.diffcache: + return self.diffcache + ret = { 'showfunc' : True, 'ignorews' : False} + for x in self.configitems("diff"): + k = x[0].lower() + v = x[1] + if v: + v = v.lower() + if v == 'true': + value = True + else: + value = False + ret[k] = value + self.diffcache = ret + return ret + def username(self): return (os.environ.get("HGUSER") or self.config("ui", "username") or