Commit Graph

33 Commits

Author SHA1 Message Date
Matt Mackall
7f3bf9b19d error: move SignalInterrupt
now derived from KeyboardInterrupt to simplify catches
2009-01-12 11:48:05 -06:00
Matt Mackall
e61d364b61 error: move UnknownCommand and AmbiguousCommand 2009-01-12 11:39:38 -06:00
Matt Mackall
534da54d07 error: move UnexpectedOutput (now ResponseError) 2009-01-12 11:28:28 -06:00
Matt Mackall
76c90d50e6 error: move lock errors
rename LockException to LockError
2009-01-12 11:09:14 -06:00
Matt Mackall
e0735a1762 error: move repo errors
rename NoCapability to CapabilityError
2009-01-12 10:42:31 -06:00
Matt Mackall
d3bf622cc2 error: move ParseError 2009-01-11 23:04:24 -06:00
Matt Mackall
d15d559b7c errors: move revlog errors
- create error.py for exception classes to reduce demandloading
- move revlog exceptions to it
- change users to import error and drop revlog import if possible
2009-01-11 22:48:28 -06:00
Matt Mackall
356502607f refactor version code
- simplify version detection code
- move detection code into setup.py
- move version reading function into util.py
- drop version.py code

This makes hg more closely follow its own recommendation of how to deal with
versioning your builds: use hg id in your build script.
2009-01-10 18:02:38 -06:00
Benoit Boissinot
4668c151a4 use inst.args instead of using __getitem__ directly
DeprecationWarning: __getitem__ not supported for exception classes in 3.x;
use args attribute
2008-12-06 15:57:11 +01:00
Matt Mackall
648df6f0b1 dispatch: generalize signature checking for extension command wrapping 2008-11-18 16:02:14 -06:00
Benoit Boissinot
ea7fe6dacc remove unused variables 2008-10-28 19:25:26 +01:00
Thomas Arendsen Hein
ba25030ab6 Minor cleanup: Add missing space forgotten in recent change. 2008-10-23 19:27:25 +02:00
Matt Mackall
bebeb261d5 findcmd: have dispatch look up strict flag 2008-10-22 17:34:08 -05:00
Benoit Boissinot
ebcbcef11c merge with -stable 2008-09-06 17:04:01 +02:00
Benoit Boissinot
61cdb0bdd6 show extensions loaded on traceback 2008-09-05 10:00:57 +02:00
Benoit Boissinot
d179cdfe82 a socket error might be a tuple or a singleton 2008-09-06 00:45:13 +02:00
Joel Rosdahl
c26213193c Avoid importing mercurial.node/mercurial.repo stuff from mercurial.hg 2008-03-06 22:51:16 +01:00
Joel Rosdahl
5dae3059a0 Expand import * to allow Pyflakes to find problems 2008-03-06 22:23:26 +01:00
Jesse Glick
d21d195944 Infer a --repository argument from command arguments when reasonable.
In particular: if invoked without -R from a CWD not inside a repo, having been
passed one or more file paths as command arguments, where the nearest enclosing
repo of all of those paths is the same, quietly infer a -R option for that repo.
Otherwise abort with an error message as before.
2008-01-25 04:11:32 -05:00
Thomas Arendsen Hein
6f399a19b1 merge backout 2008-02-18 19:21:33 +01:00
Thomas Arendsen Hein
4d33c02751 Backed out changeset 8105fa3c7347 (see issue971/msg5317) 2008-02-18 19:20:22 +01:00
Bryan O'Sullivan
dfa3e1ea9b profiling: allow CGI and FastCGI to be profiled 2008-02-01 13:09:45 -08:00
Matt Mackall
d743a8c08a hooks: fix pre- and post- hooks specified in .hg/hgrc
We were looking up hooks in the wrong ui object. Also, we weren't
handling hooks to commands without a repo.
2008-01-18 09:03:17 -06:00
Kirill Smelkov
e928c8fcaf dispatch: allow extensions to provide setup code
we'll need this soon, when record extension will optionally depend
on mq early -- when preparing cmdtable.

Also, if accepted, ExtensionHowto wiki should be updated as well.
2008-01-10 12:07:18 +03:00
Peter Arrenbrecht
18fb9f5e5e Fix income/pull with bundle and -R (issue 820).
Uses ui.setconfig() to tell bundlerepo where the main repo is. This is
needed for when the --repository option is used.

Adds tests to test-bundle and a new test script
test-mq-pull-from-bundle, which plays out the situation that initially
made me detect this bug

(hg -R .hg/patches pull ../bundle.hg).
2007-12-18 14:11:13 -06:00
Matt Mackall
2b6b8e4e67 dispatch: report OOM rather than traceback 2007-12-10 10:23:45 -06:00
Matt Mackall
ad28be7c23 i18n: fix complaints from pygettext 2007-11-20 15:54:25 -06:00
Alexis S. L. Carvalho
e073cf982f Set bundle.mainreporoot only after checking that it's a local repo
Fixes issue977.
2008-02-14 18:08:16 -02:00
Bryan O'Sullivan
b945cf7339 profile: expand PID in output file name 2008-02-01 13:31:46 -08:00
Alexis S. L. Carvalho
d11dad17a3 Remove demandimport.enable from dispatch.py 2007-08-18 14:25:55 -03:00
Alexis S. L. Carvalho
0f222fbdf3 Move enabling of demandimport to dispatch.py
This avoids loading many modules before enabling demandimport.
2007-08-17 17:33:27 -03:00
Alexis S. L. Carvalho
dc23a7db18 Move cmdtable and reposetup handling out of extensions.py
A new function (extensions.extensions) allows the code that is
interested in those attributes to handle them directly.

This allows some cleanups of extensions.py.  Notably, we can
remove the extensions.commandtable hack.

It also makes it easier to add standard extension attributes,
like a "hgwebsetup" function or a "helptable" dict that augments
the data in help.py, etc.
2007-08-17 17:33:27 -03:00
Matt Mackall
c08427e0e8 dispatch: move command dispatching into its own module
- move command dispatching functions from commands and cmdutil to dispatch
- change findcmd to take a table argument
- remove circular import of commands in cmdutil
- privatize helper functions in dispatch
2007-08-15 16:55:13 -05:00