Mercurial > hg
comparison hgext/graphlog.py @ 16314:16ec050490fc
graphlog: improve --only-branch handling
The previous code was correct for command line as opts always contains the
default empty lists for --branch and --only-branch options. But calling
graphlog.revset() directly with only --only-branch set would leave it
unprocessed.
author | Patrick Mezard <patrick@mezard.eu> |
---|---|
date | Thu, 29 Mar 2012 16:55:08 +0200 |
parents | af3e67354beb |
children | 0f1e621d3d3b |
comparison
equal
deleted
inserted
replaced
16310:8ac2c91855cf | 16314:16ec050490fc |
---|---|
294 } | 294 } |
295 | 295 |
296 opts = dict(opts) | 296 opts = dict(opts) |
297 # branch and only_branch are really aliases and must be handled at | 297 # branch and only_branch are really aliases and must be handled at |
298 # the same time | 298 # the same time |
299 if 'branch' in opts and 'only_branch' in opts: | 299 opts['branch'] = opts.get('branch', []) + opts.get('only_branch', []) |
300 opts['branch'] = opts['branch'] + opts.pop('only_branch') | |
301 | |
302 follow = opts.get('follow') or opts.get('follow_first') | 300 follow = opts.get('follow') or opts.get('follow_first') |
303 followfirst = opts.get('follow_first') | 301 followfirst = opts.get('follow_first') |
304 if 'follow' in opts: | 302 if 'follow' in opts: |
305 del opts['follow'] | 303 del opts['follow'] |
306 if 'follow_first' in opts: | 304 if 'follow_first' in opts: |