changeset 6248:b4fca699c33d

Automated merge with http://hg.intevation.org/mercurial/crew
author Bryan O'Sullivan <bos@serpentine.com>
date Thu, 13 Mar 2008 19:53:02 -0700
parents 35bf9c23e17a (diff) 7f4257b5cbfc (current diff)
children cf1fa60fdaf4
files
diffstat 6 files changed, 44 insertions(+), 18 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/commands.py	Thu Mar 13 10:42:46 2008 +0100
+++ b/mercurial/commands.py	Thu Mar 13 19:53:02 2008 -0700
@@ -2618,7 +2618,11 @@
     if not message:
         message = _('Added tag %s for changeset %s') % (name, short(r))
 
-    repo.tag(name, r, message, opts['local'], opts['user'], opts['date'])
+    date = opts.get('date')
+    if date:
+        date = util.parsedate(date)
+
+    repo.tag(name, r, message, opts['local'], opts['user'], date)
 
 def tags(ui, repo):
     """list repository tags
--- a/mercurial/localrepo.py	Thu Mar 13 10:42:46 2008 +0100
+++ b/mercurial/localrepo.py	Thu Mar 13 19:53:02 2008 -0700
@@ -202,13 +202,11 @@
 
         date: date tuple to use if committing'''
 
-        date = util.parsedate(date)
         for x in self.status()[:5]:
             if '.hgtags' in x:
                 raise util.Abort(_('working copy of .hgtags is changed '
                                    '(please commit .hgtags manually)'))
 
-
         self._tag(name, node, message, local, user, date)
 
     def tags(self):
--- a/setup.py	Thu Mar 13 10:42:46 2008 +0100
+++ b/setup.py	Thu Mar 13 19:53:02 2008 -0700
@@ -12,6 +12,7 @@
 import os
 from distutils.core import setup, Extension
 from distutils.command.install_data import install_data
+from distutils.ccompiler import new_compiler
 
 import mercurial.version
 
@@ -66,10 +67,13 @@
     ext_modules.append(Extension('mercurial.osutil', ['mercurial/osutil.c']))
 
     if sys.platform == 'linux2' and os.uname()[2] > '2.6':
-        # the inotify extension is only usable with Linux 2.6 kernels
-        ext_modules.append(Extension('hgext.inotify.linux._inotify',
-                                     ['hgext/inotify/linux/_inotify.c']))
-        packages.extend(['hgext.inotify', 'hgext.inotify.linux'])
+        # The inotify extension is only usable with Linux 2.6 kernels.
+        # You also need a reasonably recent C library.
+        cc = new_compiler()
+        if cc.has_function('inotify_add_watch'):
+            ext_modules.append(Extension('hgext.inotify.linux._inotify',
+                                         ['hgext/inotify/linux/_inotify.c']))
+            packages.extend(['hgext.inotify', 'hgext.inotify.linux'])
 except ImportError:
     pass
 
--- a/tests/run-tests.py	Thu Mar 13 10:42:46 2008 +0100
+++ b/tests/run-tests.py	Thu Mar 13 19:53:02 2008 -0700
@@ -267,7 +267,7 @@
                        % options.timeout)
     return ret, splitnewlines(output)
 
-def run_one(test, skips):
+def run_one(test, skips, fails):
     '''tristate output:
     None -> skipped
     True -> passed
@@ -280,6 +280,11 @@
             print "\nSkipping %s: %s" % (test, msg)
         return None
 
+    def fail(msg):
+        fails.append((test, msg))
+        print "\nERROR: %s %s" % (test, msg)
+        return None
+
     vlog("# Test", test)
 
     # create a fresh hgrc
@@ -352,7 +357,7 @@
         ref_out = []
     if not skipped and out != ref_out:
         diffret = 1
-        print "\nERROR: %s output changed" % (test)
+        fail("output changed")
         show_diff(ref_out, out)
     if skipped:
         missing = extract_missing_features(out)
@@ -360,7 +365,7 @@
             missing = ['irrelevant']
         skip(missing[-1])
     elif ret:
-        print "\nERROR: %s failed with error code %d" % (test, ret)
+        fail("returned error code %d" % ret)
     elif diffret:
         ret = diffret
 
@@ -474,13 +479,17 @@
     failures = 0
     tested, skipped, failed = 0, 0, 0
     skips = []
+    fails = []
     while fps:
         pid, status = os.wait()
         fp = fps.pop(pid)
         l = fp.read().splitlines()
         test, skip, fail = map(int, l[:3])
-        for s in l[3:]:
+        split = -fail or len(l)
+        for s in l[3:split]:
             skips.append(s.split(" ", 1))
+        for s in l[split:]:
+            fails.append(s.split(" ", 1))
         tested += test
         skipped += skip
         failed += fail
@@ -489,6 +498,8 @@
     print
     for s in skips:
         print "Skipped %s: %s" % (s[0], s[1])
+    for s in fails:
+        print "Failed %s: %s" % (s[0], s[1])
     print "# Ran %d tests, %d skipped, %d failed." % (
         tested, skipped, failed)
     sys.exit(failures != 0)
@@ -526,11 +537,12 @@
                 tests = orig
 
         skips = []
+        fails = []
         for test in tests:
             if options.retest and not os.path.exists(test + ".err"):
                 skipped += 1
                 continue
-            ret = run_one(test, skips)
+            ret = run_one(test, skips, fails)
             if ret is None:
                 skipped += 1
             elif not ret:
@@ -551,11 +563,15 @@
             fp.write('%d\n%d\n%d\n' % (tested, skipped, failed))
             for s in skips:
                 fp.write("%s %s\n" % s)
+            for s in fails:
+                fp.write("%s %s\n" % s)
             fp.close()
         else:
             print
             for s in skips:
                 print "Skipped %s: %s" % s
+            for s in fails:
+                print "Failed %s: %s" % s
             print "# Ran %d tests, %d skipped, %d failed." % (
                 tested, skipped, failed)
 
--- a/tests/test-fetch	Thu Mar 13 10:42:46 2008 +0100
+++ b/tests/test-fetch	Thu Mar 13 19:53:02 2008 -0700
@@ -1,5 +1,9 @@
 #!/bin/sh
 
+# adjust to non-default HGPORT, e.g. with run-tests.py -j
+hideport() { sed "s/localhost:$HGPORT/localhost:20059/"; }
+hidehash() { sed "s/changeset 3:............ merges/changeset 3:... merges/"; }
+
 echo "[extensions]" >> $HGRCPATH
 echo "fetch=" >> $HGRCPATH
 
@@ -36,12 +40,12 @@
 cat a/hg.pid >> "$DAEMON_PIDS"
 
 echo '% fetch over http, no auth'
-hg --cwd d fetch -d '5 0' http://localhost:$HGPORT/
-hg --cwd d tip --template '{desc}\n'
+hg --cwd d fetch -d '5 0' http://localhost:$HGPORT/ | hideport | hidehash
+hg --cwd d tip --template '{desc}\n' | hideport
 
 echo '% fetch over http with auth (should be hidden in desc)'
-hg --cwd e fetch -d '5 0' http://user:password@localhost:$HGPORT/
-hg --cwd e tip --template '{desc}\n'
+hg --cwd e fetch -d '5 0' http://user:password@localhost:$HGPORT/ | hideport | hidehash
+hg --cwd e tip --template '{desc}\n' | hideport
 
 hg clone a f
 hg clone a g
--- a/tests/test-fetch.out	Thu Mar 13 10:42:46 2008 +0100
+++ b/tests/test-fetch.out	Thu Mar 13 19:53:02 2008 -0700
@@ -41,7 +41,7 @@
 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
 merging with 1:5e056962225c
 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
-new changeset 3:0b6439e938f9 merges remote changes with local
+new changeset 3:... merges remote changes with local
 Automated merge with http://localhost:20059/
 % fetch over http with auth (should be hidden in desc)
 pulling from http://user:***@localhost:20059/
@@ -54,7 +54,7 @@
 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
 merging with 1:5e056962225c
 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
-new changeset 3:0b6439e938f9 merges remote changes with local
+new changeset 3:... merges remote changes with local
 Automated merge with http://localhost:20059/
 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
 2 files updated, 0 files merged, 0 files removed, 0 files unresolved