changeset 10072:c0237e23151b

Merge with crew-stable
author Patrick Mezard <pmezard@gmail.com>
date Mon, 14 Dec 2009 22:15:46 +0100
parents fd6729805f44 (current diff) 661980567246 (diff)
children 25919ebaba01
files
diffstat 4 files changed, 17 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/hgext/convert/subversion.py	Mon Dec 14 00:26:28 2009 +0100
+++ b/hgext/convert/subversion.py	Mon Dec 14 22:15:46 2009 +0100
@@ -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 00:26:28 2009 +0100
+++ b/hgext/schemes.py	Mon Dec 14 22:15:46 2009 +0100
@@ -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 00:26:28 2009 +0100
+++ b/tests/test-schemes	Mon Dec 14 22:15:46 2009 +0100
@@ -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 00:26:28 2009 +0100
+++ b/tests/test-schemes.out	Mon Dec 14 22:15:46 2009 +0100
@@ -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