Commit Graph

33 Commits

Author SHA1 Message Date
Idan Kamara
4922480923 check-code: replace heredocs in unified tests
Heredocs are usually fed to other commands and
shouldn't follow the standard conventions of shell
commands.

This restores the old behaviour of how heredocs
were handled in old-style test files.
2012-10-03 22:09:18 +02:00
Patrick Mezard
ed389c0023 wireproto: fix check-code.py breakage introduced by 6e0f31b6f59a 2012-09-15 08:38:02 +02:00
Bryan O'Sullivan
10380b320f wireproto: don't format a debug string inside a hot loop
This improves stream_out performance by about 5%.
2012-09-14 12:06:40 -07:00
Bryan O'Sullivan
55e3685d62 wireproto: bypass filechunkiter for small files when streaming
Merely creating and using a generator has a measurable impact,
particularly since the common case for stream_out is generators that
yield just once. Avoiding generators improves stream_out performance
by about 7%.
2012-09-14 12:05:37 -07:00
Christian Ebert
7b42c28269 keyword: intentionally ignore check-code warning about unwrapped ui message 2012-05-13 14:26:26 +01:00
Brodie Rao
7f47d4e347 check-code: ignore naked excepts with a "re-raise" comment
This also promotes the naked except check from a warning to an error.
2012-05-13 13:18:06 +02:00
Brodie Rao
a706d64a2c cleanup: replace naked excepts with except Exception: ... 2012-05-12 16:02:46 +02:00
Brodie Rao
c577fac135 cleanup: replace naked excepts with more specific ones 2012-05-12 16:02:45 +02:00
Brodie Rao
d6a6abf2b0 cleanup: eradicate long lines 2012-05-12 15:54:54 +02:00
Matt Mackall
4d12f82b66 merge with stable 2012-05-12 13:20:26 +02:00
Patrick Mezard
22eeeffed3 mq: add --no-backup for qpush/qpop/qgoto 2012-05-11 16:57:26 +02:00
Patrick Mezard
742f6b3850 pure/base85: align exception type/msg on base85.c
brendan mentioned on IRC that b64decode raises a TypeError too, but while the
previous exception type may be better in general, it is much easier to make it
behave like the related C code and changes nothing for mercurial itself.
2012-05-07 21:49:45 +02:00
Yuya Nishihara
8284425c7d commands: parse ui.strict config item as bool 2012-05-06 23:58:04 +09:00
Mads Kiilerich
f4efda66d8 tests: run most check-code sh checks on continued lines too
Some false errors are degraded to warnings and whitelisted.
2012-04-25 01:35:39 +02:00
Mads Kiilerich
e5bed4bfb4 tests: solaris sh can not negate exit status with '!' 2012-04-23 01:39:26 +02:00
Greg Ward
66a1ddf402 shrink-revlog: make check-code happier
There's still a naked 'except:' clause, but I'm not sure how to fix it
(what exception is it expecting?). This just fixes line length.
2012-03-28 15:25:20 -04:00
Na'Tosha Bard
c51d8441de largefiles: fix check-code errors. 2012-03-09 17:11:07 +01:00
Matt Mackall
7f2d6a6af7 merge with stable 2012-03-08 15:59:33 -06:00
Matt Mackall
f2a652218a i18n: fix all remaining uses of % inside _() 2012-03-08 13:35:27 -06:00
Matt Mackall
38ab0032cb merge with stable 2012-02-28 21:17:53 -06:00
Matt Mackall
ee77ef5137 merge with stable 2012-02-24 16:16:48 -06:00
Patrick Mezard
811b39a49c test-check-code-hg: fix xargs exit status on OSX
When xargs subcommand invocation fails in a normal way, GNU xargs returns 123
and BSD one returns 1.
2012-02-23 17:46:57 +01:00
Greg Ward
aa7b4298e2 test-check-code-hg: skip test if not in a working dir (issue3248). 2012-02-18 16:30:17 -05:00
Jim Hague
692ea98eca tests: fix command line overflow on ksh
"<command> `hg manifest`" overflows the puny 1024 byte command line length
limit on AIX default shell ksh. Replace with "hg manifest | xargs <command>".
2012-02-04 00:02:05 +00:00
Matt Mackall
6715adc25e merge with stable 2012-02-06 15:22:43 -06:00
Matt Mackall
a17b10a14b subrepo: rewrite handling of subrepo state at commit (issue2403)
When the contents of .hgsubstate are stale (either because they've
manually been tweaked or partial updates have confused it), we get
confused about whether it actually needs committing.

So instead, we actively consult the parent's substate and compare it
the actual current state when deciding whether it needs committing.

Side effect: lots of "committing subrepo" messages that didn't
correspond with real commits disappear.

This change is fairly invasive for a fairly obscure condition, so it's
kept on the default branch.
2012-02-06 15:10:01 -06:00
Pierre-Yves David
a445988112 discovery: diet discovery.prepush from non-discovery code
The ``discovery.prepush`` function was doing multiple things not related to
discovery. This changeset move some code into the ``localrepo.push`` method. The
old ``discovery.prepush`` function jobs is now restricted to checking for
multple head creation. It was then renamed ``discovery.checkheads``.

This new ``discovery.checkheads`` function may receive several other changes in
the future but we are a bit too much near the freeze for a wider refactoring.
2012-01-19 15:50:55 +01:00
Mads Kiilerich
e5b01f05d2 mq: make qsave implementation more explicit
It wasn't obvious from the code how qsave mocked around with .hg/patches and
.hg/patches.? and what was going on.

This makes it more explicit so it will survive future refactorings.
2012-01-11 02:29:55 +01:00
Mads Kiilerich
71865d2b26 tag: lock before tagging 2012-01-13 01:19:07 +01:00
Mads Kiilerich
9acd1868fa tests: keep track of all check-code.py warnings 2012-01-11 01:56:05 +01:00
Pierre-Yves David
32c99d5daa phases: make outgoing object and discovery aware of exclusion
The outgoing object gains an "excluded" members holding all changesets which
were excluded because there where secret.

The core discovery code now remove secret changeset from discovery by default.
This means that any command relying on discovery will exclude secret changeset.
Most notable one are outgoing and bundle. (But bundle with and explicit
``--base`` still allow to bundle outgoing changeset.
2012-01-11 00:27:46 +01:00
Mads Kiilerich
1815af81fb tests: run check-code with warnings and maintain a whitelist
check-code has fine warning checks, but they are a bit noisy and nobody used
them.

Now the warnings will be run in the test suite, where a list of accepted
warnings will be maintained.

Those who introduce or touch a line with a warning will now have to update the
whitelist ... or fix the warning.
2011-11-23 03:14:24 +01:00
Mads Kiilerich
d3deba7af8 tests: convert test-check-code-hg.py to .t 2011-11-23 02:50:58 +01:00