mercurial/fancyopts.py
changeset 608 d2994b5298fb
parent 596 9a8daeff0ffa
child 667 31a9aa890016
equal deleted inserted replaced
607:94744f6fe0e7 608:d2994b5298fb
    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): s, l=s+':', l+'='
    14         if s: short = short + s
    14         if s: short = short + s
    15         if l: long.append(l)
    15         if l: long.append(l)
    16 
    16 
    17     if os.environ.has_key("HG_OPTS"):
       
    18         args = os.environ["HG_OPTS"].split() + args
       
    19 
       
    20     opts, args = getopt.getopt(args, short, long)
    17     opts, args = getopt.getopt(args, short, long)
    21 
    18 
    22     for opt, arg in opts:
    19     for opt, arg in opts:
    23         if dt[map[opt]] is type(fancyopts): state[map[opt]](state,map[opt],arg)
    20         if dt[map[opt]] is type(fancyopts): state[map[opt]](state,map[opt],arg)
    24         elif dt[map[opt]] is type(1): state[map[opt]] = int(arg)
    21         elif dt[map[opt]] is type(1): state[map[opt]] = int(arg)