merge with stable
authorMartin Geisler <mg@lazybytes.net>
Sat, 12 Mar 2011 13:06:50 +0100
changeset 13595 241380fcc402
parent 13593 cc4721ed7a2a (current diff)
parent 13594 64a458707fd4 (diff)
child 13599 0bef8f69c078
merge with stable
--- a/hgext/eol.py	Sat Mar 12 12:46:31 2011 +0100
+++ b/hgext/eol.py	Sat Mar 12 13:06:50 2011 +0100
@@ -260,13 +260,15 @@
 
             if eolmtime > cachemtime:
                 ui.debug("eol: detected change in .hgeol\n")
-                # TODO: we could introduce a method for this in dirstate.
                 wlock = None
                 try:
                     wlock = self.wlock()
-                    for f, e in self.dirstate._map.iteritems():
-                        self.dirstate._map[f] = (e[0], e[1], -1, 0)
-                    self.dirstate._dirty = True
+                    for f in self.dirstate:
+                        if self.dirstate[f] == 'n':
+                            # all normal files need to be looked at
+                            # again since the new .hgeol file might no
+                            # longer match a file it matched before
+                            self.dirstate.normallookup(f)
                     # Touch the cache to update mtime.
                     self.opener("eol.cache", "w").close()
                     wlock.release()
--- a/setup.py	Sat Mar 12 12:46:31 2011 +0100
+++ b/setup.py	Sat Mar 12 13:06:50 2011 +0100
@@ -56,6 +56,7 @@
 from distutils.ccompiler import new_compiler
 from distutils.errors import CCompilerError
 from distutils.sysconfig import get_python_inc
+from distutils.version import StrictVersion
 
 scripts = ['hg']
 if os.name == 'nt':
@@ -373,6 +374,15 @@
     # form W.X.Y.Z, where W,X,Y,Z are numbers in the range 0..65535
     setupversion = version.split('+', 1)[0]
 
+if sys.platform == 'darwin' and os.path.exists('/usr/bin/xcodebuild'):
+    # XCode 4.0 dropped support for ppc architecture, which is hardcoded in
+    # distutils.sysconfig
+    version = runcmd(['/usr/bin/xcodebuild', '-version'], {}).splitlines()[0]
+    # Also parse only first digit, because 3.2.1 can't be parsed nicely
+    if (version.startswith('Xcode') and
+        StrictVersion(version.split()[1]) >= StrictVersion('4.0')):
+        os.environ['ARCHFLAGS'] = '-arch i386 -arch x86_64'
+
 setup(name='mercurial',
       version=setupversion,
       author='Matt Mackall',