# HG changeset patch # User Patrick Mezard # Date 2011-06-05 11:27:06 # Node ID b88368a3ade4b748c8e01cf0453158f80e558a7a # Parent cd31a1cc15217a120cf58a5cd6ebb25c6ca270bf patch: remove redundant islink() call diff --git a/mercurial/patch.py b/mercurial/patch.py --- a/mercurial/patch.py +++ b/mercurial/patch.py @@ -396,14 +396,13 @@ class fsbackend(abstractbackend): path = self._join(fname) if os.path.islink(path): return (os.readlink(path), (True, False)) - isexec, islink = False, False + isexec = False try: isexec = os.lstat(path).st_mode & 0100 != 0 - islink = os.path.islink(path) except OSError, e: if e.errno != errno.ENOENT: raise - return (self.opener.read(fname), (islink, isexec)) + return (self.opener.read(fname), (False, isexec)) def setfile(self, fname, data, mode, copysource): islink, isexec = mode