Commit Graph

89 Commits

Author SHA1 Message Date
Gregory Szorc
5380dea2a7 global: mass rewrite to use modern exception syntax
Python 2.6 introduced the "except type as instance" syntax, replacing
the "except type, instance" syntax that came before. Python 3 dropped
support for the latter syntax. Since we no longer support Python 2.4 or
2.5, we have no need to continue supporting the "except type, instance".

This patch mass rewrites the exception syntax to be Python 2.6+ and
Python 3 compatible.

This patch was produced by running `2to3 -f except -w -n .`.
2015-06-23 22:20:08 -07: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
71c4aa007f templater: remove noop calls of parsestring(s, quoted=False) (API)
Since e926f2ef639a, parsestring(s, quoted=False) just returns s.
2015-05-04 10:01:03 +09:00
Jordi Gutiérrez Hermoso
454d10a54c churn: deprecate -t option in favour of -T
We use -T consistently elsewhere to refer to the --template option.
The old -t option is now renamed to --oldtemplate so that -t still
works. This has the benign side effect of introducing and immediately
deprecating a new long option.

We also test with both -t and -T options.
2015-02-24 11:37:07 -05:00
Jordi Gutiérrez Hermoso
d3b97d5baf doc: change 'revision or range' to 'revision or revset'
The phrase "revision or range" comes from a pre-revset era. Since the
documentation for ranges now is under the revset docs, and as a
helpful hint nudging users towards revsets, I think it's better to say
"revision or revset"
2014-10-24 13:50:00 -04:00
Gregory Szorc
63adcaf1da churn: define inferrepo in command decorator 2014-05-04 22:24:38 -07:00
Gregory Szorc
765d0d4271 churn: declare command using decorator 2014-05-04 21:46:24 -07:00
Isaac Jurado
3b2cb9598b churn: compute padding with unicode strings
Most UTF-8 aware terminals convert multibyte sequences into a single displayed
characters.  Because the first column is padded by counting bytes, the second
column is not perfectly aligned in the presence of non ASCII characters.
2014-04-19 15:11:25 +02:00
Matt Mackall
694de7920e changeset_templater: remove use_template method 2014-03-08 16:14:08 -06:00
FUJIWARA Katsunori
23f95aaedb doc: use double quotation mark to quote arguments in examples for Windows users
On Windows, only double quotation mark can quote command line
arguments.

So, this patch uses double quotation mark to quote command line
arguments in all examples of online help document.
2013-10-25 01:14:18 +09:00
Matthew Turk
b4f1aac7b6 churn: split email aliases from the right
This splits churn email aliases from the right, to enable incorrectly-specified
addresses that include equal signs to be mapped to correct addresses.  This
will enable aliasing of bad addresses (typically typos) such as:

sername=myusername

that appear in the churn output through a churn alias such as:

sername=myusername = myusername

whereas previously splitting from the left would not enable this behavior.
2013-07-17 10:40:40 -04:00
Mads Kiilerich
3d26010623 churn: sort users with same churn by name
This makes the output order well-defined and improves code readability.
2012-12-12 02:38:14 +01: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
Martin Geisler
66a2883c3a churn: lowercase message 2012-06-12 14:18:18 +02:00
Augie Fackler
96d44b39f7 hgext: mark all first-party extensions as such 2012-05-15 14:37:49 -05:00
Matt Mackall
f2a652218a i18n: fix all remaining uses of % inside _() 2012-03-08 13:35:27 -06:00
Matt Mackall
5ab97592f7 scmutil: switch match users to supplying contexts
The most appropriate context is not always clearly defined. The obvious cases:

For working directory commands, we use None
For commands (eg annotate) with single revs, we use that revision

The less obvious cases:

For commands (eg status, diff) with a pair of revs, we use the second revision
For commands that take a range (like log), we use None
2011-06-18 16:52:51 -05:00
Matt Mackall
0832007f60 scmutil: drop aliases in cmdutil for match functions 2011-05-13 14:58:24 -05:00
Alexander Solovyov
7a9d95a376 churn: strip key earlier to avoid false negative seach in aliases 2011-04-29 16:34:52 +02:00
Nicolas Dumazet
48d76e5f60 churn: ignore trailing and leading spaces (issue2546) 2010-12-13 16:41:39 +09:00
Augie Fackler
42c8b2cf07 termwidth: move to ui.ui from util 2010-10-10 10:06:36 -05:00
Martin Geisler
cb36142754 Merge with stable 2010-08-29 22:55:37 +02:00
Martin Geisler
bab69a5062 churn: do not crash on malformed lines in alias file 2010-08-29 22:46:00 +02:00
Ronny Pfannschmidt
1a68305741 churn: do not crash on empty lines in alias file 2010-08-29 10:54:22 +02:00
Renato Cunha
1b3435e951 churn: remove tuple parameter unpacking (deprecated in py3k) 2010-07-01 19:27:03 -03: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
Steve Borho
b82bd4f289 Backed out changeset: 1bfde817782c 2010-06-08 15:52:41 -05:00
Steve Borho
e91613380a color: labeled text should be passed to ui.write() as ui.labeled
Some implementations of ui.label() (HTML versions in particular) must escape
the provided text and then markup the text with their tags.  When this marked
up text is then passed to ui.write(), we must label the text as 'ui.labeled'
so the implementation knows not to escape it a second time (exposing the initial
markup).

This required the addition of a 'ui.plain' label for text that is purposefully
not marked up.

I was a little pedantic here, passing even ' ' strings to ui.label() when it
would be included with other labeled text in a ui.write() call.   But it seemed
appropriate to lean to the side of caution.
2010-06-03 23:18:18 -05:00
Alexander Solovyov
a6931a2129 churn: add possibility to include/exclude paths 2010-05-27 22:50:23 +03:00
Alexander Solovyov
06239f590d churn: support spaces in aliases (issue2222) 2010-06-02 14:28:45 +02:00
Nicolas Dumazet
7f1a963829 pylint, pyflakes: remove unused or duplicate imports 2010-04-14 17:58:10 +09:00
Brodie Rao
f203aa2c4e churn: make use of output labeling 2010-04-02 15:22:10 -05:00
Martin Geisler
652e04c99c progress: use a verb in present participle 2010-03-15 18:40:00 +01:00
Eric Eisner
c139fbc7cd churn: use ui.progress instead of --progress 2010-03-11 09:11:01 -05:00
Matt Mackall
8d99be19f0 many, many trivial check-code fixups 2010-01-25 00:05:27 -06:00
Matt Mackall
595d66f424 Update license to GPLv2+ 2010-01-19 22:20:08 -06:00
Alexander Solovyov
1c0a00c05d churn: fix --progress (broken by 37a70f0b3ab8) 2009-10-30 15:43:01 +02:00
Alexander Solovyov
6b680abcf9 churn: fix changeset count (broken by 0fc99cecabb9) 2009-10-30 13:40:23 +02:00
Alexander Solovyov
af41ec3842 churn: ability to display added/removed lines separately 2009-10-29 20:50:24 +02:00
Matt Mackall
4d8e4508a9 walkchangerevs: drop ui arg 2009-10-29 19:03:16 -05:00
Matt Mackall
de712b58f9 walkchangerevs: move 'add' to callback
Now walkchangerevs is a simple iterator over contexts
2009-10-29 17:07:51 -05:00
Matt Mackall
0366236cf5 walkchangerevs: internalize ctx caching 2009-10-27 17:01:32 -05:00
Matt Mackall
67e7c0b434 walkchangerevs: yield contexts 2009-10-25 18:43:59 -05:00
Matt Mackall
69f8478d8c walkchangerevs: pull out matchfn
* * *
imported patch mercurial/commands.py
2009-10-25 18:43:56 -05:00
Martin Geisler
9f1896c083 do not attempt to translate ui.debug output 2009-09-19 01:15:38 +02:00
Nicolas Dumazet
8f9d045fc3 churn: use genexps now that we dropped 2.3 compatibility 2009-08-26 13:07:27 +02:00
Dirkjan Ochtman
501b8446f3 merge with crew-stable 2009-08-26 13:05:51 +02:00
Nicolas Dumazet
efa014be98 churn: issue833 was reintroduced in 8c350d3a32c0, correct it and add a test 2009-08-24 12:47:44 +02:00
Dirkjan Ochtman
e00109f7e7 cmdutil: use context objects for walkchangerevs() 2009-08-20 08:34:22 +02:00
Brendan Cully
934b96bb88 churn: correct output when run in subdirectories 2009-08-05 17:17:06 -07:00