Show More
@@ -496,7 +496,8 b' def bookmark(repo, subset, x):' | |||||
496 | if kind == 'literal': |
|
496 | if kind == 'literal': | |
497 | bmrev = repo._bookmarks.get(pattern, None) |
|
497 | bmrev = repo._bookmarks.get(pattern, None) | |
498 | if not bmrev: |
|
498 | if not bmrev: | |
499 |
raise |
|
499 | raise error.RepoLookupError(_("bookmark '%s' does not exist") | |
|
500 | % bm) | |||
500 | bms.add(repo[bmrev].rev()) |
|
501 | bms.add(repo[bmrev].rev()) | |
501 | else: |
|
502 | else: | |
502 | matchrevs = set() |
|
503 | matchrevs = set() | |
@@ -504,8 +505,8 b' def bookmark(repo, subset, x):' | |||||
504 | if matcher(name): |
|
505 | if matcher(name): | |
505 | matchrevs.add(bmrev) |
|
506 | matchrevs.add(bmrev) | |
506 | if not matchrevs: |
|
507 | if not matchrevs: | |
507 |
raise |
|
508 | raise error.RepoLookupError(_("no bookmarks exist" | |
508 | % pattern) |
|
509 | " that match '%s'") % pattern) | |
509 | for bmrev in matchrevs: |
|
510 | for bmrev in matchrevs: | |
510 | bms.add(repo[bmrev].rev()) |
|
511 | bms.add(repo[bmrev].rev()) | |
511 | else: |
|
512 | else: | |
@@ -1262,15 +1263,16 b' def named(repo, subset, x):' | |||||
1262 | namespaces = set() |
|
1263 | namespaces = set() | |
1263 | if kind == 'literal': |
|
1264 | if kind == 'literal': | |
1264 | if pattern not in repo.names: |
|
1265 | if pattern not in repo.names: | |
1265 |
raise |
|
1266 | raise error.RepoLookupError(_("namespace '%s' does not exist") | |
|
1267 | % ns) | |||
1266 | namespaces.add(repo.names[pattern]) |
|
1268 | namespaces.add(repo.names[pattern]) | |
1267 | else: |
|
1269 | else: | |
1268 | for name, ns in repo.names.iteritems(): |
|
1270 | for name, ns in repo.names.iteritems(): | |
1269 | if matcher(name): |
|
1271 | if matcher(name): | |
1270 | namespaces.add(ns) |
|
1272 | namespaces.add(ns) | |
1271 | if not namespaces: |
|
1273 | if not namespaces: | |
1272 |
raise |
|
1274 | raise error.RepoLookupError(_("no namespace exists" | |
1273 | % pattern) |
|
1275 | " that match '%s'") % pattern) | |
1274 |
|
1276 | |||
1275 | names = set() |
|
1277 | names = set() | |
1276 | for ns in namespaces: |
|
1278 | for ns in namespaces: | |
@@ -1816,7 +1818,8 b' def tag(repo, subset, x):' | |||||
1816 | # avoid resolving all tags |
|
1818 | # avoid resolving all tags | |
1817 | tn = repo._tagscache.tags.get(pattern, None) |
|
1819 | tn = repo._tagscache.tags.get(pattern, None) | |
1818 | if tn is None: |
|
1820 | if tn is None: | |
1819 |
raise |
|
1821 | raise error.RepoLookupError(_("tag '%s' does not exist") | |
|
1822 | % pattern) | |||
1820 | s = set([repo[tn].rev()]) |
|
1823 | s = set([repo[tn].rev()]) | |
1821 | else: |
|
1824 | else: | |
1822 | s = set([cl.rev(n) for t, n in repo.tagslist() if matcher(t)]) |
|
1825 | s = set([cl.rev(n) for t, n in repo.tagslist() if matcher(t)]) |
@@ -133,8 +133,13 b' bookmarks revset' | |||||
133 |
|
133 | |||
134 |
|
134 | |||
135 | $ hg log -r 'bookmark(unknown)' |
|
135 | $ hg log -r 'bookmark(unknown)' | |
136 | abort: bookmark 'unknown' does not exist |
|
136 | abort: bookmark 'unknown' does not exist! | |
137 | [255] |
|
137 | [255] | |
|
138 | $ hg log -r 'bookmark("re:unknown")' | |||
|
139 | abort: no bookmarks exist that match 'unknown'! | |||
|
140 | [255] | |||
|
141 | $ hg log -r 'present(bookmark("literal:unknown"))' | |||
|
142 | $ hg log -r 'present(bookmark("re:unknown"))' | |||
138 |
|
143 | |||
139 | $ hg help revsets | grep 'bookmark(' |
|
144 | $ hg help revsets | grep 'bookmark(' | |
140 | "bookmark([name])" |
|
145 | "bookmark([name])" |
@@ -709,7 +709,7 b' check that conversion to only works' | |||||
709 | we can use patterns when searching for tags |
|
709 | we can use patterns when searching for tags | |
710 |
|
710 | |||
711 | $ log 'tag("1..*")' |
|
711 | $ log 'tag("1..*")' | |
712 | abort: tag '1..*' does not exist |
|
712 | abort: tag '1..*' does not exist! | |
713 | [255] |
|
713 | [255] | |
714 | $ log 'tag("re:1..*")' |
|
714 | $ log 'tag("re:1..*")' | |
715 | 6 |
|
715 | 6 | |
@@ -720,11 +720,17 b' we can use patterns when searching for t' | |||||
720 | $ log 'tag("re:0..*")' |
|
720 | $ log 'tag("re:0..*")' | |
721 |
|
721 | |||
722 | $ log 'tag(unknown)' |
|
722 | $ log 'tag(unknown)' | |
723 | abort: tag 'unknown' does not exist |
|
723 | abort: tag 'unknown' does not exist! | |
724 | [255] |
|
724 | [255] | |
|
725 | $ log 'tag("re:unknown")' | |||
|
726 | $ log 'present(tag("unknown"))' | |||
|
727 | $ log 'present(tag("re:unknown"))' | |||
725 | $ log 'branch(unknown)' |
|
728 | $ log 'branch(unknown)' | |
726 | abort: unknown revision 'unknown'! |
|
729 | abort: unknown revision 'unknown'! | |
727 | [255] |
|
730 | [255] | |
|
731 | $ log 'branch("re:unknown")' | |||
|
732 | $ log 'present(branch("unknown"))' | |||
|
733 | $ log 'present(branch("re:unknown"))' | |||
728 | $ log 'user(bob)' |
|
734 | $ log 'user(bob)' | |
729 | 2 |
|
735 | 2 | |
730 |
|
736 | |||
@@ -772,6 +778,15 b' we can use patterns when searching for t' | |||||
772 | 3 |
|
778 | 3 | |
773 | 1 |
|
779 | 1 | |
774 |
|
780 | |||
|
781 | $ log 'named("unknown")' | |||
|
782 | abort: namespace 'unknown' does not exist! | |||
|
783 | [255] | |||
|
784 | $ log 'named("re:unknown")' | |||
|
785 | abort: no namespace exists that match 'unknown'! | |||
|
786 | [255] | |||
|
787 | $ log 'present(named("unknown"))' | |||
|
788 | $ log 'present(named("re:unknown"))' | |||
|
789 | ||||
775 | issue2437 |
|
790 | issue2437 | |
776 |
|
791 | |||
777 | $ log '3 and p1(5)' |
|
792 | $ log '3 and p1(5)' |
General Comments 0
You need to be logged in to leave comments.
Login now