Mercurial > hg > hgforest
changeset 72:1c916e260ece
Backwards compatibility layer for cmdutil.parseurl().
author | Simon Law <simon@akoha.org> |
---|---|
date | Wed, 29 Aug 2007 12:10:35 -0400 |
parents | 73f97f3eef54 |
children | 6dd6e6b166b2 |
files | forest.py |
diffstat | 1 files changed, 10 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/forest.py Mon Aug 27 13:53:22 2007 -0400 +++ b/forest.py Wed Aug 29 12:10:35 2007 -0400 @@ -72,10 +72,18 @@ findcmd.findcmd = commands.findcmd findcmd.__doc__ = commands.findcmd.__doc__ +# For backwards compatibility, find the parseurl() function that splits +# urls and revisions. Mercurial 0.9.3 doesn't have this, so we need +# to provide a stub. try: - parseurl = hg.parseurl + parseurl = cmdutil.parseurl except: - parseurl = cmdutil.parseurl + try: + parseurl = hg.parseurl + except: + def parseurl(url, revs): + """Mercurial <= 0.9.3 doesn't have this feature.""" + return url, (revs or None) def cmd_options(ui, cmd, remove=None):