mercurial/revset.py
changeset 42004 0bd730fbcc2b
parent 42002 662ffdde5adf
child 42039 cab19d49f8bd
equal deleted inserted replaced
42003:7546bf46bfcd 42004:0bd730fbcc2b
   553     else:
   553     else:
   554         kind, pattern, matcher = stringutil.stringmatcher(b)
   554         kind, pattern, matcher = stringutil.stringmatcher(b)
   555         if kind == 'literal':
   555         if kind == 'literal':
   556             # note: falls through to the revspec case if no branch with
   556             # note: falls through to the revspec case if no branch with
   557             # this name exists and pattern kind is not specified explicitly
   557             # this name exists and pattern kind is not specified explicitly
   558             if pattern in repo.branchmap():
   558             if repo.branchmap().hasbranch(pattern):
   559                 return subset.filter(lambda r: matcher(getbranch(r)),
   559                 return subset.filter(lambda r: matcher(getbranch(r)),
   560                                      condrepr=('<branch %r>', b))
   560                                      condrepr=('<branch %r>', b))
   561             if b.startswith('literal:'):
   561             if b.startswith('literal:'):
   562                 raise error.RepoLookupError(_("branch '%s' does not exist")
   562                 raise error.RepoLookupError(_("branch '%s' does not exist")
   563                                             % pattern)
   563                                             % pattern)