log -b: use opts.get() instead of assuming opts is correctly filled
authorBenoit Boissinot <benoit.boissinot@ens-lyon.org>
Tue, 20 Apr 2010 01:08:20 +0200
changeset 10963 9e314c5e6890
parent 10962 8d5f5122a732
child 10964 aa0426c79664
log -b: use opts.get() instead of assuming opts is correctly filled
mercurial/commands.py
--- a/mercurial/commands.py	Mon Apr 19 17:00:02 2010 -0500
+++ b/mercurial/commands.py	Tue Apr 20 01:08:20 2010 +0200
@@ -2161,8 +2161,8 @@
     if opts["date"]:
         df = util.matchdate(opts["date"])
 
-    opts['branch'] += opts.get('only_branch')
-    opts['branch'] = [repo.lookupbranch(b) for b in opts['branch']]
+    branches = opts.get('branch', []) + opts.get('only_branch', [])
+    opts['branch'] = [repo.lookupbranch(b) for b in branches]
 
     displayer = cmdutil.show_changeset(ui, repo, opts, True, matchfn)
     def prep(ctx, fns):