Mercurial > hg
comparison mercurial/ui.py @ 8220:6e6ebeb52899
ui: ui.copy() now takes the ui class into account
Helps subclassing by other API users.
author | Ronny Pfannschmidt <Ronny.Pfannschmidt@gmx.de> |
---|---|
date | Mon, 27 Apr 2009 10:33:57 +0200 |
parents | 32a2a1e244f1 |
children | d30a21594812 |
comparison
equal
deleted
inserted
replaced
8219:21cf74ff2deb | 8220:6e6ebeb52899 |
---|---|
33 else: | 33 else: |
34 # we always trust global config files | 34 # we always trust global config files |
35 for f in util.rcpath(): | 35 for f in util.rcpath(): |
36 self.readconfig(f, trust=True) | 36 self.readconfig(f, trust=True) |
37 def copy(self): | 37 def copy(self): |
38 return ui(self) | 38 return self.__class__(self) |
39 | 39 |
40 def _is_trusted(self, fp, f): | 40 def _is_trusted(self, fp, f): |
41 st = util.fstat(fp) | 41 st = util.fstat(fp) |
42 if util.isowner(fp, st): | 42 if util.isowner(fp, st): |
43 return True | 43 return True |