patch: remove redundant islink() call
authorPatrick Mezard <pmezard@gmail.com>
Sun, 05 Jun 2011 13:27:06 +0200
changeset 14531 b88368a3ade4
parent 14530 cd31a1cc1521
child 14532 2498128821a9
patch: remove redundant islink() call
mercurial/patch.py
--- 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