Merge with stable
authorChristian Ebert <blacktrash@gmx.net>
Wed, 16 Jan 2013 20:56:02 +0000
changeset 1202 e475cc6eff08
parent 1192 5eb5ba3b9e99 (current diff)
parent 1201 6f2f7246e4be (diff)
child 1205 531804688bf5
Merge with stable
--- a/tests/get-with-headers.py	Thu Jan 10 16:25:06 2013 +0000
+++ b/tests/get-with-headers.py	Wed Jan 16 20:56:02 2013 +0000
@@ -16,6 +16,10 @@
 if '--twice' in sys.argv:
     sys.argv.remove('--twice')
     twice = True
+headeronly = False
+if '--headeronly' in sys.argv:
+    sys.argv.remove('--headeronly')
+    headeronly = True
 
 reasons = {'Not modified': 'Not Modified'} # python 2.4
 
@@ -31,16 +35,19 @@
     conn.request("GET", '/' + path, None, headers)
     response = conn.getresponse()
     print response.status, reasons.get(response.reason, response.reason)
+    if show[:1] == ['-']:
+        show = sorted(h for h, v in response.getheaders()
+                      if h.lower() not in show)
     for h in [h.lower() for h in show]:
         if response.getheader(h, None) is not None:
             print "%s: %s" % (h, response.getheader(h))
+    if not headeronly:
+        print
+        data = response.read()
+        sys.stdout.write(data)
 
-    print
-    data = response.read()
-    sys.stdout.write(data)
-
-    if twice and response.getheader('ETag', None):
-        tag = response.getheader('ETag')
+        if twice and response.getheader('ETag', None):
+            tag = response.getheader('ETag')
 
     return response.status
 
--- a/tests/run-tests.py	Thu Jan 10 16:25:06 2013 +0000
+++ b/tests/run-tests.py	Wed Jan 16 20:56:02 2013 +0000
@@ -1125,8 +1125,8 @@
         pid, status, fp = waitq.get()
         try:
             childresults = pickle.load(fp)
-        except pickle.UnpicklingError:
-            pass
+        except (pickle.UnpicklingError, EOFError):
+            sys.exit(255)
         else:
             passed += len(childresults['p'])
             skipped += len(childresults['s'])
@@ -1221,7 +1221,8 @@
             outputcoverage(options)
     except KeyboardInterrupt:
         failed = True
-        print "\ninterrupted!"
+        if not options.child:
+            print "\ninterrupted!"
 
     if failed:
         sys.exit(1)
@@ -1251,6 +1252,7 @@
     os.environ['no_proxy'] = ''
     os.environ['NO_PROXY'] = ''
     os.environ['TERM'] = 'xterm'
+    os.environ['PYTHONHASHSEED'] = 'random'
 
     # unset env related to hooks
     for k in os.environ.keys():
--- a/tests/test-keyword.t	Thu Jan 10 16:25:06 2013 +0000
+++ b/tests/test-keyword.t	Wed Jan 16 20:56:02 2013 +0000
@@ -507,6 +507,7 @@
   $ hg -q commit -d '14 1' -m 'prepare amend'
 
   $ hg --debug commit --amend -d '15 1' -m 'amend without changes' | grep keywords
+  invalid branchheads cache (served): tip differs
   overwriting a expanding keywords
   $ hg -q id
   67d8c481a6be
@@ -576,9 +577,10 @@
 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
+  invalid branchheads cache (served): tip differs
   c
    c: copy a:0045e12f6c5791aac80ca6cbfd97709a88307292
+  invalid branchheads cache (served): tip differs
   overwriting c expanding keywords
   committed changeset 2:25736cf2f5cbe41f6be4e6784ef6ecf9f3bbcc7d
   $ cat a c
@@ -760,10 +762,9 @@
 | invalid here.
 
   $ hg --debug commit -l log -d '2 0' -u 'User Name <user@example.com>'
-  invalid branchheads cache (unserved): tip differs
+  invalid branchheads cache (served): tip differs
   a
-  invalid branchheads cache: tip differs
-  invalid branchheads cache (unserved): tip differs
+  invalid branchheads cache (served): tip differs
   overwriting a expanding keywords
   committed changeset 2:bb948857c743469b22bbf51f7ec8112279ca5d83
   $ rm log
@@ -805,7 +806,6 @@
   $ hg debugrebuildstate
   $ hg remove a
   $ hg --debug commit -m rma
-  invalid branchheads cache: tip differs
   committed changeset 3:d14c712653769de926994cf7fbb06c8fbd68f012
   $ hg status
   ? c
@@ -918,7 +918,6 @@
   $ hg --debug commit -m xa -d '3 0' -u 'User Name <user@example.com>'
   x/a
    x/a: copy a:779c764182ce5d43e2b1eb66ce06d7b47bfe342e
-  invalid branchheads cache: tip differs
   overwriting x/a expanding keywords
   committed changeset 3:b4560182a3f9a358179fd2d835c15e9da379c1e4
   $ cat a