Mercurial > public > mercurial-scm > hg-stable
comparison mercurial/cmdutil.py @ 24947:a02d293a1079
bookmarks: rename bookmarkcurrent to activebookmark (API)
Today, the terms 'active' and 'current' are interchangeably used throughout the
codebase in reference to the active bookmark (the bookmark that will be updated
with the next commit). This leads to confusion among developers and users.
This patch is part of a series to standardize the usage to 'active' throughout
the mercurial codebase and user interface.
author | Ryan McElroy <rmcelroy@fb.com> |
---|---|
date | Tue, 14 Apr 2015 13:17:33 -0700 |
parents | e1ec3d075c67 |
children | 1df233bcb7f6 |
comparison
equal
deleted
inserted
replaced
24946:c44534209a0a | 24947:a02d293a1079 |
---|---|
2478 # `logmessage` anyway. | 2478 # `logmessage` anyway. |
2479 opts.pop('logfile') | 2479 opts.pop('logfile') |
2480 # First, do a regular commit to record all changes in the working | 2480 # First, do a regular commit to record all changes in the working |
2481 # directory (if there are any) | 2481 # directory (if there are any) |
2482 ui.callhooks = False | 2482 ui.callhooks = False |
2483 currentbookmark = repo._bookmarkcurrent | 2483 currentbookmark = repo._activebookmark |
2484 try: | 2484 try: |
2485 repo._bookmarkcurrent = None | 2485 repo._activebookmark = None |
2486 opts['message'] = 'temporary amend commit for %s' % old | 2486 opts['message'] = 'temporary amend commit for %s' % old |
2487 node = commit(ui, repo, commitfunc, pats, opts) | 2487 node = commit(ui, repo, commitfunc, pats, opts) |
2488 finally: | 2488 finally: |
2489 repo._bookmarkcurrent = currentbookmark | 2489 repo._activebookmark = currentbookmark |
2490 ui.callhooks = True | 2490 ui.callhooks = True |
2491 ctx = repo[node] | 2491 ctx = repo[node] |
2492 | 2492 |
2493 # Participating changesets: | 2493 # Participating changesets: |
2494 # | 2494 # |
2720 if ctx.p2(): | 2720 if ctx.p2(): |
2721 edittext.append(_("HG: branch merge")) | 2721 edittext.append(_("HG: branch merge")) |
2722 if ctx.branch(): | 2722 if ctx.branch(): |
2723 edittext.append(_("HG: branch '%s'") % ctx.branch()) | 2723 edittext.append(_("HG: branch '%s'") % ctx.branch()) |
2724 if bookmarks.iscurrent(repo): | 2724 if bookmarks.iscurrent(repo): |
2725 edittext.append(_("HG: bookmark '%s'") % repo._bookmarkcurrent) | 2725 edittext.append(_("HG: bookmark '%s'") % repo._activebookmark) |
2726 edittext.extend([_("HG: subrepo %s") % s for s in subs]) | 2726 edittext.extend([_("HG: subrepo %s") % s for s in subs]) |
2727 edittext.extend([_("HG: added %s") % f for f in added]) | 2727 edittext.extend([_("HG: added %s") % f for f in added]) |
2728 edittext.extend([_("HG: changed %s") % f for f in modified]) | 2728 edittext.extend([_("HG: changed %s") % f for f in modified]) |
2729 edittext.extend([_("HG: removed %s") % f for f in removed]) | 2729 edittext.extend([_("HG: removed %s") % f for f in removed]) |
2730 if not added and not modified and not removed: | 2730 if not added and not modified and not removed: |