comparison mercurial/fancyopts.py @ 3742:86c1d1d35593

Fix argument handling for hg -v pull -v x (issue 436)
author Matt Mackall <mpm@selenic.com>
date Fri, 01 Dec 2006 01:42:52 -0600
parents eb0b4a2d70a9
children f9567a7fa3b3
comparison
equal deleted inserted replaced
3741:0897bf8d54c7 3742:86c1d1d35593
22 for opt, arg in opts: 22 for opt, arg in opts:
23 if dt[map[opt]] is type(fancyopts): state[map[opt]](state, map[opt], arg) 23 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) 24 elif dt[map[opt]] is type(1): state[map[opt]] = int(arg)
25 elif dt[map[opt]] is type(''): state[map[opt]] = arg 25 elif dt[map[opt]] is type(''): state[map[opt]] = arg
26 elif dt[map[opt]] is type([]): state[map[opt]].append(arg) 26 elif dt[map[opt]] is type([]): state[map[opt]].append(arg)
27 elif dt[map[opt]] is type(None): state[map[opt]] = 1 27 elif dt[map[opt]] is type(None): state[map[opt]] = True
28 28
29 return args 29 return args
30 30