Commit Graph

59 Commits

Author SHA1 Message Date
Andrey Somov
2ccddf5ead improve code readability 2009-09-09 11:12:36 +02:00
Simon Heimberg
fac4c72eee extensions: pass ui arguement to extsetup if accepted 2009-08-16 00:41:24 +02:00
Martin Geisler
559ff1708d extensions: load and configure extensions in well-defined phases
Extensions are now loaded with a call-graph like this:

  dispatch._dispatch
      extensions.loadall
          extensions.load
                # add foo module to extensions._extensions
          extensions.load
                # add bar module to extensions._extensions

          foo.uisetup(ui)
          bar.uisetup(ui)

      foo.extsetup()
      bar.extsetup()

      commands.table.update(foo.cmdtable)
      commands.table.update(bar.cmdtable)

  hg.repository
      foo.reposetup(ui, repo)
      bar.reposetup(ui, repo)

The uisetup calls could easily be moved out to dispatch._dispatch, but
have been kept in extensions.loadall since at least TortoiseHg calls
extensions.loadall and expects it to call uisetup.

The extensions.load function called uisetup. It now has an unused ui
argument which has been kept for backwards compatibility.
2009-08-29 00:29:16 +02:00
Dirkjan Ochtman
1d29e68744 change wiki/bts URLs to point to new hostname 2009-06-24 15:32:37 +02:00
Martin Geisler
16155b528f merged with crew 2009-06-21 19:06:57 +02:00
Sune Foldager
f5c1bbf245 translated a bunch of strings to danish 2009-06-20 19:46:01 +02:00
Brendan Cully
5189b36798 Move alias into core 2009-05-30 11:32:23 -07:00
Dirkjan Ochtman
605b944edf kill trailing whitespace 2009-06-19 13:47:50 +02:00
Martin Geisler
ca3bc4a9ab dispatch: remember loaded extensions in a real set 2009-05-07 17:56:57 +02:00
Martin Geisler
750183bdad updated license to be explicit about GPL version 2 2009-04-26 01:08:54 +02:00
Matt Mackall
de487eacda ui: print_exc() -> traceback() 2009-04-26 16:50:44 -05:00
Matt Mackall
be7d59ab85 ui: kill most users of parentui name and arg, replace with .copy() 2009-04-26 16:50:43 -05:00
Matt Mackall
e8b3de6bf8 ui: introduce new config parser 2009-04-23 15:40:10 -05:00
Matt Mackall
0174734c46 ui: kill updateopts
Move setconfig into dispatch._parseconfig
2009-04-23 15:40:10 -05:00
Matt Mackall
ebffe5ccb8 ui: refactor option setting
No more passing options as constructor keywords. Basic options are now
always stored in the overlay for simplicity and consistency.
2009-04-23 15:40:10 -05:00
Nicolas Dumazet
6ebdee6dde profiling: Adding support for kcachegrind output format, using lsprofcalltree 2009-04-08 14:20:57 +02:00
Nicolas Dumazet
f2cfd93c8c profiling: Adding a profiling.format config variable
Allows defining other output formats for profiling.

If an invalid format is given, output a warning and ignore it.
For now, only the standard 'text' value is supported.
2009-04-02 16:01:30 +09:00
Nicolas Dumazet
14ff1a53ae profiling: Adding profiling.output config variable
If specified, outputs profiling data to the said file.
Prints to stderr by default
2009-04-08 14:19:41 +02:00
Nicolas Dumazet
b87b90da60 profiling: dropping hotshot profiling. --profile as a unique profiling option
hotshot was an experimental module, which is broken for Python < 2.5
And even for Python >= 2.5 users, hotshot usage is discouraged: cProfile
(formerly lsprof) should be used instead.
2009-04-08 14:18:20 +02:00
Matt Mackall
642f4d7151 move encoding bits from util to encoding
In addition to cleaning up util, this gets rid of some circular dependencies.
2009-04-03 14:51:48 -05:00
Peter Arrenbrecht
bc21361ed2 cleanup: drop unused imports 2009-03-23 13:12:07 +01:00
Bill Barry
8ac447bbd7 dispatch: extract command execution block into method
This pulls the pre-command hook/command/post-command hook workflow out of
the method it is in and puts it into its own method so that it potentially
could be exposed for extensions to wrap.
2009-02-12 09:36:15 -07:00
Augie Fackler
7131a2f8b7 fancyopts: Parse options that occur after arguments.
This changes the behavior of qguard in the case of setting negative guards, as -- will now always be required.
Fixes issue1402.
Doc fixes for mq by mpm.
2009-02-10 13:26:00 -06:00
Matt Mackall
3296a955b6 warn if --repository provided for norepo commands 2009-01-28 14:27:44 -06:00
Matt Mackall
104a85dee5 error: move SignatureError 2009-01-12 13:51:43 -06:00
Matt Mackall
9db9afd227 dispatch: sort exception handlers 2009-01-12 13:35:35 -06:00
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