1. Michael Tharp
  2. hgforest


Simon Law  committed ae7fe8c

Fix findcmd for Mercurial 1.1

  • Participants
  • Parent commits 715440e
  • Branches default

Comments (0)

Files changed (1)

File forest.py

View file
  • Ignore whitespace
 # 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])."""
-        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)
     findcmd.findcmd = cmdutil.findcmd
     findcmd.__doc__ = cmdutil.findcmd.__doc__