Mercurial > public > mercurial-scm > hg-stable
diff mercurial/commands.py @ 1596:41366b7d6709
fix 'hg tag <tagname> <revision>
- fix a collision with the option keyword rev and the option
name
- update the tests
author | Benoit Boissinot <benoit.boissinot@ens-lyon.org> |
---|---|
date | Tue, 27 Dec 2005 12:52:10 -0600 |
parents | fce5292866c6 |
children | 728fd9584993 |
line wrap: on
line diff
--- a/mercurial/commands.py Thu Dec 22 13:18:44 2005 -0600 +++ b/mercurial/commands.py Tue Dec 27 12:52:10 2005 -0600 @@ -2019,7 +2019,7 @@ for f in changes: ui.write(format % f) -def tag(ui, repo, name, rev=None, **opts): +def tag(ui, repo, name, rev_=None, **opts): """add a tag for the current tip or a given revision Name a particular revision using <name>. @@ -2037,10 +2037,10 @@ """ if name == "tip": raise util.Abort(_("the name 'tip' is reserved")) - if 'rev' in opts: - rev = opts['rev'] - if rev: - r = hex(repo.lookup(rev)) + if opts['rev']: + rev_ = opts['rev'] + if rev_: + r = hex(repo.lookup(rev_)) else: r = hex(repo.changelog.tip())