Mercurial > hg-stable
changeset 7255:69e431ea124d
bookmarks: Rename --move to --rename
To me, --move sounds like "make an existing bookmark refer to another
revision", but --move currently means "rename an existing bookmark".
This patch renames the switch to --rename to make it easier to
understand.
author | Joel Rosdahl <joel@rosdahl.net> |
---|---|
date | Sat, 25 Oct 2008 19:05:52 +0200 |
parents | d892211d670e |
children | df800e004077 |
files | hgext/bookmarks.py |
diffstat | 1 files changed, 6 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- a/hgext/bookmarks.py Sat Oct 25 19:05:52 2008 +0200 +++ b/hgext/bookmarks.py Sat Oct 25 19:05:52 2008 +0200 @@ -59,7 +59,7 @@ file.write("%s %s\n" % (hex(node), refspec)) file.close() -def bookmark(ui, repo, mark=None, rev=None, force=False, delete=False, move=None): +def bookmark(ui, repo, mark=None, rev=None, force=False, delete=False, rename=None): '''mercurial bookmarks Bookmarks are pointers to certain commits that move when @@ -76,15 +76,15 @@ marks = parse(repo) cur = repo.changectx('.').node() - if move: - if move not in marks: + if rename: + if rename not in marks: raise util.Abort(_("a bookmark of this name does not exist")) if mark in marks and not force: raise util.Abort(_("a bookmark of the same name already exists")) if mark is None: raise util.Abort(_("new bookmark name required")) - marks[mark] = marks[move] - del marks[move] + marks[mark] = marks[rename] + del marks[rename] write(repo, marks) return @@ -222,6 +222,6 @@ [('f', 'force', False, _('force')), ('r', 'rev', '', _('revision')), ('d', 'delete', False, _('delete a given bookmark')), - ('m', 'move', '', _('move a given bookmark'))], + ('m', 'rename', '', _('rename a given bookmark'))], _('hg bookmarks [-d] [-m NAME] [-r NAME] [NAME]')), }