##// END OF EJS Templates
commands: rename current to active in variables and comments...
Ryan McElroy -
r25349:62da2d77 default
parent child Browse files
Show More
@@ -1041,8 +1041,8 b' def bookmark(ui, repo, *names, **opts):'
1041 if len(marks) == 0 and not fm:
1041 if len(marks) == 0 and not fm:
1042 ui.status(_("no bookmarks set\n"))
1042 ui.status(_("no bookmarks set\n"))
1043 for bmark, n in sorted(marks.iteritems()):
1043 for bmark, n in sorted(marks.iteritems()):
1044 current = repo._activebookmark
1044 active = repo._activebookmark
1045 if bmark == current:
1045 if bmark == active:
1046 prefix, label = '*', activebookmarklabel
1046 prefix, label = '*', activebookmarklabel
1047 else:
1047 else:
1048 prefix, label = ' ', ''
1048 prefix, label = ' ', ''
@@ -1054,7 +1054,7 b' def bookmark(ui, repo, *names, **opts):'
1054 pad = " " * (25 - encoding.colwidth(bmark))
1054 pad = " " * (25 - encoding.colwidth(bmark))
1055 fm.condwrite(not ui.quiet, 'rev node', pad + ' %d:%s',
1055 fm.condwrite(not ui.quiet, 'rev node', pad + ' %d:%s',
1056 repo.changelog.rev(n), hexfn(n), label=label)
1056 repo.changelog.rev(n), hexfn(n), label=label)
1057 fm.data(active=(bmark == current))
1057 fm.data(active=(bmark == active))
1058 fm.plain('\n')
1058 fm.plain('\n')
1059 fm.end()
1059 fm.end()
1060
1060
@@ -1523,7 +1523,7 b' def commit(ui, repo, *pats, **opts):'
1523 match,
1523 match,
1524 extra=extra)
1524 extra=extra)
1525
1525
1526 current = repo._activebookmark
1526 active = repo._activebookmark
1527 marks = old.bookmarks()
1527 marks = old.bookmarks()
1528 node = cmdutil.amend(ui, repo, commitfunc, old, extra, pats, opts)
1528 node = cmdutil.amend(ui, repo, commitfunc, old, extra, pats, opts)
1529 if node == old.node():
1529 if node == old.node():
@@ -1535,7 +1535,7 b' def commit(ui, repo, *pats, **opts):'
1535 newmarks = repo._bookmarks
1535 newmarks = repo._bookmarks
1536 for bm in marks:
1536 for bm in marks:
1537 newmarks[bm] = node
1537 newmarks[bm] = node
1538 if bm == current:
1538 if bm == active:
1539 bookmarks.activate(repo, bm)
1539 bookmarks.activate(repo, bm)
1540 newmarks.write()
1540 newmarks.write()
1541 else:
1541 else:
@@ -5933,15 +5933,15 b' def summary(ui, repo, **opts):'
5933 ui.status(m, label='log.branch')
5933 ui.status(m, label='log.branch')
5934
5934
5935 if marks:
5935 if marks:
5936 current = repo._activebookmark
5936 active = repo._activebookmark
5937 # i18n: column positioning for "hg summary"
5937 # i18n: column positioning for "hg summary"
5938 ui.write(_('bookmarks:'), label='log.bookmark')
5938 ui.write(_('bookmarks:'), label='log.bookmark')
5939 if current is not None:
5939 if active is not None:
5940 if current in marks:
5940 if active in marks:
5941 ui.write(' *' + current, label=activebookmarklabel)
5941 ui.write(' *' + active, label=activebookmarklabel)
5942 marks.remove(current)
5942 marks.remove(active)
5943 else:
5943 else:
5944 ui.write(' [%s]' % current, label=activebookmarklabel)
5944 ui.write(' [%s]' % active, label=activebookmarklabel)
5945 for m in marks:
5945 for m in marks:
5946 ui.write(' ' + m, label='log.bookmark')
5946 ui.write(' ' + m, label='log.bookmark')
5947 ui.write('\n', label='log.bookmark')
5947 ui.write('\n', label='log.bookmark')
@@ -6361,7 +6361,7 b' def update(ui, repo, node=None, rev=None'
6361
6361
6362 Update the repository's working directory to the specified
6362 Update the repository's working directory to the specified
6363 changeset. If no changeset is specified, update to the tip of the
6363 changeset. If no changeset is specified, update to the tip of the
6364 current named branch and move the current bookmark (see :hg:`help
6364 current named branch and move the active bookmark (see :hg:`help
6365 bookmarks`).
6365 bookmarks`).
6366
6366
6367 Update sets the working directory's parent revision to the specified
6367 Update sets the working directory's parent revision to the specified
@@ -6414,7 +6414,7 b' def update(ui, repo, node=None, rev=None'
6414
6414
6415 cmdutil.clearunfinished(repo)
6415 cmdutil.clearunfinished(repo)
6416
6416
6417 # with no argument, we also move the current bookmark, if any
6417 # with no argument, we also move the active bookmark, if any
6418 rev, movemarkfrom = bookmarks.calculateupdate(ui, repo, rev)
6418 rev, movemarkfrom = bookmarks.calculateupdate(ui, repo, rev)
6419
6419
6420 # if we defined a bookmark, we have to remember the original bookmark name
6420 # if we defined a bookmark, we have to remember the original bookmark name
@@ -69,7 +69,7 b' list bookmarks'
69 * Y 0:719295282060
69 * Y 0:719295282060
70 Z -1:000000000000
70 Z -1:000000000000
71
71
72 Verify that switching to Z updates the current bookmark:
72 Verify that switching to Z updates the active bookmark:
73 $ hg update Z
73 $ hg update Z
74 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
74 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
75 (activating bookmark Z)
75 (activating bookmark Z)
@@ -118,7 +118,7 b' set bookmark Z using -i'
118 * Y 0:719295282060
118 * Y 0:719295282060
119 Z 0:719295282060
119 Z 0:719295282060
120
120
121 deactivate current bookmark using -i
121 deactivate active bookmark using -i
122
122
123 $ hg bookmark -i Y
123 $ hg bookmark -i Y
124 $ hg bookmarks
124 $ hg bookmarks
@@ -137,7 +137,7 b' deactivate current bookmark using -i'
137 * Y 0:719295282060
137 * Y 0:719295282060
138 Z 0:719295282060
138 Z 0:719295282060
139
139
140 deactivate current bookmark while renaming
140 deactivate active bookmark while renaming
141
141
142 $ hg bookmark -i -m Y X
142 $ hg bookmark -i -m Y X
143 $ hg bookmarks
143 $ hg bookmarks
@@ -530,7 +530,7 b' create bundle with two heads'
530 added 2 changesets with 2 changes to 2 files (+1 heads)
530 added 2 changesets with 2 changes to 2 files (+1 heads)
531 (run 'hg heads' to see heads, 'hg merge' to merge)
531 (run 'hg heads' to see heads, 'hg merge' to merge)
532
532
533 update to current bookmark if it's not the parent
533 update to active bookmark if it's not the parent
534
534
535 $ hg summary
535 $ hg summary
536 parent: 2:db815d6d32e6
536 parent: 2:db815d6d32e6
@@ -3082,7 +3082,7 b' Test revset function'
3082 Rev: 0
3082 Rev: 0
3083 Ancestor: 0
3083 Ancestor: 0
3084
3084
3085 Test current bookmark templating
3085 Test active bookmark templating
3086
3086
3087 $ hg book foo
3087 $ hg book foo
3088 $ hg book bar
3088 $ hg book bar
General Comments 0
You need to be logged in to leave comments. Login now