mercurial/fancyopts.py
changeset 959 0aaeee519c66
parent 667 31a9aa890016
child 981 4f81068ed8cd
equal deleted inserted replaced
958:d845a1f174bb 959:0aaeee519c66
     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         map['-'+s] = map['--'+l]=l
    11         state[l] = d
    11         state[l] = d
    12         dt[l] = type(d)
    12         dt[l] = type(d)
    13         if not d is None and not callable(d): s, l=s+':', l+'='
    13         if not d is None and not callable(d):
       
    14             if s: s += ':'
       
    15             if l: l += '='
    14         if s: short = short + s
    16         if s: short = short + s
    15         if l: long.append(l)
    17         if l: long.append(l)
    16 
    18 
    17     opts, args = getopt.getopt(args, short, long)
    19     opts, args = getopt.getopt(args, short, long)
    18 
    20