[PATCH] revset: don't error out if tokens parse as existing symbols

Yuya Nishihara yuya at tcha.org
Sat May 2 23:35:10 CDT 2015


On Sat, 02 May 2015 13:59:04 -0400, Jordi GutiƩrrez Hermoso wrote:
> On Sat, 2015-05-02 at 19:51 +0900, Yuya Nishihara wrote:
> > On Sat, 02 May 2015 00:50:58 -0400, Jordi GutiƩrrez Hermoso wrote:
> > > @@ -291,6 +291,11 @@ quoting needed
> > >    $ log '"date"'
> > >    abort: unknown revision 'date'!
> > >    [255]
> > > +  $ hg book date -r 4
> > > +  $ log 'date'
> > > +  4
> > 
> > It doesn't test the revset function because old-style revision can be caught
> > by scmutil.revrange().
> 
> I beg your pardon?
> 
> Here the revset is "date", not "4", unless I am much mistaken. This
> test certainly failed before this patch, so I am almost sure it's
> going through the symbolset function.

See
http://selenic.com/repo/hg/file/e9edd53770fb/mercurial/scmutil.py#l757

% hg log -r date
hg: parse error: can't use date here
% hg book date
% hg log -r date
changeset:   -1:000000000000
bookmark:    date
tag:         tip
user:        
date:        Thu Jan 01 00:00:00 1970 +0000
% hg debugrevspec date
hg: parse error: can't use date here


More information about the Mercurial-devel mailing list