Commit Graph

1478 Commits

Author SHA1 Message Date
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
Yuya Nishihara
86b18c8c85 import-checker: allow symbol imports from hgweb.common and .request
This seems the convention of hgweb.
2015-11-01 13:55:21 +09:00
Matt Mackall
fd472e2570 perf: un-bitrot perfstatus 2015-11-19 15:02:27 -06:00
Mads Kiilerich
1f01797b63 contrib: offer Python 2.7.10 2015-10-15 21:36:47 +02:00
Mads Kiilerich
e2a51cd4a4 contrib: drop Python < 2.6 from Makefile.python 2015-10-15 21:35:49 +02:00
Augie Fackler
d2b9a17e64 debian: install bash completion as hg and not mercurial (issue4900) 2015-10-14 14:53:15 -04:00
Pierre-Yves David
4b641b8c22 check-code: detect and ban 'util.Abort'
We have seen the light, please use the new way.
2015-10-08 12:53:09 -07:00
Pierre-Yves David
30913031d4 error: get Abort from 'error' instead of 'util'
The home of 'Abort' is 'error' not 'util' however, a lot of code seems to be
confused about that and gives all the credit to 'util' instead of the
hardworking 'error'. In a spirit of equity, we break the cycle of injustice and
give back to 'error' the respect it deserves. And screw that 'util' poser.

For great justice.
2015-10-08 12:55:45 -07:00
Matt Mackall
5e1b4ad958 urls: bulk-change primary website URLs 2015-09-30 15:43:49 -05:00
Pierre-Yves David
b2cac2b8b4 check-code: forbid mutable value for default argument
default value are common to all call. Using mutable value is a classical source
of bug in Python. We forbid it.

The regexp (Courtesy of Matt Mackall) is only catching such value on the first
line of a definition, but that will be good enough for now.
2015-09-24 00:34:15 -07:00
Augie Fackler
3514fe79a6 debian: include bash completions in mercurial-common 2015-09-22 14:47:18 -04:00
Augie Fackler
859b1bace0 debian: install hgk as part of mercurial-common (issue4829)
Leaving the hgk binary in /usr/bin causes some lintian warnings, and
downstream packages poke it in /usr/share/mercurial, so we'll just
stash it in there. Rather than patch hgk.py as part of the Mercurial
install, just drop a config file in /etc/mercurial/hgrc.d that points
to the installed hgk.
2015-09-22 14:32:17 -04:00
Augie Fackler
ca65b8e235 debian: install config files as part of mercurial-common
Future patches will start putting config files in /etc/mercurial/,
this just installs them.
2015-09-22 14:14:05 -04:00
Augie Fackler
e285b749d8 debian: configuration so that cacerts is properly loaded
This will be included in the mercurial-common package in a followup
patch.
2015-09-22 14:31:17 -04:00
Augie Fackler
1c78c614e7 debian: install hg-ssh to /usr/bin just like downstream 2015-09-22 14:13:07 -04:00
Augie Fackler
0dd6c0c729 import-checker: use modern .endswith for multiple suffixes
Suggested by Anton Shestakov <engored@ya.ru> on the list. Thanks!
2015-09-10 09:52:17 -04:00
timeless@mozdev.org
0c786bcfc9 import-checker: accept .pyc and .pyo files (issue4812)
Python 2.6.1 (r261:67515, Jun 24 2010, 21:47:49)
[GCC 4.2.1 (Apple Inc. build 5646)] on darwin

$ ls '/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6'/BaseHTTPServer.py*
/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/BaseHTTPServer.pyc
/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/BaseHTTPServer.pyo
2015-09-02 16:07:35 -04:00
Augie Fackler
ad2436c3e6 debian: switch to using debhelper and dh_python2 to build debs
This is a much larger commit than I'd like, but I honestly don't see a
good way to break it up and leave things working. Summary:

We now use debian/rules with debhelper to build our debs. This is much
more standard, and means we use dh_python2 to do things like handle
leaving .pyc files out of the built debs.

The resulting package is split into mercurial and mercurial-common,
with the former being the hg stub and all the native .sos, and the
latter being basically everything else.

builddeb and dockerdeb are updated to use the new system. The old way
(using dpkg by hand) breaks with the above changes because
debian/control no longer contains a version string (that's now guessed
from the phony changelog.)

Tests are updated to assert that the right files end up in the right
debs.
2015-08-26 10:59:09 -04:00
Kevin Bullock
b6e3c6c99e vagrant: update to official Debian 8.1 base box
Debian now rolls their own official Vagrant base boxes, so use that. At
the same time, we're updating from Debian 7.4 (wheezy) to 8.1 (jessie),
and switching from 32-bit to 64-bit (Debian does not provide 32-bit base
boxes).
2015-09-02 11:52:24 -05:00
Augie Fackler
a0cdbf43ee buildrpm: mkdir -p two needed directories (issue4779)
Without this, building RPMs can fail.
2015-09-01 14:41:41 -04:00
Matt Mackall
58b892a1cb merge with stable 2015-09-01 17:09:00 -05:00