diff mercurial/commands.py @ 12726:61c0df2b089a

update: use revsingle to enable use of revsets as update targets (issue1993)
author Augie Fackler <durin42@gmail.com>
date Mon, 11 Oct 2010 10:07:42 -0500
parents d734b3470138
children 52971985be14
line wrap: on
line diff
--- a/mercurial/commands.py	Tue Oct 12 11:02:45 2010 -0500
+++ b/mercurial/commands.py	Mon Oct 11 10:07:42 2010 -0500
@@ -927,7 +927,7 @@
             id, ps = data
             p1 = ps[0]
             if p1 != at:
-                update(ui, repo, node=p1, clean=True)
+                update(ui, repo, node=str(p1), clean=True)
                 at = p1
             if repo.dirstate.branch() != atbranch:
                 branch(ui, repo, atbranch, force=True)
@@ -3790,6 +3790,8 @@
     if not rev:
         rev = node
 
+    rev = cmdutil.revsingle(repo, rev, rev).rev()
+
     if check and clean:
         raise util.Abort(_("cannot specify both -c/--check and -C/--clean"))