Commits

Anonymous committed 9a9e57d

hg fupdate works again with legacy snapfiles.

  • Participants
  • Parent commits 9c98509

Comments (0)

Files changed (1)

     """
     if revs is None:
         return
+    if not hasattr(revs, '__iter__'):
+        revs = [revs]
     for strrev in revs:
         try:
             intrev = int(strrev)
                 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']))
 
             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),