changeset 10074:ad5ef62b5a98 stable

Merge -stable heads
author Matt Mackall <mpm@selenic.com>
date Tue, 15 Dec 2009 10:44:10 -0600
parents 661980567246 (diff) 8f14f749f471 (current diff)
children 649bb75b5386 7f5a71946aaa
files
diffstat 4 files changed, 17 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/hgext/convert/subversion.py	Mon Dec 14 15:01:13 2009 -0600
+++ b/hgext/convert/subversion.py	Tue Dec 15 10:44:10 2009 -0600
@@ -912,7 +912,11 @@
         cmd = '%s debugsvnlog' % util.shellquote(hgexe)
         stdin, stdout = util.popen2(cmd)
         stdin.write(arg)
-        stdin.close()
+        try:
+            stdin.close()
+        except IOError:
+            raise util.Abort(_('Mercurial failed to run itself, check'
+                               ' hg executable is in PATH'))
         return logstream(stdout)
 
 pre_revprop_change = '''#!/bin/sh
--- a/hgext/schemes.py	Mon Dec 14 15:01:13 2009 -0600
+++ b/hgext/schemes.py	Tue Dec 15 10:44:10 2009 -0600
@@ -64,7 +64,7 @@
             parts = parts[:-1]
         else:
             tail = ''
-        context = dict((str(i), v) for i, v in enumerate(parts))
+        context = dict((str(i+1), v) for i, v in enumerate(parts))
         url = ''.join(self.templater.process(self.url, context)) + tail
         return hg._lookup(url).instance(ui, url, create)
 
--- a/tests/test-schemes	Mon Dec 14 15:01:13 2009 -0600
+++ b/tests/test-schemes	Tue Dec 15 10:44:10 2009 -0600
@@ -6,6 +6,7 @@
 
 [schemes]
 l = http://localhost:$HGPORT/
+parts = http://{1}:$HGPORT/
 EOF
 
 hg init test
@@ -18,5 +19,8 @@
 
 hg incoming l://
 
+echo % check that {1} syntax works
+hg incoming --debug parts://localhost | sed 's/[0-9]//g'
+
 echo % errors
 cat errors.log
--- a/tests/test-schemes.out	Mon Dec 14 15:01:13 2009 -0600
+++ b/tests/test-schemes.out	Tue Dec 15 10:44:10 2009 -0600
@@ -2,4 +2,11 @@
 comparing with l://
 searching for changes
 no changes found
+% check that {1} syntax works
+using http://localhost:/
+sending between command
+comparing with parts://localhost
+sending heads command
+searching for changes
+no changes found
 % errors