mercurial/fancyopts.py
changeset 1056 34be48b4ca85
parent 981 4f81068ed8cd
child 1541 bf4e7ef08741
equal deleted inserted replaced
1043:9344f5dd4488 1056:34be48b4ca85
     5     short=''
     5     short=''
     6     map={}
     6     map={}
     7     dt={}
     7     dt={}
     8 
     8 
     9     for s, l, d, c in options:
     9     for s, l, d, c in options:
    10         map['-'+s] = map['--'+l]=l
    10         pl = l.replace('-', '_')
    11         state[l] = d
    11         map['-'+s] = map['--'+l] = pl
    12         dt[l] = type(d)
    12         state[pl] = d
       
    13         dt[pl] = type(d)
    13         if not d is None and not callable(d):
    14         if not d is None and not callable(d):
    14             if s: s += ':'
    15             if s: s += ':'
    15             if l: l += '='
    16             if l: l += '='
    16         if s: short = short + s
    17         if s: short = short + s
    17         if l: long.append(l)
    18         if l: long.append(l)