Show More
@@ -734,9 +734,12 b' def branch(repo, subset, x):' | |||||
734 | kind, pattern, matcher = util.stringmatcher(b) |
|
734 | kind, pattern, matcher = util.stringmatcher(b) | |
735 | if kind == 'literal': |
|
735 | if kind == 'literal': | |
736 | # note: falls through to the revspec case if no branch with |
|
736 | # note: falls through to the revspec case if no branch with | |
737 | # this name exists |
|
737 | # this name exists and pattern kind is not specified explicitly | |
738 | if pattern in repo.branchmap(): |
|
738 | if pattern in repo.branchmap(): | |
739 | return subset.filter(lambda r: matcher(getbi(r)[0])) |
|
739 | return subset.filter(lambda r: matcher(getbi(r)[0])) | |
|
740 | if b.startswith('literal:'): | |||
|
741 | raise error.RepoLookupError(_("branch '%s' does not exist") | |||
|
742 | % pattern) | |||
740 | else: |
|
743 | else: | |
741 | return subset.filter(lambda r: matcher(getbi(r)[0])) |
|
744 | return subset.filter(lambda r: matcher(getbi(r)[0])) | |
742 |
|
745 |
@@ -1328,6 +1328,9 b' we can use patterns when searching for t' | |||||
1328 | $ log 'branch(unknown)' |
|
1328 | $ log 'branch(unknown)' | |
1329 | abort: unknown revision 'unknown'! |
|
1329 | abort: unknown revision 'unknown'! | |
1330 | [255] |
|
1330 | [255] | |
|
1331 | $ log 'branch("literal:unknown")' | |||
|
1332 | abort: branch 'unknown' does not exist! | |||
|
1333 | [255] | |||
1331 | $ log 'branch("re:unknown")' |
|
1334 | $ log 'branch("re:unknown")' | |
1332 | $ log 'present(branch("unknown"))' |
|
1335 | $ log 'present(branch("unknown"))' | |
1333 | $ log 'present(branch("re:unknown"))' |
|
1336 | $ log 'present(branch("re:unknown"))' |
General Comments 0
You need to be logged in to leave comments.
Login now