Commit Graph

35 Commits

Author SHA1 Message Date
Yuya Nishihara
6c2103bc71 commands: move templates of common command options to cmdutil (API)
The goal is to get rid of the debugcommands -> commands dependency.

Since globalopts is the property of the commands, it's kept in the commands
module.
2017-05-14 16:19:47 +09:00
Yuya Nishihara
3e663dde68 registrar: move cmdutil.command to registrar module (API)
cmdutil.command wasn't a member of the registrar framework only for a
historical reason. Let's make that happen. This patch keeps cmdutil.command
as an alias for extension compatibility.
2016-01-09 23:07:20 +09:00
Augie Fackler
4e1c384d0a extensions: change magic "shipped with hg" string
I've caught multiple extensions in the wild lying about being
'internal', so it's time to move the goalposts on people. Goalpost
moving will continue until third party extensions stop trying to
defeat the system.
2016-08-23 11:26:08 -04:00
timeless
78639f500c children: use double quotes for arguments
You can't use single quotes in cmd.exe. See f4369d3e818c.
2016-01-06 17:18:18 +00:00
Gregory Szorc
2679f2b06a children: use absolute_import 2016-02-09 17:34:32 -08:00
timeless
699a790124 children: update help with replacement 2016-01-06 17:18:18 +00:00
Augie Fackler
f95a6caba1 extensions: document that testedwith = 'internal' is special
Extension authors (notably at companies using hg) have been
cargo-culting the `testedwith = 'internal'` bit from hg's own
extensions, which then defeats our "file bugs over here" logic in
dispatch. Let's be more aggressive about trying to give extension
authors a hint about what testedwith should say.
2015-04-28 16:44:37 -04:00
Yuya Nishihara
6e575010bd children: don't pass filectx to displayer
displayer doesn't want a fctx but a ctx. It failed with -Tdefault template.

    Traceback (most recent call last):
      ...
      File "mercurial/templatekw.py", line 212, in showbookmarks
        bookmarks = args['ctx'].bookmarks()
    AttributeError: 'filectx' object has no attribute 'bookmarks'
2015-03-26 23:56:18 +09:00
Gregory Szorc
733a467d4e children: define inferrepo in command decorator 2014-05-04 22:25:28 -07:00
Gregory Szorc
0ed519bc78 children: declare command using decorator 2014-05-04 21:46:49 -07:00
Siddharth Agarwal
a5e71891bd commands: don't infer repo for commands like update (issue2748)
Maintain a whitelist of commands to infer the repo for instead. The whitelist
contains those commands that take file(s) in the working dir as arguments.
2012-10-16 11:43:15 -07:00
Augie Fackler
96d44b39f7 hgext: mark all first-party extensions as such 2012-05-15 14:37:49 -05:00
Martin Geisler
e1e2ffe1ea children: use hg reST role for example 2012-05-11 13:42:37 +02:00
Augie Fackler
4604cfdca7 children: mark extension as deprecated 2012-05-11 06:15:46 -05:00
FUJIWARA Katsunori
ce06b102df help: show value requirement and multiple occurrence of options
this helps users to know what kind of option is:

  - no value is required(flag option)
  - value is required
  - value is required, and multiple occurrences are allowed

each kinds are shown as below:

 -f --force              force push
 -e --ssh CMD            specify ssh command to use
 -b --branch BRANCH [+]  a specific branch you would like to push

if one or more 3rd type options are shown, explanation for '[+]' mark
is also shown as footnote.
2010-06-06 17:25:00 +09:00
Matt Mackall
cd3ef170f7 Merge with stable 2010-01-19 22:45:09 -06:00
Matt Mackall
595d66f424 Update license to GPLv2+ 2010-01-19 22:20:08 -06:00
Martin Geisler
456ea57939 children: wrap docstrings at 70 characters 2009-07-26 01:40:37 +02:00
Martin Geisler
05ff438d74 children: wrapped docstrings at 78 characters 2009-07-07 23:54:42 +02:00
Dirkjan Ochtman
0448417ea2 extensions: change descriptions for extensions providing a few commands 2009-06-24 13:42:02 +02:00
Cédric Duval
dbcec5595d extensions: improve the consistency of synopses
Trying as much as possible to consistently:
 - use a present tense predicate followed by a direct object
 - verb referring directly to the functionality provided
   (ie. not "add command that does this" but simple "do that")
 - keep simple and to the point, leaving details for the long help
   (width is tight, possibly even more so for translations)

Thanks to timeless, Martin Geisler, Rafael Villar Burke, Dan Villiom
Podlaski Christiansen and others for the helpful suggestions.
2009-06-22 15:48:08 +02:00
Dirkjan Ochtman
a774ff01bc help: add/fix docstrings for a bunch of extensions 2009-06-21 16:45:47 +02:00
Robert Bachmann
93bde9a865 Added support for templatevar "footer" to cmdutil.py 2009-12-28 17:55:52 +01:00
Martin Geisler
98fbeb0b9f write options in "-r/--rev" style in help texts 2009-05-02 19:13:29 +02:00
Martin Geisler
7d509c2459 add blank line after copyright notices and after header 2009-04-26 01:25:53 +02:00
Martin Geisler
750183bdad updated license to be explicit about GPL version 2 2009-04-26 01:08:54 +02:00
Martin Geisler
52ce98c9a8 help texts: write command line switches as -a/--abc 2009-04-18 14:40:21 +02:00
Martin Geisler
42fa3800bd expand "rev" to "revision" in help texts 2009-04-07 23:06:50 +02:00
Martin Geisler
ea1734b579 expand "dir" to "directory" in help texts 2009-04-07 22:47:56 +02:00
Martin Geisler
1f5e6b0d38 children: word-wrap help texts at 70 characters 2009-04-04 23:15:37 +02:00
Dirkjan Ochtman
9ef9b3e5db cmdutil: use change contexts for cset-printer and cset-templater 2008-11-14 13:59:25 +01:00
Matt Mackall
fbb5127472 use repo[changeid] to get a changectx 2008-06-26 14:35:46 -05:00
Thomas Arendsen Hein
9f92f48ca6 Introduce templateopts and logopts to reduce duplicate option definitions. 2008-02-29 02:45:12 +01:00
Thomas Arendsen Hein
55ec898361 children extension: Don't abort when looking at the null revision.
Since e3bc293c220b revlog.children only returns real children,
so this is no longer a problem.
2007-07-03 12:50:05 +02:00
Thomas Arendsen Hein
c9b92d418a Add extension to provide the 'hg children' command (with tests) 2007-07-03 12:14:25 +02:00