# HG changeset patch # User Steve Borho # Date 1191349353 -7200 # Node ID 1df76921aab32ee607c9daeb30fb2769f575162d # Parent 8838fe5a236fe650c0c4329c7c08f156de8fc772 set_exec: do not chmod a symlink diff --git a/mercurial/util.py b/mercurial/util.py --- a/mercurial/util.py +++ b/mercurial/util.py @@ -14,7 +14,7 @@ platform-specific details from the core. 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 @@ else: 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