Mercurial > hg > mercurial-source
diff tests/test-glog.t @ 28658:b19d8d5d6b51 stable
revset: flatten chained 'list' operations (aka function args) (issue5072)
Internal _matchfiles() function can take bunch of arguments, which would
lead to a maximum recursion depth error. This patch avoids the excessive
stack use by flattening 'list' nodes beforehand.
Since getlist() no longer takes a nested 'list' nodes, _parsealiasdecl()
also needs to flatten argument list, "aliasname($1, $2, ...)".
author | Yuya Nishihara <yuya@tcha.org> |
---|---|
date | Tue, 02 Feb 2016 23:49:49 +0900 |
parents | 1df9b8b2abda |
children | 6a4a4ca21907 |
line wrap: on
line diff
--- a/tests/test-glog.t +++ b/tests/test-glog.t @@ -1602,11 +1602,9 @@ (func ('symbol', '_matchfiles') (list - (list - (list - ('string', 'r:') - ('string', 'd:relpath')) - ('string', 'p:a')) + ('string', 'r:') + ('string', 'd:relpath') + ('string', 'p:a') ('string', 'p:c')))) Test multiple --include/--exclude/paths @@ -1617,19 +1615,13 @@ (func ('symbol', '_matchfiles') (list - (list - (list - (list - (list - (list - (list - ('string', 'r:') - ('string', 'd:relpath')) - ('string', 'p:a')) - ('string', 'p:e')) - ('string', 'i:a')) - ('string', 'i:e')) - ('string', 'x:b')) + ('string', 'r:') + ('string', 'd:relpath') + ('string', 'p:a') + ('string', 'p:e') + ('string', 'i:a') + ('string', 'i:e') + ('string', 'x:b') ('string', 'x:e')))) Test glob expansion of pats @@ -1668,9 +1660,8 @@ (func ('symbol', '_matchfiles') (list - (list - ('string', 'r:') - ('string', 'd:relpath')) + ('string', 'r:') + ('string', 'd:relpath') ('string', 'p:dir'))))) $ hg up -q tip @@ -1693,9 +1684,8 @@ (func ('symbol', '_matchfiles') (list - (list - ('string', 'r:') - ('string', 'd:relpath')) + ('string', 'r:') + ('string', 'd:relpath') ('string', 'p:glob:*'))))) Test --follow on a single rename @@ -1836,9 +1826,8 @@ (func ('symbol', '_matchfiles') (list - (list - ('string', 'r:') - ('string', 'd:relpath')) + ('string', 'r:') + ('string', 'd:relpath') ('string', 'p:set:copied()')))) $ testlog --include "set:copied()" [] @@ -1846,9 +1835,8 @@ (func ('symbol', '_matchfiles') (list - (list - ('string', 'r:') - ('string', 'd:relpath')) + ('string', 'r:') + ('string', 'd:relpath') ('string', 'i:set:copied()')))) $ testlog -r "sort(file('set:copied()'), -rev)" ["sort(file('set:copied()'), -rev)"] @@ -1865,9 +1853,8 @@ (func ('symbol', '_matchfiles') (list - (list - ('string', 'r:') - ('string', 'd:relpath')) + ('string', 'r:') + ('string', 'd:relpath') ('string', 'p:a')))) $ testlog --removed --follow a [] @@ -1879,9 +1866,8 @@ (func ('symbol', '_matchfiles') (list - (list - ('string', 'r:') - ('string', 'd:relpath')) + ('string', 'r:') + ('string', 'd:relpath') ('string', 'p:a'))))) Test --patch and --stat with --follow and --follow-first @@ -2271,9 +2257,8 @@ (func ('symbol', '_matchfiles') (list - (list - ('string', 'r:') - ('string', 'd:relpath')) + ('string', 'r:') + ('string', 'd:relpath') ('string', 'p:.')))) $ testlog ../b []