Show More
@@ -448,12 +448,12 b' def bookmark(repo, subset, x):' | |||||
448 | # i18n: "bookmark" is a keyword |
|
448 | # i18n: "bookmark" is a keyword | |
449 | _('the argument to bookmark must be a string')) |
|
449 | _('the argument to bookmark must be a string')) | |
450 | kind, pattern, matcher = _stringmatcher(bm) |
|
450 | kind, pattern, matcher = _stringmatcher(bm) | |
|
451 | bms = set() | |||
451 | if kind == 'literal': |
|
452 | if kind == 'literal': | |
452 | bmrev = repo._bookmarks.get(pattern, None) |
|
453 | bmrev = repo._bookmarks.get(pattern, None) | |
453 | if not bmrev: |
|
454 | if not bmrev: | |
454 | raise util.Abort(_("bookmark '%s' does not exist") % bm) |
|
455 | raise util.Abort(_("bookmark '%s' does not exist") % bm) | |
455 |
bm |
|
456 | bms.add(repo[bmrev].rev()) | |
456 | return subset.filter(lambda r: r == bmrev) |
|
|||
457 | else: |
|
457 | else: | |
458 | matchrevs = set() |
|
458 | matchrevs = set() | |
459 | for name, bmrev in repo._bookmarks.iteritems(): |
|
459 | for name, bmrev in repo._bookmarks.iteritems(): | |
@@ -462,13 +462,11 b' def bookmark(repo, subset, x):' | |||||
462 | if not matchrevs: |
|
462 | if not matchrevs: | |
463 | raise util.Abort(_("no bookmarks exist that match '%s'") |
|
463 | raise util.Abort(_("no bookmarks exist that match '%s'") | |
464 | % pattern) |
|
464 | % pattern) | |
465 | bmrevs = set() |
|
|||
466 | for bmrev in matchrevs: |
|
465 | for bmrev in matchrevs: | |
467 |
bm |
|
466 | bms.add(repo[bmrev].rev()) | |
468 | return subset & bmrevs |
|
467 | else: | |
469 |
|
468 | bms = set([repo[r].rev() | ||
470 | bms = set([repo[r].rev() |
|
469 | for r in repo._bookmarks.values()]) | |
471 | for r in repo._bookmarks.values()]) |
|
|||
472 | return subset.filter(bms.__contains__) |
|
470 | return subset.filter(bms.__contains__) | |
473 |
|
471 | |||
474 | def branch(repo, subset, x): |
|
472 | def branch(repo, subset, x): |
General Comments 0
You need to be logged in to leave comments.
Login now