Bug 4311 - revsetaliases are not usable with histedit
Summary: revsetaliases are not usable with histedit
Status: RESOLVED FIXED
Alias: None
Product: Mercurial
Classification: Unclassified
Component: histedit (show other bugs)
Version: unspecified
Hardware: PC Windows
: normal bug
Assignee: Bugzilla
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-07-21 07:42 UTC by markrian
Modified: 2014-09-04 13:48 UTC (History)
5 users (show)

See Also:
Python Version: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description markrian 2014-07-21 07:42 UTC
Tested on mercurial 3.0.1 on Windows.

I have the following in ~/.hgrc:

[revsetalias]
next($1) = limit(descendants($1) and not $1, 1)

I get the following error if I try to use that with histedit:

$ hg histedit -r "next(123)"
hg: parse error: not a function: next

The revsetalias does work on other commands, though:

$ hg log -r "next(123)"
changeset:   124:ecd3f137065e
[...]

I'm almost certain this used to work, probably on 2.6 or 2.8.
Comment 1 Matt Mackall 2014-07-21 12:40 UTC
Alias expansion is disabled in internal revsets (to avoid user-defined revsets fouling up internals) so this is probably caused by a user-supplied revset being evaluated inside an internal expression.
Comment 2 HG Bot 2014-07-30 16:15 UTC
Fixed by http://selenic.com/repo/hg/rev/af44c7a1e55e
Augie Fackler <raf@durin42.com>
histedit: respect revsetalias entries (issue4311)

We now expand user-provided revsets before using repo.revs() to locate
the root(s) of the user-specified set.

(please test the fix)