changeset 16295:ba42eb722bb3

merge with stable
author Matt Mackall <mpm@selenic.com>
date Tue, 27 Mar 2012 16:17:46 -0500
parents 9952ac7e0968 (current diff) 795d591b6ef5 (diff)
children a740fa28d718
files hgext/convert/git.py mercurial/dispatch.py
diffstat 4 files changed, 13 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/hgext/convert/git.py	Tue Mar 27 14:37:17 2012 -0500
+++ b/hgext/convert/git.py	Tue Mar 27 16:17:46 2012 -0500
@@ -97,6 +97,8 @@
                 seen.add(f)
                 entry = entry.split()
                 h = entry[3]
+                if entry[1] == '160000':
+                    raise util.Abort('git submodules are not supported!')
                 p = (entry[1] == "100755")
                 s = (entry[1] == "120000")
                 self.modecache[(f, h)] = (p and "x") or (s and "l") or ""
--- a/mercurial/dispatch.py	Tue Mar 27 14:37:17 2012 -0500
+++ b/mercurial/dispatch.py	Tue Mar 27 16:17:46 2012 -0500
@@ -218,7 +218,7 @@
 
 def aliasargs(fn, givenargs):
     args = getattr(fn, 'args', [])
-    if args and givenargs:
+    if args:
         cmd = ' '.join(map(util.shellquote, args))
 
         nums = []
@@ -227,7 +227,7 @@
             nums.append(num)
             if num < len(givenargs):
                 return givenargs[num]
-            return ''
+            raise util.Abort(_('too few arguments for command alias'))
         cmd = re.sub(r'\$(\d+|\$)', replacer, cmd)
         givenargs = [x for i, x in enumerate(givenargs)
                      if i not in nums]
--- a/mercurial/phases.py	Tue Mar 27 14:37:17 2012 -0500
+++ b/mercurial/phases.py	Tue Mar 27 16:17:46 2012 -0500
@@ -148,8 +148,9 @@
         missing = [node for node in nodes if node not in nodemap]
         if missing:
             for mnode in missing:
-                msg = 'Removing unknown node %(n)s from %(p)i-phase boundary'
-                repo.ui.debug(msg, {'n': short(mnode), 'p': phase})
+                repo.ui.debug(
+                    'removing unknown node %s from %i-phase boundary\n'
+                    % (short(mnode), phase))
             nodes.symmetric_difference_update(missing)
             repo._dirtyphases = True
 
--- a/tests/test-alias.t	Tue Mar 27 14:37:17 2012 -0500
+++ b/tests/test-alias.t	Tue Mar 27 16:17:46 2012 -0500
@@ -134,6 +134,12 @@
 
 positional arguments
 
+  $ hg positional
+  abort: too few arguments for command alias
+  [255]
+  $ hg positional a
+  abort: too few arguments for command alias
+  [255]
   $ hg positional 'node|short' rev
   0 e63c23eaa88a | 1970-01-01 00:00 +0000