Mercurial > hg-stable
diff hgext/graphlog.py @ 16159:ec33539b61f6
graphlog: paths arguments must be or'ed
author | Patrick Mezard <patrick@mezard.eu> |
---|---|
date | Thu, 23 Feb 2012 17:54:42 +0100 |
parents | e04cc21b01b2 |
children | 1bfc7ba8b404 |
line wrap: on
line diff
--- a/hgext/graphlog.py Thu Feb 23 11:21:30 2012 +0100 +++ b/hgext/graphlog.py Thu Feb 23 17:54:42 2012 +0100 @@ -257,17 +257,19 @@ 'branch': ('branch(%(val)r)', ' or '), 'exclude': ('not file(%(val)r)', ' and '), 'include': ('file(%(val)r)', ' and '), + '_pats': ('file(%(val)r)', ' or '), 'keyword': ('keyword(%(val)r)', ' or '), 'prune': ('not (%(val)r or ancestors(%(val)r))', ' and '), 'user': ('user(%(val)r)', ' or '), 'rev': ('%(val)s', ' or '), } + opts = dict(opts) # branch and only_branch are really aliases and must be handled at # the same time if 'branch' in opts and 'only_branch' in opts: - opts = dict(opts) opts['branch'] = opts['branch'] + opts.pop('only_branch') + opts['_pats'] = list(pats) revset = [] for op, val in opts.iteritems(): @@ -285,9 +287,6 @@ expr = '(' + andor.join((revop % {'val': v}) for v in val) + ')' revset.append(expr) - for path in pats: - revset.append('file(%r)' % path) - if revset: revset = '(' + ' and '.join(revset) + ')' else: