Show More
@@ -483,7 +483,8 b' def bisect(ui, repo, rev=None, extra=Non' | |||||
483 | cmdutil.bail_if_changed(repo) |
|
483 | cmdutil.bail_if_changed(repo) | |
484 | return hg.clean(repo, node) |
|
484 | return hg.clean(repo, node) | |
485 |
|
485 | |||
486 |
def bookmark(ui, repo, mark=None, rev=None, force=False, delete=False, |
|
486 | def bookmark(ui, repo, mark=None, rev=None, force=False, delete=False, | |
|
487 | rename=None, inactive=False): | |||
487 | '''track a line of development with movable markers |
|
488 | '''track a line of development with movable markers | |
488 |
|
489 | |||
489 | Bookmarks are pointers to certain commits that move when |
|
490 | Bookmarks are pointers to certain commits that move when | |
@@ -514,7 +515,7 b' def bookmark(ui, repo, mark=None, rev=No' | |||||
514 | if mark is None: |
|
515 | if mark is None: | |
515 | raise util.Abort(_("new bookmark name required")) |
|
516 | raise util.Abort(_("new bookmark name required")) | |
516 | marks[mark] = marks[rename] |
|
517 | marks[mark] = marks[rename] | |
517 | if repo._bookmarkcurrent == rename: |
|
518 | if repo._bookmarkcurrent == rename and not inactive: | |
518 | bookmarks.setcurrent(repo, mark) |
|
519 | bookmarks.setcurrent(repo, mark) | |
519 | del marks[rename] |
|
520 | del marks[rename] | |
520 | bookmarks.write(repo) |
|
521 | bookmarks.write(repo) | |
@@ -549,7 +550,7 b' def bookmark(ui, repo, mark=None, rev=No' | |||||
549 | marks[mark] = repo.lookup(rev) |
|
550 | marks[mark] = repo.lookup(rev) | |
550 | else: |
|
551 | else: | |
551 | marks[mark] = repo.changectx('.').node() |
|
552 | marks[mark] = repo.changectx('.').node() | |
552 | if repo.changectx('.').node() == marks[mark]: |
|
553 | if not inactive and repo.changectx('.').node() == marks[mark]: | |
553 | bookmarks.setcurrent(repo, mark) |
|
554 | bookmarks.setcurrent(repo, mark) | |
554 | bookmarks.write(repo) |
|
555 | bookmarks.write(repo) | |
555 | return |
|
556 | return | |
@@ -4469,8 +4470,9 b' table = {' | |||||
4469 | [('f', 'force', False, _('force')), |
|
4470 | [('f', 'force', False, _('force')), | |
4470 | ('r', 'rev', '', _('revision'), _('REV')), |
|
4471 | ('r', 'rev', '', _('revision'), _('REV')), | |
4471 | ('d', 'delete', False, _('delete a given bookmark')), |
|
4472 | ('d', 'delete', False, _('delete a given bookmark')), | |
4472 |
('m', 'rename', '', _('rename a given bookmark'), _('NAME')) |
|
4473 | ('m', 'rename', '', _('rename a given bookmark'), _('NAME')), | |
4473 | _('hg bookmarks [-f] [-d] [-m NAME] [-r REV] [NAME]')), |
|
4474 | ('i', 'inactive', False, _('do not mark a new bookmark active'))], | |
|
4475 | _('hg bookmarks [-f] [-d] [-i] [-m NAME] [-r REV] [NAME]')), | |||
4474 | "branch": |
|
4476 | "branch": | |
4475 | (branch, |
|
4477 | (branch, | |
4476 | [('f', 'force', None, |
|
4478 | [('f', 'force', None, |
General Comments 0
You need to be logged in to leave comments.
Login now