diff mercurial/logcmdutil.py @ 46042:1bf2b44c4007

log: do not accept string-matcher pattern as -u/-b/-B parameter I'm pretty sure this is a bug introduced after we've switched the filtering backend to revset matcher.
author Yuya Nishihara <yuya@tcha.org>
date Tue, 01 Dec 2020 20:22:24 +0900
parents 9c0db3671008
children 4a012e531066 9842c00f0252
line wrap: on
line diff
--- a/mercurial/logcmdutil.py	Tue Dec 01 19:32:36 2020 +0900
+++ b/mercurial/logcmdutil.py	Tue Dec 01 20:22:24 2020 +0900
@@ -898,13 +898,13 @@
 def _makerevset(repo, wopts, slowpath):
     """Return a revset string built from log options and file patterns"""
     opts = {
-        b'branch': [repo.lookupbranch(b) for b in wopts.branches],
+        b'branch': [b'literal:' + repo.lookupbranch(b) for b in wopts.branches],
         b'date': wopts.date,
         b'keyword': wopts.keywords,
         b'no_merges': wopts.no_merges,
         b'only_merges': wopts.only_merges,
         b'prune': wopts.prune_ancestors,
-        b'user': wopts.users,
+        b'user': [b'literal:' + v for v in wopts.users],
     }
 
     if wopts.filter_revisions_by_pats and slowpath: