##// END OF EJS Templates
Transparent proxy support...
Transparent proxy support -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Transparent proxy support Originally from "Michael S. Tsirkin" <mst@mellanox.co.il> manifest hash: 74cf7456ef35ff8d4c007544f0d1a57c69d3c929 -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.0 (GNU/Linux) iD8DBQFCrSIUywK+sNU5EO8RAje1AJ41ALW8soF78Mo3UTraV1QQvJoFSQCgrqvc I9ohlI4hzdjOD+wSwRGlERQ= =Ugfi -----END PGP SIGNATURE-----

File last commit:

r293:11d64332 default
r321:73b8a8a0 default
Show More
fancyopts.py
30 lines | 894 B | text/x-python | PythonLexer
mpm@selenic.com
Add back links from file revisions to changeset revisions...
r0 import sys, os, getopt
mpm@selenic.com
Make fancyopts handle no arguments...
r164 def fancyopts(args, options, state, syntax='', minlen = 0):
mpm@selenic.com
Add back links from file revisions to changeset revisions...
r0 long=[]
short=''
map={}
dt={}
for s, l, d, c in options:
map['-'+s] = map['--'+l]=l
state[l] = d
dt[l] = type(d)
mpm@selenic.com
hg help improvements...
r293 if not d is None and not callable(d): s, l=s+':', l+'='
mpm@selenic.com
Add back links from file revisions to changeset revisions...
r0 if s: short = short + s
if l: long.append(l)
if os.environ.has_key("HG_OPTS"):
args = os.environ["HG_OPTS"].split() + args
mpm@selenic.com
hg help improvements...
r293 opts, args = getopt.getopt(args, short, long)
mpm@selenic.com
Add back links from file revisions to changeset revisions...
r0
for opt, arg in opts:
mpm@selenic.com
hg help improvements...
r293 if dt[map[opt]] is type(fancyopts): state[map[opt]](state,map[opt],arg)
mpm@selenic.com
Add back links from file revisions to changeset revisions...
r0 elif dt[map[opt]] is type(1): state[map[opt]] = int(arg)
elif dt[map[opt]] is type(''): state[map[opt]] = arg
elif dt[map[opt]] is type([]): state[map[opt]].append(arg)
elif dt[map[opt]] is type(None): state[map[opt]] = 1
mpm@selenic.com
Beginning of new command parsing interface...
r209
mpm@selenic.com
Add back links from file revisions to changeset revisions...
r0 return args