Mercurial > hg > hgforest
changeset 94:9a9e57d8bdc8
hg fupdate works again with legacy snapfiles.
author | Simon Law <simon@akoha.com> |
---|---|
date | Thu, 09 Apr 2009 03:00:26 -0400 |
parents | 9c98509c1eee |
children | 351ee65e69a9 |
files | forest.py |
diffstat | 1 files changed, 5 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- a/forest.py Thu Apr 09 02:24:17 2009 -0400 +++ b/forest.py Thu Apr 09 03:00:26 2009 -0400 @@ -373,6 +373,8 @@ """ if revs is None: return + if not hasattr(revs, '__iter__'): + revs = [revs] for strrev in revs: try: intrev = int(strrev) @@ -1284,10 +1286,9 @@ ui.warn(_("warning: %s\n") % err) else: raise err + if snapfile is None: snapfile = opts['snapfile'] opts['rev'] = revision - tip = opts['tip'] - opts['rev'] = [opts['rev']] forest = Forest(top=top, snapfile=snapfile, walkhg=walkhgenabled(ui, opts['walkhg'])) @@ -1296,10 +1297,8 @@ rev = opts['rev'] or None else: rev = None - if type(rev) is str: - rev = rev - elif rev: - rev = rev[0] + if hasattr(rev, '__iter__'): + rev = rev[-1] try: if rev is not None: commands.update(ui, tree.getrepo(ui),