##// END OF EJS Templates
Non-grouping regex for ignore...
Non-grouping regex for ignore -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Non-grouping regex for ignore Suggested by Mark Williamson manifest hash: dfd4686e7ac9f96e79da600edf299ed64213e05d -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.0 (GNU/Linux) iD8DBQFCzjX3ywK+sNU5EO8RAnc1AJ4/sKzyZJiRs6UzE3uksE2U9rOkVQCeJsZf PhHsNtEt/WyL+v44mBfk8Mk= =e+Qy -----END PGP SIGNATURE-----

File last commit:

r608:d2994b52 default
r652:a54a1c10 default
Show More
fancyopts.py
27 lines | 769 B | text/x-python | PythonLexer
mpm@selenic.com
fancyopts: drop unneeded import...
r560 import os, getopt
mpm@selenic.com
Add back links from file revisions to changeset revisions...
r0
mpm@selenic.com
A bunch of parsing/help updates...
r596 def fancyopts(args, options, state):
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
Whitespace cleanups...
r515 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)
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