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