##// END OF EJS Templates
revlog: allow duplicates...
revlog: allow duplicates -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 revlog: allow duplicates If two branches make the same change to the same parent, the result will be an identical hash. Git apparently does this all the time. Deal with it gracefully. manifest hash: c6217eab4b310e1ae529dd75ab90e717dbe5d55d -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.0 (GNU/Linux) iD8DBQFCqU61ywK+sNU5EO8RAkFqAJ9KhWUQgjZbzzB/+mTkolH0GkT1awCfa+Mj ulbI4xCRZcvfQE492mcNwQA= =N6In -----END PGP SIGNATURE-----

File last commit:

r293:11d64332 default
r301:5add718d 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