diff mercurial/patch.py @ 14531:b88368a3ade4

patch: remove redundant islink() call
author Patrick Mezard <pmezard@gmail.com>
date Sun, 05 Jun 2011 13:27:06 +0200
parents 1ffeeb91c55d
children aa12e1bbde10
line wrap: on
line diff
--- a/mercurial/patch.py	Sat Jun 04 20:01:01 2011 +0900
+++ b/mercurial/patch.py	Sun Jun 05 13:27:06 2011 +0200
@@ -396,14 +396,13 @@
         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