Merge with -stable
authorMatt Mackall <mpm@selenic.com>
Sat, 03 Oct 2009 14:39:57 -0500
changeset 9523 d932dc655881
parent 9522 47f1d44d3fa3 (current diff)
parent 9521 e3ce0c30798b (diff)
child 9535 75d290db2df6
Merge with -stable
hgext/color.py
hgext/convert/subversion.py
hgext/extdiff.py
--- a/hgext/color.py	Sat Oct 03 14:39:46 2009 -0500
+++ b/hgext/color.py	Sat Oct 03 14:39:57 2009 -0500
@@ -160,9 +160,8 @@
     return retval
 
 _patch_effects = { 'applied': ['blue', 'bold', 'underline'],
-                   'missing': ['red', 'bold'],
-                   'unapplied': ['black', 'bold'], }
-
+                    'missing': ['red', 'bold'],
+                    'unapplied': ['black', 'bold'], }
 def colorwrap(orig, s):
     '''wrap ui.write for colored diff output'''
     lines = s.split('\n')
--- a/hgext/convert/subversion.py	Sat Oct 03 14:39:46 2009 -0500
+++ b/hgext/convert/subversion.py	Sat Oct 03 14:39:57 2009 -0500
@@ -153,11 +153,13 @@
 def issvnurl(url):
     try:
         proto, path = url.split('://', 1)
-        path = urllib.url2pathname(path)
+        if proto == 'file':
+            path = urllib.url2pathname(path)
     except ValueError:
         proto = 'file'
         path = os.path.abspath(url)
-    path = path.replace(os.sep, '/')
+    if proto == 'file':
+        path = path.replace(os.sep, '/')
     check = protomap.get(proto, lambda p, p2: False)
     while '/' in path:
         if check(path, proto):
--- a/hgext/extdiff.py	Sat Oct 03 14:39:46 2009 -0500
+++ b/hgext/extdiff.py	Sat Oct 03 14:39:57 2009 -0500
@@ -216,11 +216,11 @@
     that revision is compared to the working directory, and, when no
     revisions are specified, the working directory files are compared
     to its parent.'''
-    program = opts['program'] or 'diff'
-    if opts['program']:
-        option = opts['option']
-    else:
-        option = opts['option'] or ['-Npru']
+    program = opts.get('program')
+    option = opts.get('option')
+    if not program:
+        program = 'diff'
+        option = option or ['-Npru']
     return dodiff(ui, repo, program, option, pats, opts)
 
 cmdtable = {