Mercurial > hg
comparison hgext/graphlog.py @ 16157:4a828d3bc04a
graphlog: --branch and --only-branch are the same
Handling the aliasing in fancyopts would be cleaner but I do not want to make
this change for stable.
author | Patrick Mezard <patrick@mezard.eu> |
---|---|
date | Thu, 23 Feb 2012 11:21:04 +0100 |
parents | 0424f3c7d7ac |
children | e04cc21b01b2 |
comparison
equal
deleted
inserted
replaced
16152:816211dfa3a5 | 16157:4a828d3bc04a |
---|---|
256 'date': ('date($)', None), | 256 'date': ('date($)', None), |
257 'branch': ('branch($)', ' or '), | 257 'branch': ('branch($)', ' or '), |
258 'exclude': ('not file($)', ' and '), | 258 'exclude': ('not file($)', ' and '), |
259 'include': ('file($)', ' and '), | 259 'include': ('file($)', ' and '), |
260 'keyword': ('keyword($)', ' or '), | 260 'keyword': ('keyword($)', ' or '), |
261 'only_branch': ('branch($)', ' and '), | |
262 'prune': ('not ($ or ancestors($))', ' and '), | 261 'prune': ('not ($ or ancestors($))', ' and '), |
263 'user': ('user($)', ' or '), | 262 'user': ('user($)', ' or '), |
264 } | 263 } |
264 | |
265 # branch and only_branch are really aliases and must be handled at | |
266 # the same time | |
267 if 'branch' in opts and 'only_branch' in opts: | |
268 opts = dict(opts) | |
269 opts['branch'] = opts['branch'] + opts.pop('only_branch') | |
270 | |
265 optrevset = [] | 271 optrevset = [] |
266 revset = [] | 272 revset = [] |
267 for op, val in opts.iteritems(): | 273 for op, val in opts.iteritems(): |
268 if not val: | 274 if not val: |
269 continue | 275 continue |