Commits

Anonymous committed ae7fe8c

Fix findcmd for Mercurial 1.1

Comments (0)

Files changed (1)

 # For backwards compatibility, we need the following function definition.
 # If we didn't want that, we'd have just written:
 #     from mercurial.commands import 
-def findcmd(ui, cmd, table):
-    """Find and execute mercurial.*.findcmd(ui, cmd[, table])."""
+def findcmd(ui, cmd, table, strict=True):
+    """Find and execute mercurial.*.findcmd([ui,] cmd[, table, strict])."""
     try:
-        return findcmd.findcmd(ui, cmd, table)
+        return findcmd.findcmd(cmd=cmd, table=table, strict=strict)
     except TypeError:
-        return findcmd.findcmd(ui, cmd)
+        try:
+            return findcmd.findcmd(ui=ui, cmd=cmd, table=table)
+        except TypeError:
+            return findcmd.findcmd(ui, cmd)
 try:
     findcmd.findcmd = cmdutil.findcmd
     findcmd.__doc__ = cmdutil.findcmd.__doc__