--- a/mercurial/cmdutil.py Wed Oct 22 17:00:05 2008 -0500
+++ b/mercurial/cmdutil.py Wed Oct 22 17:34:08 2008 -0500
@@ -18,7 +18,7 @@
class AmbiguousCommand(Exception):
"""Exception raised if command shortcut matches more than one command."""
-def findpossible(ui, cmd, table):
+def findpossible(cmd, table, strict=False):
"""
Return cmd -> (aliases, command table entry)
for each matching command.
@@ -31,7 +31,7 @@
found = None
if cmd in aliases:
found = cmd
- elif not ui.config("ui", "strict"):
+ elif not strict:
for a in aliases:
if a.startswith(cmd):
found = a
@@ -47,9 +47,9 @@
return choice
-def findcmd(ui, cmd, table):
+def findcmd(cmd, table, strict=True):
"""Return (aliases, command table entry) for command string."""
- choice = findpossible(ui, cmd, table)
+ choice = findpossible(cmd, table, strict)
if cmd in choice:
return choice[cmd]