Commit Graph

936 Commits

Author SHA1 Message Date
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
92158e04de cleanup: "raise SomeException()" -> "raise SomeException" 2012-05-12 16:00:58 +02:00
Brodie Rao
d6a6abf2b0 cleanup: eradicate long lines 2012-05-12 15:54:54 +02:00
Mads Kiilerich
80eee013e1 tests: unify the last sh tests
This requires a slightly smarter check-code check for sed output filtering.
2012-04-25 01:35:39 +02: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
Matt Mackall
6d78ec67ed merge with stable 2012-05-11 14:48:24 +02:00
Mads Kiilerich
99a4f5f5b9 hg-ssh: exit with 255 instead of -1 on error
Unix sh would cast -1 to 255 anyway, but on windows -1 become 0. Better be
explicit with the 255 everywhere.
2012-05-07 00:52:08 +02:00
Mads Kiilerich
91529dce53 hg-ssh: use %s for printing paths in error messages
This avoids \\ if this ever is run on windows - for example in the test suite.
2012-05-07 00:49:01 +02:00
Martin Geisler
24e4bf05a3 check-code: catch unnecessary s.strip().split() calls 2012-05-07 10:02:50 +02:00
Steven Stallion
d36350c9a1 plan9: mkfile and 9diff fixes
This patch deals with an unnecessary backslash in 9diff and improper
quoting in the contrib mkfile.
2012-04-28 23:01:31 -07:00
Martin Geisler
bde13df69f doc: update copyright years to 2012
I sometimes look at a piece of software and if the man page says
"Copyright 2004", then I'm inclined to think that the project is stale
or that the authors are lazy. Neither is good publicity for us :-)
2012-04-30 12:04:30 +02:00
Mads Kiilerich
b7e85cefa1 tests: avoid tab indent on all kinds of lines of sh commands 2012-04-23 01:56:48 +02:00
Mads Kiilerich
f64bae7ea3 tests: use 'do sleep 0' instead of 'do true', also on first line of command
2cd44a791e66 established that '... do true ...' shouldn't be used, but that was
only enforced on continued lines.
2012-04-23 01:56:48 +02:00
Mads Kiilerich
ca99a3d167 check-code: put grouping around regexps generated from testpats
This removes the pitfall that would make the testpath r'a|b' match 'b' on all
lines in .t tests.
2012-04-23 01:56:48 +02:00
Mads Kiilerich
b1160b7ec5 tests: don't use /dev/urandom for largefiles testing
There is no need to use entropy here just to create some content that only will
be used for hashing and ignored.

This avoids a problem where dd from /dev/urandom on solaris generates too short
output.
2012-04-23 01:56:48 +02:00
Steven Stallion
1a611af55b plan9: add missing source entries to proto 2012-04-21 08:24:10 -07:00
Mads Kiilerich
4c1897dde5 tests: fix incorrect markup of continued lines of sh commands 2012-04-23 01:39:26 +02:00
Mads Kiilerich
9f4ca6b4df check-code: 'printf \0' is apparently fine - accept it in check-code
Nobody complained over '\0' in test-eol.t.

The too strict check becomes a problem when this check is applied to more
lines.
2012-04-23 01:39:26 +02:00
Mads Kiilerich
e5bed4bfb4 tests: solaris sh can not negate exit status with '!' 2012-04-23 01:39:26 +02:00
Mads Kiilerich
d63ff4f9a5 tests: ^ must be quoted when used on solaris sh
The check was broken when it was introduced in 8924361c0202.
2012-04-23 01:39:26 +02:00
Steven Stallion
3ad03bc654 plan9: finalize documentation for next release 2012-04-15 23:47:46 -07:00
Matt Mackall
4ca25d50f9 merge with stable 2012-04-14 01:39:35 -05:00
Patrick Mezard
bdf6ede885 mq: replace hasattr() with util.safehasattr(), update check-code.py 2012-04-13 15:07:13 +02:00
Bryan O'Sullivan
dc46676e81 parsers: use base-16 trie for faster node->rev mapping
This greatly speeds up node->rev lookups, with results that are
often user-perceptible: for instance, "hg --time log" of the node
associated with rev 1000 on a linux-2.6 repo improves from 0.3
seconds to 0.03.  I have not found any instances of slowdowns.

The new perfnodelookup command in contrib/perf.py demonstrates the
speedup more dramatically, since it performs no I/O.  For a single
lookup, the new code is about 40x faster.

These changes also prepare the ground for the possibility of further
improving the performance of prefix-based node lookups.
2012-04-12 14:05:59 -07:00
Matt Mackall
05bbeed32b check-code: avoid false-positive on ++ 2012-04-12 20:22:18 -05:00
Bryan O'Sullivan
22e70490ba perf: time fncache read and write performance 2012-04-12 15:21:52 -07:00
Jim Hague
77587a4c7a tests: avoid test-hup hanging on AIX
test-hup hangs on AIX. Under ksh89 on AIX (the default shell),

echo Hello; while [ ! -s not-there ]; do true; done

produces no output while the loop executes. Replacing 'true' with 'sleep 0'
fixes, as does using a less broken shell. ksh93 is fine.

Update check-code.py to look for this, and make same change in test-serve.t.
In fact test-serve works fine, probably because of additional commands between
echo and the loop, but that's a subtlety not easy to test for.
2012-04-05 12:31:21 +01:00
Steven Stallion
8076654c92 plan9: add execute permissions to 9diff 2012-04-10 23:40:20 -07:00
Matt Mackall
ebe322955c perf: add case collision auditor perf 2012-04-10 12:07:16 -05:00
Steven Stallion
d79ff306e5 plan9: initial support for plan 9 from bell labs
This patch contains support for Plan 9 from Bell Labs. A README is
provided in contrib/plan9 which describes the port in greater detail.
A new extension is also provided named factotum which permits the
factotum(4) authentication agent to provide credentials for HTTP
repositories. This extension is also applicable to other POSIX
platforms which make use of Plan 9 from User Space (aka plan9ports).
2012-04-08 12:43:41 -07:00
Matt Mackall
560dd93d34 merge with stable 2012-04-06 15:18:14 -05:00
Matt Mackall
4325ad525f tests: remove sed -i from test-record 2012-04-01 13:59:11 -05:00
Augie Fackler
dfc3978483 zsh completion: fix error in qfinish completions from 584f7a076523
The actual flag is --applied, not --all.
2012-03-31 15:39:44 -05:00
Matt Mackall
98ed4dc5e9 perf: node lookup 2012-03-30 14:16:06 -05: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
Greg Ward
05fadec600 shrink-revlog: make pyflakes happy 2012-03-28 15:15:15 -04:00
Matt Mackall
c13dd2e166 perf: add a changeset test 2012-03-16 19:58:47 -05:00
Matt Mackall
cf0424ed5e perf: add perfchangeset to time changeset parsing 2012-03-15 15:58:55 -05:00
Matt Mackall
7fbdc6a514 perf: tweak tests for testing index performance improvements 2012-03-15 13:11:03 -05:00
Matt Mackall
87d3671dbf merge with stable 2012-03-12 17:05:42 -05:00
Thomas Arendsen Hein
2210a784fd extdiff: escape filenames with vim/DirDiff and make quoting work with Windows
Use vim function fnameescape() on filenames.
Use double quotes for arguments so cmd.exe is happy.
2012-03-12 09:39:30 +01:00
Matt Mackall
cc8b3a2b01 pvec: introduce pvecs 2012-03-12 13:37:39 -05:00
Steve Borho
9fbec5585f wix: add phases help text and two more translations (issue 3288) 2012-03-03 23:14:31 -06:00
Matt Mackall
bd04c54a71 check-code: check for % inside _() 2012-03-08 15:59:44 -06:00
Jim Hague
78a686772b tests: tighten checks for octal escapes in shell printf.
printf on AIX default shell ksh (89) says \1 is an invalid escape. It insists
on at least 2 digits. This causes failures in test-keyword.t and test-status.t.

check-code.py already looks out for \NNN and recommends using Python
for outputting octal values. Extend the check to \NN and \N and fix up
resulting failures.
2012-02-08 16:56:00 +00:00
Mads Kiilerich
e347788597 tests: don't use alias
alias doesn't work in Solaris sh.
2012-01-27 03:00:03 +01:00
Jesus Espino Garcia
2574ec2be2 bash_completion: added -o filename option to _hg_status (issue3101) 2012-01-21 00:40:18 +01:00
Mads Kiilerich
80b4f15548 hg-ssh: use shlex for shell-like parsing of SSH_ORIGINAL_COMMAND
The Mercurial ssh protocol is defined as if it was ssh-ing to a shell account on
an ordinary ssh server, and where hg was available in $PATH and it executed
the command "hg -R REPOPATH serve --stdio".

The Mercurial ssh client can in most cases just pass REPOPATH to the shell, but
if it contains unsafe characters the client will have to quote it so the shell
will pass the right -R value to hg. Correct quoting of repopaths was introduced
in 7bec00a7d7a6 and tweaked in c3194121de6c.

hg-ssh doesn't create the command via a shell and used a simple parser instead.
It worked fine for simple paths without any quoting, but if any kind of quoting
was used it failed to parse the command like the shell would do it.

This makes hg-ssh behave more like a normal shell with hg in the path would do.
2011-12-08 16:28:18 +01:00
Mads Kiilerich
9acd1868fa tests: keep track of all check-code.py warnings 2012-01-11 01:56:05 +01:00