# HG changeset patch # User Yuya Nishihara # Date 1514880048 -32400 # Node ID 668c5a527eff7cabbb8b98f32f3a6c94d6dd19b6 # Parent e64baf32782ad41eacf61c25ce9b4ca543285283 log: simplify 'x or ancestors(x)' expression 'ancestors(x)' includes 'x'. diff -r e64baf32782a -r 668c5a527eff mercurial/cmdutil.py --- 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 '), } diff -r e64baf32782a -r 668c5a527eff tests/test-glog.t --- 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')))) , , - , - >>>>, - , , - >>>> + >>>, + , + >>> Dedicated repo for --follow and paths filtering. The g is crafted to have 2 filelog topological heads in a linear changeset graph.