Commit Graph

1305 Commits

Author SHA1 Message Date
Durham Goode
ce250e375a revset: lower weight for _intlist function
The histedit command uses a revset like:

(_intlist('1234\x001235')) and merge()

Previously the optimizer gave a weight of 1.5 to the _intlist side (1 for the
function, 0.5 for the string) which caused it to process the merge() side first.
This caused it to evaluate merge against every commit in the repo, which took
2.5 seconds on a large repo.

I changed the weight of _intlist to 0, since it's a trivial calculation, which
makes it process intlist first, which makes merge apply only to the revs in the
list. Which makes the revset take 0.15 seconds now. Cutting off 2.4 seconds off
our histedit performance.

>From the revset benchmark:
revset #25: (_intlist('20000\x0020001')) and merge()
0) obsolete feature not enabled but 54243 markers found!
! wall 0.036767 comb 0.040000 user 0.040000 sys 0.000000 (best of 100)
1) obsolete feature not enabled but 54243 markers found!
! wall 0.000198 comb 0.000000 user 0.000000 sys 0.000000 (best of 9084)
2014-09-12 14:21:18 -07:00
Durham Goode
79319b785d revset: make parents() O(number of parents)
Strip executes a revset like this:

max(parents(_intlist('1234\x001235')) - _intlist('1234\x001235'))

Previously the parents() revset would do 'subset & parents' which iterates over
each item in the subset and checks if it's in parents.  subset is usually the
entire repo (a spanset) so this takes a while.

Reversing the parameters to be 'parents & subset' means the operation becomes
O(number of parents) instead of O(size of repo). It also means the result gets
evaluated immediately (since parents isn't a lazy set), but I think this is a
win in most scenarios.

This shaves 0.3 seconds off strip (amend/histedit/rebase/etc) for large repositories.

revset #0: parents(20000)
0) obsolete feature not enabled but 54243 markers found!
! wall 0.006256 comb 0.010000 user 0.010000 sys 0.000000 (best of 289)
1) obsolete feature not enabled but 54243 markers found!
! wall 0.000391 comb 0.000000 user 0.000000 sys 0.000000 (best of 4323)
2014-09-12 15:00:51 -07:00
Durham Goode
9d2bd7f0b2 revset: make descendants() lazier
Previously descendants() would force the provided subset to become a set.  In
the case of revsets like '(%ld::) - (%ld)' (as used by histedit) this would
force the '- (%ld)' set to be evaluated, which produced a set containing every
commit in the repo (except %ld). This takes 0.6s on large repos.

This changes descendants to trust the subset to implement __contains__
efficiently, which improves the above revset to 0.16s. Shaving 0.4 seconds off
of histedit.

revset #27: (20000::) - (20000)
0) obsolete feature not enabled but 54243 markers found!
! wall 0.023640 comb 0.020000 user 0.020000 sys 0.000000 (best of 100)
1) obsolete feature not enabled but 54243 markers found!
! wall 0.019589 comb 0.020000 user 0.020000 sys 0.000000 (best of 100)

This commit removes the final revset related perf hotspot from histedit.
Combined with the previous two patches, they shave a little over 3 seconds off
histedit on large repos.
2014-09-12 16:21:13 -07:00
Yuya Nishihara
6684fe223e check-code: look for misuse of __bool__ 2014-09-17 00:28:37 +09:00
Mike Edgar
97e4932db0 contrib/synthrepo: return None to delete files on commit, don't raise IOError
The internal commit API was changed in 2eef89bfd70d to expect None from the
filectx function when a file is to be deleted, not an IOError. This change
keeps synthrepo up-to-date.
2014-09-15 16:07:54 -04:00
Steve Borho
44742e8431 wix: contrib/sample.hgrc is no more 2014-09-15 09:36:12 -05:00
Mads Kiilerich
0cfacaa1bd dockerrpm: create a yum/dnf repo from the generated rpms
This gives "PPA" functionality where users easily can stay uptodate with latest
nightly build.
2014-08-31 13:41:09 +02:00
Mads Kiilerich
eff8053e22 docker: add CentOS 5
There is no official CentOS 5 docker template so we use one from saltstack.
2014-05-15 01:48:37 +02:00
Mads Kiilerich
b06c2984ad docker: use stable tags for fedora and centos
A moving target is rarely useful.
2014-08-31 13:41:09 +02:00
Mads Kiilerich
13ebf84a6d dockerrpm: prepare source outside docker and just run rpmbuild inside docker
Simplifies the rpm build process.

We will use platform specific rpmbuild directories and will not clean them and
will drop the explicit copy to build directory.
2014-05-30 14:14:33 +02:00
Mads Kiilerich
111ff86a5d dockerrpm: run docker build process as the current user, not as root
Docker can be run by ordinary users if they are in the docker group. The build
process would however be run as a root user, only protected by the sandboxing.
That caused problems with the shared directory where rpmbuild would be picky
about building from sources owned by less privileged users and producing files
owned by root.

Instead, add a build user with the right uid/gid to the image and run the
docker process as that user.
2014-05-30 14:14:33 +02:00
Mads Kiilerich
907b2db860 dockerrpm: better handling of specification of docker name 2014-05-30 14:14:33 +02:00
Mads Kiilerich
269cde03e7 dockerrpm: check that docker is running correctly before building 2014-05-30 14:14:33 +02:00
Mads Kiilerich
a4d490eeb3 buildrpm: introduce --rpmdir instead of using hardcoded rpmbuild dir
Used as rpm _topdir when preparing spec and source and building rpms.
2014-08-31 13:40:53 +02:00
Mads Kiilerich
adcba0a4e6 buildrpm: introduce --withpython for building rpms that includes Python 2.7 2014-05-15 01:50:11 +02:00
Mads Kiilerich
f5261c89a9 buildrpm: introduce --prepare for preparing without actually building rpms 2014-08-31 12:51:06 +02:00
Siddharth Agarwal
8432654231 fedora: remove sample.hgrc from shipped files
sample.hgrc was long obsolete and was removed in c4f6b10a363a.
2014-09-02 14:10:08 -07:00
Gregory Szorc
94580f82da revsetbenchmark: add revset with lazyset subtraction
The added revset is used by obsolescence and currently results in
recursion in __contains__ between 2 lazysets. We should have
coverage of this revset.
2014-08-30 15:17:37 +02:00
Matt Mackall
fc6de0f1aa contrib: drop obsolete sample.hgrc
This was full of bad suggestions and is obsoleted by hg config --edit.
2014-08-29 17:15:49 +02:00
Matt Mackall
108b8a7b71 contrib: drop old convert-repo script
This has been obsolete since 2007.
2014-08-29 17:14:45 +02:00
Mads Kiilerich
5d1360e0ed cleanup: make sure we always access members of imported modules
This will make sure we get import errors, even if demandimport is enabled.

This will also mute some pyflakes 'imported but unused' warnings.
2014-08-15 04:37:45 +02:00
Matt Mackall
2b52e463fe check-code: extend try/except/finally check for multiple except clauses 2014-08-14 16:39:27 -05:00
Matt Mackall
65aa1f6760 hg-test-mode: make exit code highlight work again 2014-08-12 12:53:23 -05:00
Matt Mackall
3cbc9a8820 hg-test-mode: don't highlight variables in output
This was disabling highlighting the rest of the line for $REASONS.
Instead, we only highlight when we think we're on a 'command' line.
2014-08-12 00:42:05 -05:00
Pierre-Yves David
4c3d1d5f78 check-code: allow an escape pattern to be specified for testpattern
Before this patch it was impossible to introduce a #no-xxx comment to disable a
test pattern warning.
2014-08-02 17:04:53 -07:00
Pierre-Yves David
1a25f452db check-code: capture "wc" as a word
Otherwise entries such as "wcchange" give false negative
2014-08-02 17:01:55 -07:00
Matt Mackall
e82fc40f9c hg-test-mode: colorize HGFOO and TESTFOO environment variables 2014-08-10 23:13:12 -05:00
Matt Mackall
d5b665f1bb contrib: add emacs mode for *.t files 2014-08-08 17:45:36 -05:00
Matt Mackall
7cba48bf37 whitespace: nuke triple blank lines in **.py 2014-08-07 14:58:12 -05:00
Matt Mackall
c16790ef08 check-commit: spot growing whitespace
We discourage PEP-8-style double blank lines, spot them creeping in.
2014-08-07 14:57:20 -05:00
Matt Mackall
aeec96d347 contrib: add check-commit hook script to sanity-check commits 2014-08-06 02:45:55 -05:00
Pierre-Yves David
2017698ec4 simplemerge: burn "minimal" feature to the ground
Matt Mackall said:

  The goal of simplemerge should have always been to be a drop-in
  replacement for RCS merge. Please nuke this minimization thing entirely.

This whole things is now dead.
2014-08-05 14:56:25 -07:00
Gregory Szorc
27315bd014 revset: optimize baseset.__sub__ (issue4313)
f5a63a5506d2 regressed performance of baseset.__sub__ by introducing
a lazyset. This patch restores that lost performance by eagerly
evaluating baseset.__sub__ if the other set is a baseset.

revsetbenchmark.py results impacted by this change:

revset #6: roots(0::tip)
0) wall 2.923473 comb 2.920000 user 2.920000 sys 0.000000 (best of 4)
1) wall 0.077614 comb 0.080000 user 0.080000 sys 0.000000 (best of 100)

revset #23: roots((0:tip)::)
0) wall 2.875178 comb 2.880000 user 2.880000 sys 0.000000 (best of 4)
1) wall 0.154519 comb 0.150000 user 0.150000 sys 0.000000 (best of 61)

On the author's machine, this slowdown manifested during evaluation of
'roots(%ln::)' in phases.retractboundary after unbundling the Firefox
repository. Using `time hg unbundle firefox.hg` as a benchmark:

Before: 8:00
After:  4:28
Delta: -3:32

For reference, the subset and cs baseset instances impacted by this
change were of lengths 193634 and 193627, respectively.

Explicit test coverage of roots(%ln::), while similar to the existing
roots(0::tip) benchmark, has been added.
2014-07-24 12:12:12 -07:00
Danek Duvall
151b68d8da tests: cat error messages are different on Solaris 2014-07-21 11:27:24 -07:00
Yuya Nishihara
ba9d664628 mergetools: add --nofork option to gvimdiff.diffargs for extdiff
Without --nofork, temporary files are removed immediately before gvimdiff
starts.  "-d -g -O" are put just for consistency with gvimdiff.args.
2014-07-12 20:07:24 +09:00
anatoly techtonik
bff9cb0660 contrib/vagrant: use Vagrant for running tests on virtual machine
$ cd contrib/vagrant
  $ vagrant up
  $ vagrant ssh -c ./run-tests.sh

Repository is shared at /hgshared in guest machine.
2014-07-05 16:32:28 +03:00
Augie Fackler
e112e0adb8 check-code: drop ban on callable() which was restored in Python 3.2
A followup will restore use of callable() in place of the awkward
hasattr() construction we were using to be one step closer to Python
3.
2014-06-23 09:22:53 -04:00
Sean Farley
f850db4e51 bash_completion: add -l|--list support for shelve
This was overlooked previously and found via 'hg shelve -p -l <tab>' (to show
the diff of the shelved commit).
2014-06-06 00:21:46 -05:00
Sean Farley
1002b6c612 memfilectx: call super.__init__ instead of duplicating code
This patch changes the calling signature of memfilectx's __init__ to fall in
line with the other file contexts.

Calling code and tests have been updated accordingly.
2013-08-15 16:49:27 -05:00
Matt Mackall
1a7f325519 docker: check for docker.io first 2014-05-29 16:01:39 -07:00
Mads Kiilerich
31abc68338 buildrpm: include release version in .tar.gz name
Official releases are fully indentified by the version number, these builds are
not.

Specs are however traditionally not versioned.
2014-05-20 04:07:58 +02:00
Mads Kiilerich
d77462b1b9 buildrpm: remove prompt for uncommitted changes - it was a bad idea
We want a command that is useful in scripts, not an interactive command.
2014-05-15 01:48:37 +02:00
Mads Kiilerich
1e6c7ac0e7 buildrpm: collect code for building local hg and using it in one place 2014-05-15 01:48:37 +02:00
Mads Kiilerich
f12464b8db buildrpm: various minor cleanup 2014-05-20 03:57:21 +02:00
Gregory Szorc
5d78314d10 fix_bytes: loosen blacklist matching requirements
On my Linux machine, paths seen by 2to3 include the build directory. We
switch from an exact to substring match to allow 2to3 to work in more
environments.
2014-05-10 14:54:39 -07:00
Pierre-Yves David
73ae570dcf mergetools.hgrc: add minimal configuration for editmerge
The ``editmerge`` script is shipped in contrib and opens an editor on
every conflicting file. It needs minimal configuration to inject the
config marker in the file before opening. Otherwise it behaves the
same as ``internal:local`` and bad things happen.
2014-05-29 12:25:25 -07:00
Ali Vakilzade
1c061098e4 vim: use try catch in vim plugin to avoid conflicts 2014-05-03 19:11:51 +04:30
Matt Mackall
362480f7d9 docker: update package target to packages/ 2014-05-27 12:09:34 -07:00
Pierre-Yves David
c15a68e583 revsetbenchmark: support for running on other repo
We add a -R/--repo option to run the benchmarks on another repository. This is
very useful as some repository are bigger/more interesting  than the mercurial one.
2014-04-29 14:12:32 -07:00
Pierre-Yves David
aef1228e4b revsetbenchmark: automatically finds the perf extension
Before this changeset, you had to stand in the root of the mercurial repo to run
the `revsetbenchmark.py` script. Otherwise, the perf extension would not be
found a `./contrib/perf.py` and the script would crash in panic.

We now figure out the contrib directory from the location of this script. This
makes it possible to run the script from other location that the mercurial repo
root (but you still need to be in the core mercurial repository)
2014-04-29 13:18:22 -07:00
Pierre-Yves David
b73ad46444 revset-benchmark: add max(::(tip~20) - obsolete())
This revset is used in evolve. The new revset lazyness should make it all faster
but in practice it is significantly slower.

Below is a timing for this entry on my Mercurial repo.

2.9.2) ! wall 0.034598 comb 0.040000 user 0.040000 sys 0.000000 (best of 100)
3.0+@) ! wall 0.062268 comb 0.060000 user 0.060000 sys 0.000000 (best of 100)

The ~20 have been taken arbitrary.
2014-05-19 14:39:19 -07:00
Steven Brown
b97c015cd5 check-code: check for consistent usage of the websub filter in hgweb templates
The check-code tool now expects the "desc" keyword to be followed by the
"websub" filter, with the following exceptions:
a) It has no filters at all, e.g. a changeset description in the raw style
   templates or the repository description in the summary page.
b) It is followed by the "firstline" filter, e.g. the first line of the
   changeset description is displayed as a summary or title.
2014-05-17 17:11:06 +08:00
Pierre-Yves David
0c7ef71682 revsetbenchmark: add author(mpm) or author(lmoscovicz) to the canonical list
This matters as `author(mpm)` have a lot of matches evenly split in the repo,
while `author(lmoscoviz)` have less match (and later). This changes the execution
path of the "or" operator a lot.
2014-04-30 18:40:20 -07:00
Pierre-Yves David
3e36aa9f14 revsetbenchmark: use optparse to retrieve argument
We need more flexibility. For example we'll want to run the benchmark on other
repository.
2014-04-29 11:40:42 -07:00
Pierre-Yves David
5909fe016c revsetbenchmark: add a usage message when no arguments are passed
This increase the odd someone who didn't wrote will it find out how to use this
script.
2014-04-25 13:35:31 -07:00
Pierre-Yves David
939d348711 revsetbenchmark: add ::tip and draft() to the canonical list
The want to test element on different side of the iterators.
2014-04-29 19:15:36 -07:00
Matt Mackall
dc3027aa51 build: initial support for in-tree autobuilding recipes 2014-05-07 17:58:13 -05:00
Gregory Szorc
b477c96e34 debugshell: declare command using decorator 2014-05-04 21:19:31 -07:00
Matt Mackall
ff4d16ffda check-code: look at shebang to identify Python scripts 2014-05-05 13:37:59 -05:00
Pierre-Yves David
b42c62324c revset: inline spanset containment check (fix perf regression)
Calling a function is super expensive in python. We inline the trivial range
comparison to get back to more sensible performance on common revset operation.

Benchmark result below:

Revision mapping:
0) bced32a3fd6c 2.9.2 release
1) 2ab64f462d81 current @
2) This revision


revset #0: public()
0) wall 0.010890 comb 0.010000 user 0.010000 sys 0.000000 (best of 201)
1) wall 0.012109 comb 0.010000 user 0.010000 sys 0.000000 (best of 199)
2) wall 0.012211 comb 0.020000 user 0.020000 sys 0.000000 (best of 197)

revset #1: :10000 and public()
0) wall 0.007141 comb 0.010000 user 0.010000 sys 0.000000 (best of 361)
1) wall 0.014139 comb 0.010000 user 0.010000 sys 0.000000 (best of 186)
2) wall 0.008334 comb 0.010000 user 0.010000 sys 0.000000 (best of 308)

revset #2: draft()
0) wall 0.009610 comb 0.010000 user 0.010000 sys 0.000000 (best of 279)
1) wall 0.010942 comb 0.010000 user 0.010000 sys 0.000000 (best of 243)
2) wall 0.011036 comb 0.010000 user 0.010000 sys 0.000000 (best of 239)

revset #3: :10000 and draft()
0) wall 0.006852 comb 0.010000 user 0.010000 sys 0.000000 (best of 383)
1) wall 0.014641 comb 0.010000 user 0.010000 sys 0.000000 (best of 183)
2) wall 0.008314 comb 0.010000 user 0.010000 sys 0.000000 (best of 299)

We can see this changeset gains back the regression for `and` operation on
spanset.  We are still a bit slowerfor the `public()` and `draft()`. Predicates
not touched by this changeset.
2014-04-28 15:15:36 -07:00
Pierre-Yves David
34283e2be8 revsetbenchmark: fix error raising
We want to display the commands, not all arguments of the function. (The old
code actually crash, failing to joining a list of lists.)
2014-04-25 13:44:51 -07:00
Mads Kiilerich
87448a2943 contrib: remove mergetools.hgrc premerge=False for Beyond Compare and Araxis
There can be good reasons to disable premerge no matter which merge tool is
used. Most tools will do just fine without premerge and handle the simple
merges more or less automatic and silent. We _could_ thus disable premerge for
most tools. But without premerge, the merge tool will be launched for each file
- that makes it a slow and expensive process to perform big simple merges. It
  is thus better to consistently stick to the default premerge=True.

The mergetools.hgrc configuration for most tools implicitly use the default
premerge=True but Araxis and the Linux entry for Beyond Compare had
premerge=False. These lines has been removed.

These settings were introduced by de7cda55270e without further explanation of
why they should be good.

(We have seen some crashes on Windows with Araxis where a merge failed after a
lot of Araxis flashing. I haven't been able to reproduce it and do not know
exactly what happened. Enabling premerge avoids the problems.)
2014-04-17 14:54:46 +02:00
FUJIWARA Katsunori
0ba1f1ddab check-code: detect "% inside _()" when there are leading whitespaces
Before this patch, "contrib/check-code.py" can't detect "% inside _()"
correctly, when there are leading whitespaces before the format
string, like below:

    _(
      "format string %s" % v)

This patch adds regexp pattern "[ \t\n]*" before the pattern matching
against the format string.

"[\s\n]" can't be used in this purpose, because "\s" is automatically
replaced with "[ \t]" by "_preparepats()" and "\s" in "[]" causes
nested "[]" unexpectedly.
2014-04-16 03:05:00 +09:00
Andrew Shadura
eb789f07b1 hgk: use hg export to write commits
Instead of calling internal command, use hg export to produce changeset
diffs compatible with hg import directly.
2014-03-15 18:27:51 +01:00
Andrew Shadura
7953c9bd23 hgk: add .diff extension when exporting commits
Append the .diff extension automatically.
2014-03-25 22:47:59 +01:00
Durham Goode
13db32b575 revset: improve _descendants performance
Previously revset._descendants would iterate over the entire subset (which is
often the entire repo) and test if each rev was in the descendants list. This is
really slow on large repos (3+ seconds).

Now we iterate over the descendants and test if they're in the subset.
This affects advancing and retracting the phase boundary (3.5 seconds down to
0.8 seconds, which is even faster than it was in 2.9). Also affects commands
that move the phase boundary (commit and rebase, presumably).

The new revsetbenchmark indicates an improvement from 0.2 to 0.12 seconds. So
future revset changes should be able to notice regressions.

I removed a bad test. It was recently added and tested '1:: and reverse(all())',
which has an amibiguous output direction.  Previously it printed in reverse order,
because we iterated over the subset (the reverse part). Now it prints in normal
order because we iterate over the 1:: . Since the revset itself doesn't imply an
order, I removed the test.
2014-03-25 14:10:01 -07:00
Durham Goode
af886934bd revsetbenchmark: remove python 2.7 dependency
revsetbenchmark.py used check_output which only exists in python 2.7. This
fixes it.
2014-03-31 16:29:39 -07:00
Matt Mackall
c9eb4517fa merge with stable 2014-04-01 15:11:19 -05:00
FUJIWARA Katsunori
0eed53de6c i18n: fix "% inside _()" problems
Before this patch, "contrib/check-code.py" can't detect these
problems, because the regexp pattern to detect "% inside _()" doesn't
suppose the case that format string consists of multiple string
components concatenated implicitly or explicitly,

This patch does below for that regexp pattern to detect "% inside _()"
problems in such case.

  - put "+" into separator part ("[ \t\n]") for explicit concatenation
    ("...." + "...." style)

  - enclose "component and separator" part by "(?:....)+" for
    concatenation itself ("...." "...." or "...." + "....")
2014-04-01 02:46:03 +09:00
FUJIWARA Katsunori
01d8b27701 i18n: fix "% inside _()" problems
Before this patch, "contrib/check-code.py" can't detect these
problems, because the regexp pattern to detect "% inside _()" doesn't
suppose the case that the format string and "%" aren't placed in the
same line.

This patch replaces "\s" in that regexp pattern with "[ \t\n]" to
detect "% inside _()" problems in such case.

"[\s\n]" can't be used in this purpose, because "\s" is automatically
replaced with "[ \t]" by "_preparepats()" and "\s" in "[]" causes
nested "[]" unexpectedly.
2014-04-01 02:46:03 +09:00
Gregory Szorc
f89981fba5 revsetbenchmark: add entry for ::rev::
Revsets of the form ::rev:: were identified as the source behind the
regressions in issue 4201. Ensure we have explicit coverage of that
revset.
2014-03-28 16:12:05 -07:00
Pierre-Yves David
2df0f51a30 revsetbenchmark: add a summary at the end of execution
The summary list timing per revset making it much more easier to compare
revision to each other.
2014-03-26 18:51:49 -07:00
Pierre-Yves David
63b573d0ad revsetbenchmark: retrieve the benchmark value in python
We retrieve the output of the perf extension and print it ourself. This open the
door to processing of this data in the script.
2014-03-26 18:39:56 -07:00
Pierre-Yves David
b9be167079 revsetbenchmark: get revision to benchmark in a function
And move it to proper subprocess call.
2014-03-26 18:36:19 -07:00
Pierre-Yves David
9aaf552368 revsetbenchmark: convert revision display to proper subprocesscall 2014-03-26 18:27:17 -07:00
Pierre-Yves David
9af19c7201 revsetbenchmark: convert performance call to proper subprocess call 2014-03-26 18:26:18 -07:00
Pierre-Yves David
2214b66655 revsetbenchmark: convert update to proper subprocess call 2014-03-26 18:14:15 -07:00
Matt Mackall
cf6b799f9a revsetbenchmark: fix semicolon 2014-03-27 16:52:24 -05:00
Pierre-Yves David
05c4763edb revsetbenchmark: simplify and convert the script to python
The script is now in python. That translation is very raw, more improvement to
comes:

The "current code" and "base" entry have been dropped.  This is trivial to get
same result using a tagged revision or "." in the list of benchmarked revision.
2014-03-26 18:03:30 -07:00
Pierre-Yves David
258f4d6aa6 revsetbenchmapi: fix template
The revision description missed an \n
2014-03-26 16:38:08 -07:00
Pierre-Yves David
8dd85d0996 perf: unroll the result in perfrevset
With the new lazy revset implementation, we need to actually read all elements
to trigger all the computations. Otherwise a no-op if of course much faster than
the full work.
2014-03-26 17:25:11 -07:00
FUJIWARA Katsunori
f557533576 contrib: add "hgperf" command to measure performance of commands easily
Newly added "hgperf" command repeats "dispatch.runcommand()" for
specified Mercurial command and measure performance of it in the same
manner of "contrib/perf.py" extension.

Users (mainly developers) can examine performance of the target
command easily, without adding new entry for it to "contrib/perf.py"
extension.
2014-02-15 19:51:20 +09:00
Olle Lundberg
5c09f2f56b contrib: don't hardcode path to bash interpreter
Use the env binary to figure out the correct bash to use.
Certain systems ships with an ancient version of bash, but the
user might have installed a newer one that is earlier in $PATH.

For example the current version of Mac OS X ships version 3.2.51
of bash, which does not understand new fancy builtins such as
readarray. A user might install a newer version of bash, use that
as their shell and add that path before bin.
2014-03-26 11:59:13 +01:00
Olle Lundberg
6aececb063 contrib: explicitly enable perf extension for revset tests
If a developer doesn't have the perf extension enabled the revset
benchmarking will fail. This patch explicitly enables the
perf extension when running the tests.
2014-03-25 23:10:15 +01:00
Matt Mackall
62ec223373 check-code: check for argument passing py2.6ism 2014-03-19 18:04:03 -05:00
Pierre-Yves David
c9955ebfa0 benchmark-revset: add full version of benchmarked revset
All revsets added to benchmark so far are aimed to show an improvement of
performance from laziness. We had more wider version to track impact of laziness
on them.
2014-03-15 18:11:51 -07:00
Andrew Shadura
2aff9e16b0 hgk: enable selected patch text on Windows
Port a patch from gitk. Original description:

On windows, mouse input follows the keyboard focus, so to allow selecting
text from the patch canvas we must not shift focus back to the top level.
This change has no negative impact on X, so we don't explicitly test
for Win32 on this change. This provides similar selection capability
as already available using X-Windows.

Signed-off-by: Mark Levedahl <mdl123@verizon.net>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2014-03-15 15:44:51 +01:00
Andrew Shadura
3634ed2b59 hgk: ignore ctrl-z as EOF on windows
Port a patch from gitk. Original description:

Cygwin's Tcl is configured to honor any occurence of ctrl-z as an
end-of-file marker, while some commits in the git repository and possibly
elsewhere include that character in the commit comment. This causes gitk
ignore commit history following such a comment and incorrect graphs. This
change affects only Windows as Tcl on other platforms already has
eofchar == {}. This fixes problems noted by me and by Ray Lehtiniemi, and
the fix was suggested by Shawn Pierce.

Signed-off-by: Mark Levedahl <mdl123@verizon.net>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2014-03-15 15:33:50 +01:00
Lucas Moscovicz
1ff08e4b20 revset: changed minrev and maxrev implementations to use ordered sets
Performance Benchmarking:

0) max(tip:0)
1) min(0:tip)
2) min(0::)

c6d901b5cf89 (2.9.1 release)

    0) ! wall 0.005699 comb 0.000000 user 0.000000 sys 0.000000 (best of 450)
    1) ! wall 0.005414 comb 0.010000 user 0.010000 sys 0.000000 (best of 493)
    2) ! wall 0.025951 comb 0.030000 user 0.030000 sys 0.000000 (best of 107)

a9da3f4c0086 (public tip at submission time)

    0) ! wall 0.015177 comb 0.020000 user 0.020000 sys 0.000000 (best of 175)
    1) ! wall 0.014779 comb 0.010000 user 0.010000 sys 0.000000 (best of 189)
    2) ! wall 12.345179 comb 12.350000 user 12.350000 sys 0.000000 (best of 3)

Current patches:

    0) ! wall 0.001911 comb 0.000000 user 0.000000 sys 0.000000 (best of 1357)
    1) ! wall 0.001943 comb 0.010000 user 0.010000 sys 0.000000 (best of 1406)
    2) ! wall 0.000405 comb 0.000000 user 0.000000 sys 0.000000 (best of 6761)
2014-02-18 11:35:03 -08:00
Pierre-Yves David
2711ccc7d9 contrib: make revset benchmark script able to read from stdin
This help fine control of what we want to benchmark
2014-03-14 15:47:29 -07:00
Pierre-Yves David
e850278a13 contrib: have the revset benchmark test script take a revset
The script now selection revision to run benchmark against using a revset query
instead of a revision range.

It is expected that people benchmarking revset have some knowledge of revset.
2014-03-14 15:43:55 -07:00
Lucas Moscovicz
cd4b923ea4 contrib: added revset performance benchmarking script
This script takes two arguments (starting revision, ending revision) and tests
for each revision in between the entire list of revsets in the script using
perfrevset.
2014-03-14 11:24:59 -07:00
Lucas Moscovicz
90e1c7d125 contrib: added revset examples for benchmarking performance
Added list of revsets used for benchmarking revset performance so far.
2014-03-14 15:00:15 -07:00
Augie Fackler
5c9b7fcbc6 fix_bytesmod: use the "from mercurial" form of the import to avoid breaking httpclient
Without this patch, 2to3's rewrites to httpclient cause it to fail to
import. With this patch, it's probably hopelessly broken, but at least
won't block forward progress on non-http2 functionality on Python 3.
2014-02-04 18:33:25 -05:00
Steve Borho
deded2d9ba wix: pull in new templates 2014-01-23 14:06:15 -06:00
Augie Fackler
ad0fddea79 check-code: disallow use of dict(key=value) construction
{} literals are faster and more consistent across Python 2 and 3.

Whitelisted the one use of dict() that is using a generator expresion.
2014-03-12 13:31:27 -04:00
Augie Fackler
46b365066d synthrepo: move from dict() construction to {} literals
The latter are both faster and more consistent across Python 2 and 3.
2014-03-12 13:12:26 -04:00
Matt Mackall
b41bd8b777 contrib: drop tmplrewrite
Needed for the 1.3 transition in 2009, no longer relevant
2014-03-01 20:08:41 -06:00
Danek Duvall
4a6ebc20e6 solaris: diff -u emits "No differences encountered"
Solaris diff -u isn't silent when two files are identical, and tests that
don't account for that will fail.  Fix those tests, and introduce a check
that prevents reintroduction.
2014-02-19 13:46:49 -08:00
Simon Heimberg
18c74b7667 help: remove last occurrences of ".. note::" without two newlines
When we add two newlines after ".. note::" translators will not see this
entry. And all versions of docutils interpret this paragraph correctly
(details in 89e31d6e438f).
2014-02-19 13:25:28 +01:00