Mercurial > hg
changeset 35643:668c5a527eff
log: simplify 'x or ancestors(x)' expression
'ancestors(x)' includes 'x'.
author | Yuya Nishihara <yuya@tcha.org> |
---|---|
date | Tue, 02 Jan 2018 17:00:48 +0900 |
parents | e64baf32782a |
children | 7a0a90d63a8c |
files | mercurial/cmdutil.py tests/test-glog.t |
diffstat | 2 files changed, 12 insertions(+), 22 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/cmdutil.py Tue Jan 02 16:58:37 2018 +0900 +++ b/mercurial/cmdutil.py Tue Jan 02 17:00:48 2018 +0900 @@ -2352,7 +2352,7 @@ '_patsfollow': ('follow(%(val)r)', ' or '), '_patsfollowfirst': ('_followfirst(%(val)r)', ' or '), 'keyword': ('keyword(%(val)r)', ' or '), - 'prune': ('not (%(val)r or ancestors(%(val)r))', ' and '), + 'prune': ('not ancestors(%(val)r)', ' and '), 'user': ('user(%(val)r)', ' or '), }
--- a/tests/test-glog.t Tue Jan 02 16:58:37 2018 +0900 +++ b/tests/test-glog.t Tue Jan 02 17:00:48 2018 +0900 @@ -1573,34 +1573,24 @@ [] (and (not - (or - (list - (string '31') - (func - (symbol 'ancestors') - (string '31'))))) + (func + (symbol 'ancestors') + (string '31'))) (not - (or - (list - (string '32') - (func - (symbol 'ancestors') - (string '32')))))) + (func + (symbol 'ancestors') + (string '32')))) <filteredset <filteredset <spanset- 0:37>, <not - <addset - <baseset [31]>, - <filteredset - <spanset- 0:37>, - <generatorsetdesc+>>>>>, - <not - <addset - <baseset [32]>, <filteredset <spanset- 0:37>, - <generatorsetdesc+>>>>> + <generatorsetdesc+>>>>, + <not + <filteredset + <spanset- 0:37>, + <generatorsetdesc+>>>> Dedicated repo for --follow and paths filtering. The g is crafted to have 2 filelog topological heads in a linear changeset graph.