Commit Graph

1498 Commits

Author SHA1 Message Date
timeless
777dbfe303 commands: consistently indent notes 3 spaces
most notes have 3 spaces for indentation, these had 2...
2015-12-18 06:33:48 +00:00
Gregory Szorc
9f75546b76 perf: add perfrevlogrevision
As part of investigating performance improvements to revlog reading,
I needed a mechanism to measure every part of revlog reading so I knew
where time was spent and how effective optimizations were.

This patch implements a perf command for benchmarking the various
stages of reading a single revlog revision.

When executed against a manifest revision at the end of a 30,000+
long delta chain in mozilla-central, the command demonstrates that
~80% of time is spent in zlib decompression.
2015-12-20 18:38:21 -08:00
Gregory Szorc
179b25b04a perf: call clearcaches() in perfmanifest
The old code only partially cleared the caches. Now that we have a
comprehensive method for wiping all caches, let's call it.

This appears to introduce a marginal regression in `hg perfmanifest`
on mozilla-central. This is good because the new result is more
accurate since caches aren't being used.
2015-12-20 17:57:44 -08:00
Pascal Quantin
edc138619b win32: add internals help topics to Inno Setup installer 2015-12-17 19:33:44 +01:00
Matt Mackall
bfb407a6ed wix: add missing template 2015-12-16 17:17:12 -06:00
Matt Harbison
ac7fc5b232 perf: adjust perfstartup() for Windows
The /dev/null redirect was causing the following error:

  The system cannot find the path specified.

Adjusting HGRCPATH as part of the command line causes the system to try to
execute 'HGRCPATH'.
2015-12-13 18:13:44 -05:00
Augie Fackler
a84cc516e7 merge: restate calculateupdates in terms of a matcher
Once we get a matcher down into manifestmerge, we can make narrowhg
work more easily and potentially let manifest.match().diff() do less
work in manifestmerge.
2015-12-14 20:37:41 -05:00
Gregory Szorc
164cea475f contrib: ignore empty files in check-py3-compat.py 2015-12-12 13:27:31 -05:00
timeless
279ca50a3d check-config: handle multiline config 2015-12-08 08:21:46 +00:00
timeless
73dbe2bc47 check-config: escape period in regexp for inline comments 2015-12-08 08:36:00 +00:00
timeless
80e1115762 check-config: allow numbers in configs
p4...
2015-12-08 09:09:01 +00:00
timeless
98fb00321c check-config: recognize convert style documentation 2015-12-08 09:22:53 +00:00
timeless
e91c29104b perf: perfrevlog optimize for perf.stub 2015-12-04 19:05:56 +00:00
timeless
0da8511b85 perf: add getlen
getlen will return 1 if perf.stub
2015-12-04 19:05:32 +00:00
timeless
04f03f3aeb perf: add optional rev for perflog and perftemplating 2015-12-04 18:08:50 +00:00
timeless
05d63c41ee perf: perfparents honor config perf.parentscount 2015-12-04 18:18:07 +00:00
timeless
c9727daf48 perf: offer perf.stub to only run one loop 2015-12-04 17:41:30 +00:00
timeless
aa0ea59703 perf: improve grammar of gettimer comment 2015-12-04 17:41:02 +00:00
Gregory Szorc
da7e434856 perf: add perflrucachedict command
It measures time to construct, perform gets, sets, or mixed mode
operations on a cache of configurable size with variable numbers of
operations.
2015-12-06 17:07:50 -08:00
Gregory Szorc
61de06ecc1 tests: add test for Python 3 compatibility
Python 3 is inevitable. There have been incremental movements towards
converting the code base to be Python 3 compatible. Unfortunately, we
don't have any tests that look for Python 3 compatibility. This patch
changes that.

We introduce a check-py3-compat.py script whose role is to verify
Python 3 compatibility of the files passed in. We add a test that
calls this script with all .py files from the source checkout.

The script currently only verifies that absolute_import and
print_function are used. These are the low hanging fruits for Python
compatbility. Over time, we can include more checks, including
verifying we're able to load each Python file with Python 3. You
have to start somewhere.

Accepting this patch means that all new .py files must have
absolute_import and print_function (if "print" is used) to avoid
a new warning about Python 3 incompatibility. We've already
converted several files to use absolute_import and print_function
is in the same boat, so I don't think this is such a radical
proposition.
2015-12-06 22:39:12 -08:00
Matt Mackall
0fe2dfc303 merge with stable 2015-12-07 18:06:13 -06:00
Mathias De Maré
148961a2eb dockerlib: short form for non-unique uid/gid for CentOS 5 compat (issue4977)
CentOS 5 does not support '--non-unique', but does support the short '-o'.
2015-12-07 17:39:31 +01:00
Yuya Nishihara
934b9df7b4 import-checker: tell which symbol causes "direct symbol import"
This would be sometimes useful to understand why import-checker.py complains
about it.
2015-12-06 14:28:35 +09:00
Yuya Nishihara
b16ffd4ab4 import-checker: allow absolute imports of sub modules from local packages
Before this patch, import-checker.py didn't know if a name in ImportFrom
statement are module or not. Therefore, it complained the following example
did "direct symbol import from mercurial".

  # hgext/foo.py
  from mercurial import hg

This patch reuses the dict of local modules to filter out sub-module names.
2015-12-06 14:18:19 +09:00
Pierre-Yves David
888da26260 docker: match more version of 'hg docker version' (issue4967)
My version of docker (1.8.3) have a different formating for 'docker version'
that broke the build script. We make the version matching more generic in to
work with both version.
2015-11-24 18:13:25 -08:00
Anton Shestakov
169417da80 dockerlib: allow non-unique uid and gid of $DBUILDUSER (issue4657)
There are make targets for building mercurial packages for various
distributions using docker. One of the preparation steps before building is to
create inside the docker image a user with the same uid/gid as the current user
on the host system, so that the resulting files have appropriate
ownership/permissions.

It's possible to run `make docker-<distro>` as a user with uid or gid that is
already present in a vanilla docker container of that distibution. For example,
issue4657 is about failing to build fedora packages as a user with uid=999 and
gid=999 because these ids are already used in fedora, and groupadd fails.
useradd would fail too, if the flow ever got to it (and there was a user with
such uid already).

A straightforward (maybe too much) way to fix this is to allow non-unique uid
and gid for the new user and group that get created inside the image. I'm not
sure of the implications of this, but marmoute encouraged me to try and send
this patch for stable.
2015-11-08 01:10:52 +08:00
Steve Borho
e04f287b5a wix: style-coal.css has been renamed 2015-11-09 09:41:20 -06:00
Augie Fackler
75a732a6ac packaging: rework version detection and declaration (issue4912)
Previously the -rc in our rc tags got dropped, meaning that those
packages looked newer to the packaging system than the later release
build. This rectifies the issue, though some damage may already have
been done on 3.6-rc builds.

I'm mostly cargo-culting the RPM version format - there don't appear
to be rules for RPM about how to handle this. Hopefully an RPM
enthusiast can fix up what I've done as a followup.
2015-10-26 14:19:37 -04:00
Yuya Nishihara
758ac06b0b contrib: disable SSLv3_method() to build old Python with recent libssl
Because OpenSSL is compiled without SSLv3 support on Debian sid, Python 2.6.9
can't be built without this hack. Python 2.7 is patched appropriately, but
2.6 isn't.

http://bugs.python.org/issue22935
2015-11-07 16:31:04 +09:00
Anton Shestakov
11e3a4574b builddeb: read default distribution and codename from lsb_release
This makes `make deb` place packages into a more appropriately named directory
instead of just "debian-unknown".
2015-11-25 18:07:33 +08:00
Anton Shestakov
68c6668d13 builddeb: remove unused --debbuilddir option
Looks like it was never used and after d43cf24ee602 it can be removed.
2015-11-25 15:26:03 +08:00
Anton Shestakov
b61eeae0ab builddeb: add --distid option to specify Distributor ID
This allows builddeb to handle distributions that are not Debian.

Distributor ID is reported by lsb_release --id, and in case of builddeb it's
usually Debian or Ubuntu.
2015-11-25 15:15:03 +08:00
Anton Shestakov
b5106c63ef builddeb: rename --release option to --codename
Debian and Ubuntu releases have both codenames and traditional version numbers.
An entire "branch" of releases is referred to by its codename, and version
numbers (e.g. 8.2, 14.04.3) are used to address individual releases.

Since we use codenames for building .deb packages, let's call the option and
the variable appropriately.
2015-11-25 14:59:43 +08:00
Pierre-Yves David
f954beb8e9 check-commit: remove confusion between summary line and other headers
The pull url header can easily grow over 80 chars. The check-commit script was
confusing this with a too long summary line. We update the regular expression to
not match other header.
2015-11-06 17:27:42 -05:00
timeless
f10778ca64 check-code: allow argument passing py2.6ism
this backs out dead48a12ce0, because Python2.5 support was dropped
2015-10-15 17:28:26 -04:00
timeless
ed8b59f668 win32: drop reference to python2.5 2015-10-15 17:19:11 -04:00
Ryan McElroy
20c45a5f3d editmerge: dequote other use of $ED
We want to support editors with parameters, eg EDITOR="vim -O" or whatever.
So remove the quotes from around $ED and assume that the editor variable is
properly escaped already.
2015-10-19 21:36:12 -07:00
Mads Kiilerich
09567db49a spelling: trivial spell checking 2015-10-17 00:58:46 +02:00
timeless
76f10d8d74 check-code: block non-portable pipe-and 2015-10-15 20:36:12 -04:00
Ryan McElroy
ea5dcaa5fa editmerge: properly quote variables
Previously, files with spaces would break editmerge.
2015-10-17 15:48:14 -07:00
FUJIWARA Katsunori
106983607a dirstate: make dirstate.write() callers pass transaction object to it
Now, 'dirstate.write(tr)' delays writing in-memory changes out, if a
transaction is running.

This may cause treating this revision as "the first bad one" at
bisecting in some cases using external hook process inside transaction
scope, because some external hooks and editor process are still
invoked without HG_PENDING and pending changes aren't visible to them.

'dirstate.write()' callers below in localrepo.py explicitly use 'None'
as 'tr', because they can assume that no transaction is running:

  - just before starting transaction
  - at closing transaction, or
  - at unlocking wlock
2015-10-17 01:15:34 +09:00
Christian Delahousse
c021a178a2 contrib: make editmerge look for merge markers at the beginning of the line
This fix adds a caret to the start of the regex looking for merge markers. This
avoids the issue arises when you've real merge conflicts in a file that tests
for the existance of merge markers in test output. Editmerge will not open on
the fake/tested merge markers because they'll be indented in.
2015-10-16 15:01:42 -07:00
timeless
6706ae14fe contrib/perf: perfparents handle filtered repos 2015-11-24 21:36:20 +00:00
timeless
0706103b1f contrib/perf: perfparents handle tiny repos
refuse to run if there are not enough commits
2015-11-24 20:54:14 +00:00
timeless
d5fb95573c contrib/perf: fix perfmergecalculate
merge.calculateupdates requires an array of ancestors and followcopies
2015-11-24 21:44:16 +00:00
timeless
1781386673 contrib/perf: fix perffncachewrite
fncache.write requires a transaction (and thus a lock)
2015-11-24 22:01:11 +00:00
timeless
73fa098081 contrib/perf: omit duplicated function 2015-11-24 20:05:15 +00:00
timeless
87b00f7ab0 contrib/perf: name functions to match decorators 2015-11-24 20:08:21 +00:00
Gregory Szorc
8577d931d0 revsetbenchmarks: support benchmarking changectx loading
Many revset consumers construct changectx instances for each returned
result. Add support for benchmarking this to our revset benchmark
script.

In the future, we might want to have some kind of special syntax in
the parsed revset files to engage this mode automatically. This would
enable us to load changectxs for revsets that do that in the code and
would more accurately benchmark what's actually happening. For now,
running all revsets with or without changectxs is sufficient.
2015-11-21 15:43:04 -08:00
Gregory Szorc
86b206e002 perf: support obtaining contexts from perfrevset
Previously, perfrevset called repo.revs(), which only returns integer
revisions. Many revset consumers call repo.set(), which returns
changectx instances. Or they obtain a context manually later.

Since obtaining changectx instances when evaluating revsets is common,
this patch adds support for benchmarking this use case.

While we added an if conditional for every benchmark loop, it
doesn't appear to matter since revset evaluation dwarfs the cost
of a single if.
2015-11-21 15:39:18 -08:00