Merge with stable
authorChristian Ebert <blacktrash@gmx.net>
Thu, 10 Jan 2013 16:02:08 +0000
changeset 1191 0cdba0354b87
parent 1185 5ac75dd311d5 (current diff)
parent 1190 ecb744c2a199 (diff)
child 1192 5eb5ba3b9e99
Merge with stable
--- a/tests/hghave.py	Mon Jan 07 23:30:00 2013 +0000
+++ b/tests/hghave.py	Thu Jan 10 16:02:08 2013 +0000
@@ -41,6 +41,10 @@
     re = r'Concurrent Versions System.*?server'
     return matchoutput('cvs --version 2>&1', re) and not has_msys()
 
+def has_cvs112():
+    re = r'Concurrent Versions System \(CVS\) 1.12.*?server'
+    return matchoutput('cvs --version 2>&1', re) and not has_msys()
+
 def has_darcs():
     return matchoutput('darcs --version', r'2\.[2-9]', True)
 
@@ -278,6 +282,7 @@
     "bzr114": (has_bzr114, "Canonical's Bazaar client >= 1.14"),
     "cacheable": (has_cacheable_fs, "cacheable filesystem"),
     "cvs": (has_cvs, "cvs client/server"),
+    "cvs112": (has_cvs112, "cvs client/server >= 1.12"),
     "darcs": (has_darcs, "darcs client"),
     "docutils": (has_docutils, "Docutils text processing library"),
     "eol-in-paths": (has_eol_in_paths, "end-of-lines in paths"),
--- a/tests/run-tests.py	Mon Jan 07 23:30:00 2013 +0000
+++ b/tests/run-tests.py	Thu Jan 10 16:02:08 2013 +0000
@@ -356,33 +356,35 @@
 def usecorrectpython():
     # some tests run python interpreter. they must use same
     # interpreter we use or bad things will happen.
-    exedir, exename = os.path.split(sys.executable)
-    if exename in ('python', 'python.exe'):
-        path = findprogram(exename)
-        if os.path.dirname(path) == exedir:
-            return
-    else:
-        exename = 'python'
-        if sys.platform == 'win32':
-            exename = 'python.exe'
+    pyexename = sys.platform == 'win32' and 'python.exe' or 'python'
     if getattr(os, 'symlink', None):
         vlog("# Making python executable in test path a symlink to '%s'" %
              sys.executable)
-        mypython = os.path.join(BINDIR, exename)
+        mypython = os.path.join(BINDIR, pyexename)
         try:
-            os.symlink(sys.executable, mypython)
+            if os.readlink(mypython) == sys.executable:
+                return
+            os.unlink(mypython)
         except OSError, err:
-            # child processes may race, which is harmless
-            if err.errno != errno.EEXIST:
+            if err.errno != errno.ENOENT:
                 raise
+        if findprogram(pyexename) != sys.executable:
+            try:
+                os.symlink(sys.executable, mypython)
+            except OSError, err:
+                # child processes may race, which is harmless
+                if err.errno != errno.EEXIST:
+                    raise
     else:
-        vlog("# Modifying search path to find %s in '%s'" % (exename, exedir))
+        exedir, exename = os.path.split(sys.executable)
+        vlog("# Modifying search path to find %s as %s in '%s'" %
+             (exename, pyexename, exedir))
         path = os.environ['PATH'].split(os.pathsep)
         while exedir in path:
             path.remove(exedir)
         os.environ['PATH'] = os.pathsep.join([exedir] + path)
-        if not findprogram(exename):
-            print "WARNING: Cannot find %s in search path" % exename
+        if not findprogram(pyexename):
+            print "WARNING: Cannot find %s in search path" % pyexename
 
 def installhg(options):
     vlog("# Performing temporary installation of HG")
--- a/tests/test-keyword.t	Mon Jan 07 23:30:00 2013 +0000
+++ b/tests/test-keyword.t	Thu Jan 10 16:02:08 2013 +0000
@@ -576,6 +576,7 @@
 Commit and show expansion in original and copy
 
   $ hg --debug commit -ma2c -d '1 0' -u 'User Name <user@example.com>'
+  invalid branchheads cache (unserved): tip differs
   c
    c: copy a:0045e12f6c5791aac80ca6cbfd97709a88307292
   overwriting c expanding keywords
@@ -746,10 +747,23 @@
 
 Commit with multi-line message and custom expansion
 
+|Note:
+|
+| After the last rollback, the "unserved" branchheads cache became invalid, but
+| all changeset in the repo were public. So filtering wise:
+|   "mutable" == "unserved" == ΓΈ.
+|
+| As the "unserved" cache is invalid, we fall back to "mutable" cache. But not
+| update is needed between "mutable" and "unserved" cache and the "unserved"
+| cache is not updated on disk. The on disk version therefor stay invalid for
+| some time. This explains why the "unserved" branchheads cache is detect
+| invalid here.
+
   $ hg --debug commit -l log -d '2 0' -u 'User Name <user@example.com>'
-  invalid branchheads cache: tip differs
+  invalid branchheads cache (unserved): tip differs
   a
   invalid branchheads cache: tip differs
+  invalid branchheads cache (unserved): tip differs
   overwriting a expanding keywords
   committed changeset 2:bb948857c743469b22bbf51f7ec8112279ca5d83
   $ rm log
@@ -792,7 +806,6 @@
   $ hg remove a
   $ hg --debug commit -m rma
   invalid branchheads cache: tip differs
-  invalid branchheads cache: tip differs
   committed changeset 3:d14c712653769de926994cf7fbb06c8fbd68f012
   $ hg status
   ? c
@@ -903,7 +916,6 @@
   [255]
   $ cd x
   $ hg --debug commit -m xa -d '3 0' -u 'User Name <user@example.com>'
-  invalid branchheads cache: tip differs
   x/a
    x/a: copy a:779c764182ce5d43e2b1eb66ce06d7b47bfe342e
   invalid branchheads cache: tip differs