mercurial/util.py
changeset 5347 1df76921aab3
parent 5292 5a65d870871d
child 5355 efe7ef325737
--- a/mercurial/util.py	Sun Sep 30 16:36:22 2007 +0200
+++ b/mercurial/util.py	Tue Oct 02 20:22:33 2007 +0200
@@ -14,7 +14,7 @@
 
 from i18n import _
 import cStringIO, errno, getpass, popen2, re, shutil, sys, tempfile
-import os, threading, time, calendar, ConfigParser, locale, glob
+import os, stat, threading, time, calendar, ConfigParser, locale, glob
 
 try:
     set = set
@@ -1047,7 +1047,7 @@
 
     def set_exec(f, mode):
         s = os.lstat(f).st_mode
-        if (s & 0100 != 0) == mode:
+        if stat.S_ISLNK(s) or (s & 0100 != 0) == mode:
             return
         if mode:
             # Turn on +x for every +r bit when making a file executable