diff --git a/mercurial/cmdutil.py b/mercurial/cmdutil.py --- a/mercurial/cmdutil.py +++ b/mercurial/cmdutil.py @@ -2523,7 +2523,7 @@ def getlogrevs(repo, pats, opts): if not (revs.isdescending() or revs.istopo()): revs.sort(reverse=True) if expr: - matcher = revset.match(repo.ui, expr) + matcher = revset.match(None, expr) revs = matcher(repo, revs) if limit is not None: revs = revs.slice(0, limit) diff --git a/tests/test-log.t b/tests/test-log.t --- a/tests/test-log.t +++ b/tests/test-log.t @@ -1252,6 +1252,16 @@ User $ hg log -u "user3" +"-u USER" shouldn't be overridden by "user(USER)" alias + + $ hg log --config 'revsetalias.user(x)=branch(x)' -u default + $ hg log --config 'revsetalias.user(x)=branch(x)' -u user1 + changeset: 0:29a4c94f1924 + user: User One + date: Thu Jan 01 00:00:00 1970 +0000 + summary: a + + $ cd .. $ hg init branches