# HG changeset patch # User Bryan O'Sullivan # Date 1124947555 25200 # Node ID 34be48b4ca852c89fda5ad242a7ed47151758bcd # Parent 9344f5dd448843e211af39423542bc23037b6843 Map long option names containing dashes to ones containing underscores. diff --git a/mercurial/fancyopts.py b/mercurial/fancyopts.py --- a/mercurial/fancyopts.py +++ b/mercurial/fancyopts.py @@ -7,9 +7,10 @@ def fancyopts(args, options, state): dt={} for s, l, d, c in options: - map['-'+s] = map['--'+l]=l - state[l] = d - dt[l] = type(d) + pl = l.replace('-', '_') + map['-'+s] = map['--'+l] = pl + state[pl] = d + dt[pl] = type(d) if not d is None and not callable(d): if s: s += ':' if l: l += '='