Mercurial > hg
diff Makefile @ 16772:30e46d7138de stable
revset: fix infinite alias expansion detection
The alias expansion code it changed from:
1- Get replacement tree
2- Substitute arguments in the replacement tree
3- Expand the replacement tree again
into:
1- Get the replacement tree
2- Expand the replacement tree
3- Expand the arguments
4- Substitute the expanded arguments in the replacement tree
and fixes cases like:
[revsetalias]
level1($1, $2) = $1 or $2
level2($1, $2) = level1($2, $1)
$ hg log -r "level2(level1(1, 2), 3)"
where the original version incorrectly aborted on infinite expansion
error, because it was confusing the expanded aliases with their
arguments.
author | Patrick Mezard <patrick@mezard.eu> |
---|---|
date | Sat, 19 May 2012 17:19:55 +0200 |
parents | 3c398032bf46 |
children | 682a8ad26138 |