Mercurial > hg
comparison mercurial/ui.py @ 8657:3fa92c618624
posix: do not use fstat in isowner
The fstat function was undefined, but never used since a stat object
was always passed in the optional st argument. Passing st is now
mandatory.
This bug crept in when util was split up into posix and windows
modules. The fstat function is still defined in util, but importing it
into posix would create an import cycle which seems unnecessary.
author | Martin Geisler <mg@lazybytes.net> |
---|---|
date | Sat, 30 May 2009 23:42:35 +0200 |
parents | 284fda4cd093 |
children | 01ada7b1861d |
comparison
equal
deleted
inserted
replaced
8656:284fda4cd093 | 8657:3fa92c618624 |
---|---|
38 def copy(self): | 38 def copy(self): |
39 return self.__class__(self) | 39 return self.__class__(self) |
40 | 40 |
41 def _is_trusted(self, fp, f): | 41 def _is_trusted(self, fp, f): |
42 st = util.fstat(fp) | 42 st = util.fstat(fp) |
43 if util.isowner(fp, st): | 43 if util.isowner(st): |
44 return True | 44 return True |
45 | 45 |
46 tusers, tgroups = self._trustusers, self._trustgroups | 46 tusers, tgroups = self._trustusers, self._trustgroups |
47 if '*' in tusers or '*' in tgroups: | 47 if '*' in tusers or '*' in tgroups: |
48 return True | 48 return True |