Mercurial > public > mercurial-scm > hg
diff mercurial/commands.py @ 13568:0b79cf616e65
commands.update() now works properly with a revision of 0
Without this change commands.update() treats an integer 0 as if no revision
was passed and updates to the branch head. This fix allows an integer 0 to
be detected as a revision number so the working directory is correctly
changed to revision 0 rather than the branch head.
author | Mark Drago <markdrago@gmail.com> |
---|---|
date | Tue, 08 Mar 2011 08:41:39 -0500 |
parents | 0fb2ff949790 |
children | edd06611a7c6 |
line wrap: on
line diff
--- a/mercurial/commands.py Tue Mar 08 14:55:31 2011 -0600 +++ b/mercurial/commands.py Tue Mar 08 08:41:39 2011 -0500 @@ -4053,7 +4053,7 @@ if rev and node: raise util.Abort(_("please specify just one revision")) - if not rev: + if rev is None or rev == '': rev = node # if we defined a bookmark, we have to remember the original bookmark name