Mercurial > hg > mercurial-crew-with-dirclash
comparison mercurial/fancyopts.py @ 608:d2994b5298fb
Add username/merge/editor to .hgrc
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Add username/merge/editor to .hgrc
These take priority over the equivalent environment vars
Deprecate HGMERGE, HGUSER, and HGEDITOR in docs
Add ui section to docs
Remove undocumented HG_OPTS
Raise username code out of changelog class
Make tests ignore ~/.hgrc
manifest hash: d127ef02bc5266036b4c77a55319519e91bd475b
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.0 (GNU/Linux)
iD8DBQFCyM5NywK+sNU5EO8RAuU7AJ9zKk1TFrJXHM04jOOJJeBSp8jlTgCeP+tr
qwGFd+WaNqTepZ0wun5g9Uc=
=QEBu
-----END PGP SIGNATURE-----
author | Matt Mackall <mpm@selenic.com> |
---|---|
date | Sun, 03 Jul 2005 21:51:09 -0800 |
parents | 9a8daeff0ffa |
children | 31a9aa890016 |
comparison
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) |