merge with mpm
authorBryan O'Sullivan <bos@serpentine.com>
Wed, 12 Dec 2012 15:12:28 -0800
changeset 18060 d2e97d86e4db
parent 18059 c135ab6413b4 (current diff)
parent 18055 e440a2c0d944 (diff)
child 18061 0e4316c3a703
merge with mpm
tests/run-tests.py
--- a/contrib/check-code.py	Wed Dec 12 14:52:58 2012 -0800
+++ b/contrib/check-code.py	Wed Dec 12 15:12:28 2012 -0800
@@ -133,9 +133,9 @@
     (r'\S;\s*\n', "semicolon"),
     (r'[^_]_\("[^"]+"\s*%', "don't use % inside _()"),
     (r"[^_]_\('[^']+'\s*%", "don't use % inside _()"),
-    (r'\w,\w', "missing whitespace after ,"),
-    (r'\w[+/*\-<>]\w', "missing whitespace in expression"),
-    (r'^\s+\w+=\w+[^,)\n]$', "missing whitespace in assignment"),
+    (r'(\w|\)),\w', "missing whitespace after ,"),
+    (r'(\w|\))[+/*\-<>]\w', "missing whitespace in expression"),
+    (r'^\s+(\w|\.)+=\w[^,()\n]*$', "missing whitespace in assignment"),
     (r'(\s+)try:\n((?:\n|\1\s.*\n)+?)\1except.*?:\n'
      r'((?:\n|\1\s.*\n)+?)\1finally:', 'no try/except/finally in Python 2.4'),
     (r'(\s+)try:\n((?:\n|\1\s.*\n)*?)\1\s*yield\b.*?'
--- a/contrib/vim/hgtest.vim	Wed Dec 12 14:52:58 2012 -0800
+++ b/contrib/vim/hgtest.vim	Wed Dec 12 15:12:28 2012 -0800
@@ -2,7 +2,8 @@
 " Language: Mercurial unified tests
 " Author: Steve Losh (steve@stevelosh.com)
 "
-" Add the following line to your ~/.vimrc to enable:
+" Place this file in ~/.vim/syntax/ and add the following line to your
+" ~/.vimrc to enable:
 " au BufNewFile,BufRead *.t set filetype=hgtest
 "
 " If you want folding you'll need the following line as well:
--- a/doc/hgmanpage.py	Wed Dec 12 14:52:58 2012 -0800
+++ b/doc/hgmanpage.py	Wed Dec 12 15:12:28 2012 -0800
@@ -146,7 +146,7 @@
                 text.extend(cell)
                 if not text[-1].endswith('\n'):
                     text[-1] += '\n'
-                if i < len(row)-1:
+                if i < len(row) - 1:
                     text.append('T}'+self._tab_char+'T{\n')
                 else:
                     text.append('T}\n')
@@ -258,7 +258,7 @@
             # ensure we get a ".TH" as viewers require it.
             self.head.append(self.header())
         # filter body
-        for i in xrange(len(self.body)-1, 0, -1):
+        for i in xrange(len(self.body) - 1, 0, -1):
             # remove superfluous vertical gaps.
             if self.body[i] == '.sp\n':
                 if self.body[i - 1][:4] in ('.BI ','.IP '):
@@ -880,7 +880,7 @@
         self.context[-3] = '.BI' # bold/italic alternate
         if node['delimiter'] != ' ':
             self.body.append('\\fB%s ' % node['delimiter'])
-        elif self.body[len(self.body)-1].endswith('='):
+        elif self.body[len(self.body) - 1].endswith('='):
             # a blank only means no blank in output, just changing font
             self.body.append(' ')
         else:
--- a/hgext/highlight/highlight.py	Wed Dec 12 14:52:58 2012 -0800
+++ b/hgext/highlight/highlight.py	Wed Dec 12 15:12:28 2012 -0800
@@ -50,7 +50,7 @@
     colorized = highlight(text, lexer, formatter)
     # strip wrapping div
     colorized = colorized[:colorized.find('\n</pre>')]
-    colorized = colorized[colorized.find('<pre>')+5:]
+    colorized = colorized[colorized.find('<pre>') + 5:]
     coloriter = (s.encode(encoding.encoding, 'replace')
                  for s in colorized.splitlines())
 
--- a/hgext/inotify/linux/watcher.py	Wed Dec 12 14:52:58 2012 -0800
+++ b/hgext/inotify/linux/watcher.py	Wed Dec 12 15:12:28 2012 -0800
@@ -72,7 +72,7 @@
 
     def __repr__(self):
         r = repr(self.raw)
-        return 'event(path=' + repr(self.path) + ', ' + r[r.find('(')+1:]
+        return 'event(path=' + repr(self.path) + ', ' + r[r.find('(') + 1:]
 
 
 _event_props = {
--- a/hgext/mq.py	Wed Dec 12 14:52:58 2012 -0800
+++ b/hgext/mq.py	Wed Dec 12 15:12:28 2012 -0800
@@ -1147,7 +1147,7 @@
                 return matches[0]
             if self.series and self.applied:
                 if s == 'qtip':
-                    return self.series[self.seriesend(True)-1]
+                    return self.series[self.seriesend(True) - 1]
                 if s == 'qbase':
                     return self.series[0]
             return None
@@ -1626,7 +1626,7 @@
                 # if the patch excludes a modified file, mark that
                 # file with mtime=0 so status can see it.
                 mm = []
-                for i in xrange(len(m)-1, -1, -1):
+                for i in xrange(len(m) - 1, -1, -1):
                     if not matchfn(m[i]):
                         mm.append(m[i])
                         del m[i]
--- a/hgext/win32text.py	Wed Dec 12 14:52:58 2012 -0800
+++ b/hgext/win32text.py	Wed Dec 12 15:12:28 2012 -0800
@@ -121,7 +121,7 @@
     # changegroup that contains an unacceptable commit followed later
     # by a commit that fixes the problem.
     tip = repo['tip']
-    for rev in xrange(len(repo)-1, repo[node].rev()-1, -1):
+    for rev in xrange(len(repo) - 1, repo[node].rev() - 1, -1):
         c = repo[rev]
         for f in c.files():
             if f in seen or f not in tip or f not in c:
--- a/mercurial/commands.py	Wed Dec 12 14:52:58 2012 -0800
+++ b/mercurial/commands.py	Wed Dec 12 15:12:28 2012 -0800
@@ -4880,8 +4880,7 @@
     elif after:
         list = deleted
         for f in modified + added + clean:
-            ui.warn(_('not removing %s: file still exists (use -f'
-                      ' to force removal)\n') % m.rel(f))
+            ui.warn(_('not removing %s: file still exists\n') % m.rel(f))
             ret = 1
     else:
         list = deleted + clean
--- a/mercurial/ignore.py	Wed Dec 12 14:52:58 2012 -0800
+++ b/mercurial/ignore.py	Wed Dec 12 15:12:28 2012 -0800
@@ -46,7 +46,7 @@
                 pat = line
                 break
             elif line.startswith(s+':'):
-                pat = rels + line[len(s)+1:]
+                pat = rels + line[len(s) + 1:]
                 break
         patterns.append(pat)
 
--- a/mercurial/localrepo.py	Wed Dec 12 14:52:58 2012 -0800
+++ b/mercurial/localrepo.py	Wed Dec 12 15:12:28 2012 -0800
@@ -2655,7 +2655,7 @@
             fp.write(text)
         finally:
             fp.close()
-        return self.pathto(fp.name[len(self.root)+1:])
+        return self.pathto(fp.name[len(self.root) + 1:])
 
 # used to avoid circular references so destructors work
 def aftertrans(files):
--- a/mercurial/patch.py	Wed Dec 12 14:52:58 2012 -0800
+++ b/mercurial/patch.py	Wed Dec 12 15:12:28 2012 -0800
@@ -1007,7 +1007,7 @@
 
             bot = min(fuzz, bot)
             top = min(fuzz, top)
-            return old[top:len(old)-bot], new[top:len(new)-bot], top
+            return old[top:len(old) - bot], new[top:len(new) - bot], top
         return old, new, 0
 
     def fuzzit(self, fuzz, toponly):
--- a/mercurial/store.py	Wed Dec 12 14:52:58 2012 -0800
+++ b/mercurial/store.py	Wed Dec 12 15:12:28 2012 -0800
@@ -76,7 +76,7 @@
     cmap = dict([(chr(x), chr(x)) for x in xrange(127)])
     for x in (range(32) + range(126, 256) + winreserved):
         cmap[chr(x)] = "~%02x" % x
-    for x in range(ord("A"), ord("Z")+1) + [ord(e)]:
+    for x in range(ord("A"), ord("Z") + 1) + [ord(e)]:
         cmap[chr(x)] = e + chr(x).lower()
     dmap = {}
     for k, v in cmap.iteritems():
@@ -128,7 +128,7 @@
     cmap = dict([(chr(x), chr(x)) for x in xrange(127)])
     for x in (range(32) + range(126, 256) + winreserved):
         cmap[chr(x)] = "~%02x" % x
-    for x in range(ord("A"), ord("Z")+1):
+    for x in range(ord("A"), ord("Z") + 1):
         cmap[chr(x)] = chr(x).lower()
     return lambda s: "".join([cmap[c] for c in s])
 
--- a/mercurial/ui.py	Wed Dec 12 14:52:58 2012 -0800
+++ b/mercurial/ui.py	Wed Dec 12 15:12:28 2012 -0800
@@ -613,7 +613,7 @@
         ('&None', 'E&xec', 'Sym&link') Responses are case insensitive.
         If ui is not interactive, the default is returned.
         """
-        resps = [s[s.index('&')+1].lower() for s in choices]
+        resps = [s[s.index('&') + 1].lower() for s in choices]
         while True:
             r = self.prompt(msg, resps[default])
             if r.lower() in resps:
--- a/tests/run-tests.py	Wed Dec 12 14:52:58 2012 -0800
+++ b/tests/run-tests.py	Wed Dec 12 15:12:28 2012 -0800
@@ -935,6 +935,8 @@
         times.append((test, endtime - starttime))
     vlog("# Ret was:", ret)
 
+    killdaemons()
+
     mark = '.'
 
     skipped = (ret == SKIPPED_STATUS)
@@ -1005,8 +1007,6 @@
         sys.stdout.flush()
         iolock.release()
 
-    killdaemons()
-
     if not options.keep_tmpdir:
         shutil.rmtree(testtmp, True)
     if skipped:
--- a/tests/test-remove.t	Wed Dec 12 14:52:58 2012 -0800
+++ b/tests/test-remove.t	Wed Dec 12 15:12:28 2012 -0800
@@ -107,7 +107,7 @@
   $ echo b > bar
   $ hg add bar
   $ remove -A bar
-  not removing bar: file still exists (use -f to force removal)
+  not removing bar: file still exists
   exit code: 1
   A bar
   ./bar
@@ -117,7 +117,7 @@
 21 state clean, options -A
 
   $ remove -A foo
-  not removing foo: file still exists (use -f to force removal)
+  not removing foo: file still exists
   exit code: 1
   ? bar
   ./bar
@@ -128,7 +128,7 @@
 
   $ echo b >> foo
   $ remove -A foo
-  not removing foo: file still exists (use -f to force removal)
+  not removing foo: file still exists
   exit code: 1
   M foo
   ? bar
@@ -220,7 +220,7 @@
 
   $ rm test/bar
   $ remove -A test
-  not removing test/foo: file still exists (use -f to force removal) (glob)
+  not removing test/foo: file still exists (glob)
   removing test/bar (glob)
   exit code: 1
   R test/bar