# HG changeset patch # User Matt Mackall # Date 1321556021 21600 # Node ID f98d6e234cd9ae0a6d1a7bd30bec47af34d2d725 # Parent bfd1c264f6cba2c07a81d21bb2e7e8f2feaf8987 util: eliminate py2.6 if/else expression diff -r bfd1c264f6cb -r f98d6e234cd9 hglib/util.py --- a/hglib/util.py Thu Nov 10 17:45:57 2011 -0600 +++ b/hglib/util.py Thu Nov 17 12:53:41 2011 -0600 @@ -81,7 +81,10 @@ arg = arg.replace('_', '-') if arg != '-': - arg = '-' + arg if len(arg) == 1 else '--' + arg + if len(arg) == 1: + arg = '-' + arg + else: + arg = '--' + arg if isinstance(val, bool): if val: cmd.append(arg)