Commit Graph

1103 Commits

Author SHA1 Message Date
Mads Kiilerich
a07958f34c check-code: fix no-check-code skip message - obfuscation was too obscure 2013-10-23 23:42:13 +08:00
Pascal Quantin
e36cdfe78f win32: add shelve extension to mercurial.ini 2013-10-21 23:40:56 +02:00
Mads Kiilerich
a4a7d21498 check-code: check that '>' is used for continued lines
Continued lines do not get the SALT mangling.
2013-10-03 14:50:47 +02:00
Mads Kiilerich
1e900bb145 check-code: check for spaces around = for named parameters 2013-10-03 14:50:47 +02:00
Matt Mackall
b73d929200 debugshell: appease pyflakes 2013-09-23 14:28:01 -07:00
Augie Fackler
1e3892da3b check-code: new rule to forbid imports of a.b on the same line as other imports
This style of import can trip up 2to3 and cause it to produce invalid
files if one of the imports is supposed to be a relative import. This
prevents that behavior, and in the process exposed a lot of silly
import errors related to the email module.
2013-09-20 10:18:09 -04:00
Augie Fackler
2727bcf864 perf: rearrange imports of changelong and manifest to appease check-code 2013-09-20 10:14:59 -04:00
Sean Farley
e9de00a5cf debugshell: check ui.debugger for which debugger to use 2013-07-14 12:16:40 -05:00
Sean Farley
12aa25fc95 debugshell: add function to embed ipython 2013-07-14 12:02:36 -05:00
Sean Farley
d417793377 debugshell: abstract out pdb code.interact 2013-07-14 12:10:52 -05:00
Matt Mackall
c1fcd00695 check-code: add bracket style check 2013-09-18 14:36:19 -05:00
Matt Mackall
b8ff933b09 check-code: check C patterns against .h files 2013-09-17 18:19:04 -05:00
Matt Mackall
5f16d1c838 check-code: make casting style check more precise 2013-09-17 18:13:54 -05:00
Siddharth Agarwal
10bb361ad4 perfmanifest: allow and require passing in a rev
Previously perfmanifest would only test tip.
2013-09-06 13:35:29 -07:00
Siddharth Agarwal
79b9a1c4e5 perfmanifest: fix cache invalidation
The manifest cache is now stored in _mancache. The revlog cache is still stored
in _cache.
2013-09-06 13:20:07 -07:00
Danek Duvall
d0c8a3b9e7 solaris: tests can't use tail -n
Solaris tail doesn't recognize the -n option.  Replace the one use of it
with some inline python code, and add a test case to check-code.py.
2013-08-26 15:20:44 -07:00
Danek Duvall
dd1467f6d7 solaris: test cases can't use grep -a
The -a option to GNU grep isn't available when using Solaris grep.  Replace
the one use of grep -a in the testsuite with some in-line Python that does
the equivalent, and add a check for grep -a in check-code.py.
2013-08-23 14:31:42 -07:00
Jeff Sickel
f414ef5bee hgrc.d: separate namespace for mercurial scripts 9diff and 9mail 2013-08-15 21:35:56 -04:00
Jeff Sickel
e34e7ec865 9mail: new script to add support for Plan 9 upas/marshal email wrapper 2013-08-12 17:36:49 -05:00
Pascal Quantin
b52e26e4ec win32: update Inno Setup installer script and extensions list 2013-07-27 21:16:12 +02:00
Augie Fackler
ac76c4f1a9 check-code: add a check for the next() builtin, which was new in 2.6 2013-07-25 10:44:51 -04:00
Simon Heimberg
7ea18de5fd check-code: do not abort on an unreadable file, only report this 2013-07-22 10:04:45 +02:00
Siddharth Agarwal
5bb5f70476 doc: bump copyright year 2013-07-17 17:34:47 -07:00
Simon Heimberg
83278fd7d4 check-code: automatically preppend "warning: " to all warning messages
Some warnings had "warning: " at the beginning of their message. Now this
is done consistent for all messages.
Especially in test-check-code-hg.t it is an advantage to see warnings at once
because only exceptions to them are tolerated. It is (almost) as obvious as
before a6180647ea.

The prefix will not remain when a warning is changed to a failure. A change
like a91387a37f will not be necessary anymore.
2013-07-16 01:29:14 +02:00
Simon Heimberg
be961a468d check-code: concatenate "check-code" on compile time
The python compiler concatenates two string constants. Use this instead of
doing it on run time or instruct the user how to do it.
The strings "no-check-code" and "check-code-ignore" has to be specially written
for not skipping some checking of the code of this file.
2013-07-01 06:50:58 +02:00
Simon Heimberg
3fb7bd830f check-code: do not warn on printf \\x or \\[1-9]
When there is a double backslash the following char does not have any special
meaning. So do not warn on this.
Remove the now obsolete no-check-code statement. (It was used wrongly anyway, it
skipped checking the entire file.)
2013-07-01 06:50:58 +02:00
Simon Heimberg
6059e06d0f cleanup: drop unused variables and an unused import 2013-07-01 20:48:56 +02:00
Simon Heimberg
dc62f025d3 contrib: delete setup3k in favor of setup --c2to3
setup3k was merged into setup in 7a7a1c594d. Now finally get rid of it.
2013-06-13 01:37:02 +02:00
Simon Heimberg
8a32578a00 cleanup: remove unused imports
detected by pyflakes
2013-06-13 01:36:58 +02:00
Simon Heimberg
bfbc27c057 check-code: introduce function for using re2 when available
Do it similar as in mercurial.util. For simplicity only support flag
multiline which is the only one used.
2013-06-08 20:20:14 +02:00
Simon Heimberg
11469e2f90 check-code: compile filters when loading 2013-06-08 20:20:14 +02:00
Simon Heimberg
1f8c40a6d5 check-code: compile all patterns on initialisation
They where compiled once for every checked file (when calling finditer).
2013-06-08 20:20:14 +02:00
Simon Heimberg
5fb5cb59f5 check-code: only fix patterns once
The patterns were fixed once for every file. Now only do it once when loading
the file.
2013-06-08 20:20:14 +02:00
Durham Goode
94d98a2fbb annotate: simplify annotate parent function
The annotate algorithm used a custom parents() function to try to reuse
filectx and filelogs. I simplified it a bit to rely more heavily on the
self.parents() which makes it work well with alternative filectx
implementations. I tested performance on a file with 5000+ revisions
but no renames, and on a file with 500 revisions repeating a series of
4 edits+renames and saw zero performance hit.  In fact, it was reliably a
couple milliseconds faster now.

Added the perfannotate command to contrib/perf.py for future use.
2013-05-30 19:29:03 -07:00
Benoit Boissinot
2252ad24c8 shrink: delete extension preventing further refactoring (BC)
Reordering can be done by setting bundle.reorder to true and doing a
clone --pull.
2013-05-10 22:47:12 +02:00
Sune Foldager
e548f184d2 bundle-ng: move gengroup into bundler, pass repo object to bundler
No semantic changes made.
2013-05-10 21:35:49 +02:00
Sune Foldager
6bd4fdfe9d bundle-ng: move group into the bundler
No additional semantic changes made.
2013-05-10 21:03:01 +02:00
Benoit Boissinot
3329216677 bundle-ng: move bundler creation up in the stack
Create a simple start() method to pass the lookup function until bundler
becomes smarter and gets a repo object.

Since we now create the bundler for the whole lifetime, we need to pass it
down to revlog methods.
2013-05-10 20:37:41 +02:00
Matt Mackall
7446e64692 check-code: add another Windows pathsep rule 2013-05-09 15:22:54 -05:00
Brendan Cully
94ee9d1cb5 tests: check path separator in moves 2013-05-03 14:19:30 -07:00
Matt Mackall
2d6d229def check-code: add more path sep glob checks 2013-05-02 15:21:47 -05:00
FUJIWARA Katsunori
071d89abd0 win32: use explicit path to "python.exe" only if it exists
Before this patch, "hg.bat" for Windows environment always uses
"%~dp0..\python" as explicit path to "python.exe".

This path may not be valid in some cases.

For example, on the environment using "virtualenv" python package,
both "python.exe" and "hg.bat" are placed in the same directory.  In
this case, "python.exe" should be found on PATH, because virtualenv
activation script puts "python.exe" on the PATH.

This patch uses explicit path to "python.exe" only if it exists, and
expects that "python.exe" can be found on PATH otherwise.
2013-04-26 01:12:03 +09:00
Kevin Bullock
1b16c815cb check-code: fix sed 'i' command rule newline matching
The regular expression was meant to match cases where an 'i' command was
not followed by precisely a '\' and then a newline; it failed to match
the newline, so cases with a '\' but no newline would erroneously pass.
2013-04-23 16:57:51 -05:00
Kevin Bullock
2f2218183e check-code: expand sed rule to include more offenders
Expands the rule added in a3f00ef2b622 to include cases where the
address is a line number instead of a regular expression, and fixes an
instance of this pattern in test-unionrepo.t.
2013-04-22 16:50:08 -05:00
Kevin Bullock
5747742d25 check-code: add a rule against a GNU sed-ism
BSD sed requires the 'i' command to be followed with a backslash and a
newline, like so:

  $ sed -e '/^@/i\
  > other'

We've encountered this problem before, e.g. in test-mq.t (215a8789129e).
This change adds a check-code rule and fixes two instances of the
problem in test-record.t.
2013-04-22 16:33:28 -05:00
Matt Mackall
3109d84a82 check-code: add check for lock release order 2013-04-17 14:38:02 -05:00
Nikolaj Sjujskij
cc1c916157 zsh_completion: complete all files for commit/backout --logfile
Up until now commit/backout `--logfile` option was completed only with
*.txt-files. This requirement is a bit too strong (and is nowhere to be stated)
so it's better to complete with all files.

Stolen from zsh.git repo, c5fce37b changeset by Oliver Kiddle.
2013-04-17 21:06:48 +04:00
Mads Kiilerich
3f5dd3e256 codingstyle: remove trailing spaces in various text files
Better do it once than see random changes in diffs later.
2013-04-17 03:40:18 +02:00
Mads Kiilerich
a64108eee3 tests: run check-code on Python files without .py extension 2013-04-17 03:39:36 +02:00
ronvoe12249
04260eb099 mergetools: rename 'base' to 'merged' in meld
This makes it clear which panel is the target of the merge operation.
2013-04-16 13:55:38 +02:00