# HG changeset patch # User Simon Law # Date 1229988268 18000 # Node ID ae7fe8ca0122aeb9961378cc851884e920975b0d # Parent 715440e45bf49e6baacff55e48e880f61e8ef23d Fix findcmd for Mercurial 1.1 diff -r 715440e45bf4 -r ae7fe8ca0122 forest.py --- a/forest.py Mon Jan 28 12:59:13 2008 -0500 +++ b/forest.py Mon Dec 22 18:24:28 2008 -0500 @@ -63,12 +63,15 @@ # 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__