Show More
@@ -538,6 +538,9 b' def updatecurbookmark(orig, ui, repo, *a' | |||||
538 | return res |
|
538 | return res | |
539 |
|
539 | |||
540 | def bmrevset(repo, subset, x): |
|
540 | def bmrevset(repo, subset, x): | |
|
541 | """``bookmark([name])`` | |||
|
542 | The named bookmark or all bookmarks. | |||
|
543 | """ | |||
541 | args = revset.getargs(x, 0, 1, _('bookmark takes one or no arguments')) |
|
544 | args = revset.getargs(x, 0, 1, _('bookmark takes one or no arguments')) | |
542 | if args: |
|
545 | if args: | |
543 | bm = revset.getstring(args[0], |
|
546 | bm = revset.getstring(args[0], | |
@@ -548,14 +551,9 b' def bmrevset(repo, subset, x):' | |||||
548 | return [r for r in subset if r == bmrev] |
|
551 | return [r for r in subset if r == bmrev] | |
549 | bms = set([repo.changelog.rev(bin(r)) for r in listbookmarks(repo).values()]) |
|
552 | bms = set([repo.changelog.rev(bin(r)) for r in listbookmarks(repo).values()]) | |
550 | return [r for r in subset if r in bms] |
|
553 | return [r for r in subset if r in bms] | |
551 | revset.symbols['bookmark'] = bmrevset |
|
|||
552 |
|
554 | |||
553 |
def |
|
555 | def extsetup(ui): | |
554 | doc = help.loaddoc('revsets')() |
|
556 | revset.symbols['bookmark'] = bmrevset | |
555 | doc += _('\nAdded by the bookmarks extension:\n\n' |
|
|||
556 | '``bookmark([name])``\n' |
|
|||
557 | ' The named bookmark or all bookmarks.\n') |
|
|||
558 | return doc |
|
|||
559 |
|
557 | |||
560 | cmdtable = { |
|
558 | cmdtable = { | |
561 | "bookmarks": |
|
559 | "bookmarks": |
@@ -17,7 +17,7 b' from mercurial.i18n import _' | |||||
17 | import os, tempfile |
|
17 | import os, tempfile | |
18 | from mercurial import bundlerepo, cmdutil, hg, merge, match |
|
18 | from mercurial import bundlerepo, cmdutil, hg, merge, match | |
19 | from mercurial import patch, revlog, util, error |
|
19 | from mercurial import patch, revlog, util, error | |
20 |
from mercurial import revset |
|
20 | from mercurial import revset | |
21 |
|
21 | |||
22 | class transplantentry(object): |
|
22 | class transplantentry(object): | |
23 | def __init__(self, lnode, rnode): |
|
23 | def __init__(self, lnode, rnode): | |
@@ -589,6 +589,9 b' def transplant(ui, repo, *revs, **opts):' | |||||
589 | os.unlink(bundle) |
|
589 | os.unlink(bundle) | |
590 |
|
590 | |||
591 | def revsettransplanted(repo, subset, x): |
|
591 | def revsettransplanted(repo, subset, x): | |
|
592 | """``transplanted(set)`` | |||
|
593 | Transplanted changesets in set. | |||
|
594 | """ | |||
592 | if x: |
|
595 | if x: | |
593 | s = revset.getset(repo, subset, x) |
|
596 | s = revset.getset(repo, subset, x) | |
594 | else: |
|
597 | else: | |
@@ -599,17 +602,7 b' def revsettransplanted(repo, subset, x):' | |||||
599 | cs.add(r) |
|
602 | cs.add(r) | |
600 | return [r for r in s if r in cs] |
|
603 | return [r for r in s if r in cs] | |
601 |
|
604 | |||
602 |
def |
|
605 | def extsetup(ui): | |
603 | doc = help.loaddoc('revsets')() |
|
|||
604 | doc += _('\nAdded by the transplant extension:\n\n' |
|
|||
605 | '``transplanted(set)``\n' |
|
|||
606 | ' Transplanted changesets in set.\n') |
|
|||
607 | return doc |
|
|||
608 |
|
||||
609 | def uisetup(ui): |
|
|||
610 | 'Add the transplanted revset predicate' |
|
|||
611 | for i in (i for i, x in enumerate(help.helptable) if x[0] == ['revsets']): |
|
|||
612 | help.helptable[i] = (['revsets'], _("Specifying Revision Sets"), revsetdoc) |
|
|||
613 | revset.symbols['transplanted'] = revsettransplanted |
|
606 | revset.symbols['transplanted'] = revsettransplanted | |
614 |
|
607 | |||
615 | cmdtable = { |
|
608 | cmdtable = { |
@@ -83,6 +83,8 b' bookmarks revset' | |||||
83 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
83 | date: Thu Jan 01 00:00:00 1970 +0000 | |
84 | summary: 1 |
|
84 | summary: 1 | |
85 |
|
85 | |||
|
86 | $ hg help revsets | grep 'bookmark(' | |||
|
87 | "bookmark([name])" | |||
86 |
|
88 | |||
87 | bookmarks X and X2 moved to rev 1, Y at rev -1 |
|
89 | bookmarks X and X2 moved to rev 1, Y at rev -1 | |
88 |
|
90 |
General Comments 0
You need to be logged in to leave comments.
Login now