Commit Graph

261 Commits

Author SHA1 Message Date
Bryan O'Sullivan
920a086a80 Demand-load most modules in the commands and ui modules.
# HG changeset patch
# User Bryan O'Sullivan <bos@serpentine.com>
# Node ID 059c6e42fc4221816e26a72bef8cf780891989ca
# Parent  4309b0a5a6010dd2e5811b77d2bc29a51acf290f
Demand-load most modules in the commands and ui modules.

This improves response times for a number of simple commands, as the
Python interpreter doesn't end up loading modules that it never uses.

There's less benefit to demand-loading in other modules.
2005-07-04 12:16:27 -08:00
Matt Mackall
c77de876fa 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-----
2005-07-03 21:51:09 -08:00
mpm@selenic.com
3f8a95f419 [PATCH] Make ui.warn write to stderr
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

[PATCH] Make ui.warn write to stderr

From: Bryan O'Sullivan <bos@serpentine.com>

> Someone is probably using ui.write instead of ui.warn.

Actually, ui.warn uses ui.write.  So hg never prints to stderr right
now.  Here's a patch to fix that.

[mpm: add sys.stdout.flush()]

manifest hash: c09c645a5985b640a7ad884afb0eeb11fcffbb19
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.0 (GNU/Linux)

iD8DBQFCxcEaywK+sNU5EO8RAhWUAJ9vVteAodKC9zIhIWUuPqVl2d915QCePp5S
asuv62w4Zv+o0gB3SoucYdQ=
=NYrs
-----END PGP SIGNATURE-----
2005-07-01 14:18:02 -08:00
mpm@selenic.com
0fb5db6915 Whitespace cleanups
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Whitespace cleanups

manifest hash: ac954bc3a4f034c12638a259ecd65841f5b63c5c
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.0 (GNU/Linux)

iD8DBQFCwuubywK+sNU5EO8RAluIAJ98XQpNdZUpSmYKgDmrMRlbL76ZzQCfes0t
rknNUN/PhtyA4bzL646dOz4=
=UyCE
-----END PGP SIGNATURE-----
2005-06-29 10:42:35 -08:00
mpm@selenic.com
1c414eddc0 [PATCH] Harden os.system
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

[PATCH] Harden os.system

From: Bryan O'Sullivan <bos@serpentine.com>

Add util.system function.  This is similar to os.system, but will
either succeed (if the process finishes with a zero exit code) or raise
a util.CommandError (if the process exits uncleanly or is killed by
a signal).

Add util.explain_exit function.  This tends to be ubiquitous in code
that calls other processes, and must describe what has gone wrong.

Change some uses of os.system over to util.system.

manifest hash: e3bf4adcac5b915432ec0af00efdbcef86bea4b1
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.0 (GNU/Linux)

iD8DBQFCwSipywK+sNU5EO8RAr0RAJkBDt8XQ7mYQAWNHNgTOVt1eyWU1QCfe1oO
2OwxyWqpbRNACVJHHfZ3/Xw=
=OaRX
-----END PGP SIGNATURE-----
2005-06-28 02:38:33 -08:00
mpm@selenic.com
8d07742680 [PATCH] Add ui.expandpath command
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

[PATCH] Add ui.expandpath command

From: Bryan O'Sullivan <bos@serpentine.com>

Add ui.expandpath function.

manifest hash: dd2b9e536b94b453b06604b88ba339d93698b2e0
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.0 (GNU/Linux)

iD8DBQFCwSbMywK+sNU5EO8RAibuAJ9jAMqhR3cbTqbPG3g9M8INgFmbvACgjAU2
LpalLI+zhalEUIf1Uw8W5l8=
=fqB8
-----END PGP SIGNATURE-----
2005-06-28 02:30:36 -08:00
mpm@selenic.com
2bdabb4c9d Add support for .hg/hgrc file
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Add support for .hg/hgrc file

manifest hash: a6d2fc7ed8d56e2f0d65aad78a4d8359898ca246
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.0 (GNU/Linux)

iD8DBQFCr5QZywK+sNU5EO8RApnlAJ9nD65i2aEQcljV+Y39zgImpcdtgwCgpT9G
O2D8FDFpRNyYki/QPt5e/AQ=
=bQCZ
-----END PGP SIGNATURE-----
2005-06-14 18:36:09 -08:00
mpm@selenic.com
9299550092 ui: add configuration file support
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

ui: add configuration file support

manifest hash: 2d0768a6f3797d4ccc870170b874bfd7aeb2f787
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.0 (GNU/Linux)

iD8DBQFCp3TyywK+sNU5EO8RArYYAJ4+wWQmO7HIXewuGwB3a5DjiWGHwgCcDpeF
Pz2lScnpVZPPbDQiS+VnBnM=
=ffwc
-----END PGP SIGNATURE-----
2005-06-08 14:45:06 -08:00
mpm@selenic.com
f95bf8d95c import and startup cleanups
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

import and startup cleanups

add commands:run()
add copyright notice to commands
eliminate/reorganize imports to speed up start time:

0.5b:
$ time bash -c 'for i in `seq 100`; do ~/bin/hg > /dev/null; done'

real    0m7.718s
user    0m6.719s
sys     0m0.794s

new:

$ time bash -c 'for i in `seq 100`; do hg > /dev/null; done'
real    0m2.171s
user    0m1.684s
sys     0m0.444s

just python:

$ time bash -c 'for i in `seq 100`; do python -c pass; done'
real    0m0.988s
user    0m0.771s
sys     0m0.207s

Ignoring the fixed cost of loading the Python interpreter, we're 5.6
times faster. With the Python load time, we're still 3.5 times faster.

manifest hash: acce5882a55c76eb165316f5741724c8ce4ef587
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.0 (GNU/Linux)

iD8DBQFCoihAywK+sNU5EO8RAqMdAJwMe6Ur0R9G6jjayNa5hH2C3c4k/gCeIYvc
N178vaWWGciX9zq+g5qCAls=
=buhv
-----END PGP SIGNATURE-----
2005-06-04 14:16:32 -08:00
Thomas Arendsen Hein
344b9ab253 ui.warn can use more than one argument like the other ui methods. 2005-06-02 07:06:29 +01:00
mpm@selenic.com
5064b78681 Move ui class to its own module
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Move ui class to its own module

manifest hash: f75c8f9cdfe16f143ab633d0072c14ba88ac88be
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.0 (GNU/Linux)

iD8DBQFCnVxxywK+sNU5EO8RAgPgAJ48p7w4Do/saCC8WkBvHj/rdnoiEgCgrSs9
Wu1fOSgST3rn/2JpZAdFRdA=
=91tt
-----END PGP SIGNATURE-----
2005-05-31 22:57:53 -08:00