Commit Graph

27128 Commits

Author SHA1 Message Date
Gregory Szorc
3fccff1c87 osutil: use absolute_import 2015-12-12 13:46:32 -05:00
Gregory Szorc
132a5b6d98 mpatch: use absolute_import
While I was here, I removed the try..except around importing cStringIO
because cStringIO should always be importable on modern Python versions.
We already do an unconditional import in other files.
2015-12-12 13:37:56 -05:00
Gregory Szorc
d6131e9cde diffhelpers: use absolute_import 2015-12-12 13:35:41 -05:00
Gregory Szorc
38f154a7ae bdiff: use absolute_import 2015-12-12 13:34:55 -05:00
Gregory Szorc
631c25fecc base85: use absolute_import 2015-12-12 13:33:47 -05:00
Gregory Szorc
71b5e83cd8 destutil: use absolute_import 2015-12-12 13:32:25 -05:00
Gregory Szorc
06ebc04a42 obsolete: use absolute_import 2015-12-12 13:30:47 -05:00
Gregory Szorc
164cea475f contrib: ignore empty files in check-py3-compat.py 2015-12-12 13:27:31 -05:00
Gregory Szorc
b6d0b58fa7 doc: make gendoc.py module import policy aware
Without this, running gendoc.py during an install without C modules
available (via `make local`) will result in an import failure because
the default module load policy insists on C modules.

We also remove the sys.path adjustment because it is no longer needed
since our magic importer handles things.
2015-12-12 13:23:29 -05:00
Matt Mackall
3bbe98aeff merge with stable 2015-12-11 17:45:19 -06:00
Pierre-Yves David
516c4fcbd3 check-commit: add a test for the patch checking script in contrib
This introduces a test for the change introduced in d1bba8f10f62.
2015-12-11 12:21:26 +00:00
Bryan O'Sullivan
319ff5c06a match: use re2 in readpatternfile if possible
This has a small, but measurable, effect on performance if a pattern
file is very large.  In an artificial test with 200,000 lines of
pattern data, using re2 reduced read time by 200 milliseconds.
2015-12-10 21:33:55 -08:00
Bryan O'Sullivan
484df3d610 test-hgignore.t: add tests for comments
Although support for comments in hgignore files has existed for a
while, it was previously untested.
2015-12-10 21:32:19 -08:00
timeless
65f4d64bf2 help: fix help -c/help -e/help -k
Before, hg help -c was the same as hg help, now it only shows commands.
Before, hg help -e was the same as hg help, now it only shows extensions.
Before, hg help -k crashed, now it shows all topics.
2015-12-09 05:56:54 +00:00
timeless
2d7d422638 help: call filtercmd from topicmatch
update test coverage to explicitly define when help -c should
list debug/deprecated items.
2015-12-09 19:09:35 +00:00
timeless
068f6ee2a2 help: refactor filtercmd 2015-12-09 19:09:06 +00:00
Yuya Nishihara
e95ba280a6 paths: include #fragment again
Since 3be994f0f015, #fragment was missing in "hg paths" output because
path.loc was changed to a parsed URL. "hg paths" should use path.rawloc to
show complete URLs.
2015-12-07 21:42:50 +09: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
Sietse Brouwer
f5fed5a270 dirstate: don't write repo.currenttransaction to repo.dirstate if repo
is None (issue4983)

Some hooks, such as post-init and post-clone, do not get a repo parameter in
their environment. If there is no repo, there is no repo.currenttransaction();
attempting to retrieve it anyway was causing crashes. Now currenttransaction is
only retrieved and written if the repo is not None.
2015-12-03 01:38:21 +01:00
Gregory Szorc
4e3200d742 tests: test changegroup generation for filtered changesets (issue4982)
The test demonstrates the buggy behavior from issue4982 where the
changegroup contains changesets it shouldn't.
2015-12-02 14:20:13 -08:00
Yuya Nishihara
bbbc39e0a4 parsers: fix parse_dirstate to check len before unpacking header (issue4979) 2015-12-02 23:04:58 +09:00
Matt Mackall
ec9590ea23 Added signature for changeset 86c16f25367c 2015-12-01 20:18:28 -06:00
timeless
4714e37c78 transplant: use Oxford comma 2015-11-30 19:28:26 +00:00
Laurent Charignon
2ddae732ee crecord: add dictionary to default return value of filterpatch
When committing interactively without changes, the user would get a ValueError
exception. This patch adds a dictionary to the return value of filterpatch
when there are no files to change.
2015-12-09 17:01:27 -08:00
Pierre-Yves David
c33f182029 discovery: properly filter changeset in 'peer.known' (issue4982)
The 'peer.known' call (handled at the repository level) was applying its own
manual filtering (looking at phases) instead of relying on the repoview
mechanism. This led to the discovery finding more "common" node that
'getbundle' was willing to recognised. From there, bad things happen, issue4982
is a symptom of it. While situations like described in issue4982 can still
happen because of race conditions, fixing 'peer.known' is important for
consistency in all cases.

We update the code to use 'repoview' filtering. This lead to small changes in
the tests for exchanging obsolescence marker because the discovery yields
different results.

The test affected in 'test-obsolete-changeset-exchange.t' is a test for
issue4982 getting back to its expected state.
2015-12-02 16:12:15 -08:00
Pierre-Yves David
614f88221e test: add an extra base changeset in test-obsolete.t
A fix to issue4982 (not fixed in this patch) will reinforce the filtering
during discovery. This will makes two of our test repositories appear
unrelated (because all common content is properly hidden). To avoid this, we
introduce an extra base changeset that will not get obsoleted. This affects
various test output so we put this addition in its own changeset.
2015-12-09 14:22:57 -08:00
timeless
0d1432229b parents: provide equivalent revsets in help 2015-12-08 20:21:08 +00:00
Martin von Zweigbergk
8e7f0fdda8 merge: refuse update/merge if there are unresolved conflicts (BC)
We currently allow updating and merging (with --force) when there are
unresolved merge conflicts, as long as there is only one parent of the
working copy. Even worse, when updating to another revision
(linearly), if one of the unresolved files (including any conflict
markers in the working copy) can now be merged cleanly with the target
revision, the file becomes marked as resolved.

While we could potentially allow updates that affect only files that
are not in the set of unresolved files, that's considerably more work,
and we don't have a use case for it anyway. Instead, let's keep it
simple and refuse any merge or update (without -C) when there are
unresolved conflicts.

Note that test-merge-local.t explicitly checks for conflict markers
that get carried over on update. It's unclear if that was intentional
or not, but it seems bad enough that we should forbid it. The simplest
way of fixing the test case is to leave the conflict markers in place
and just mark the files resolved, so let's just do that for now.
2015-12-07 20:43:24 -08:00
timeless
8d2aaddeec tests: drop require slow in test-contrib-perf
* skip presleep
* use a stub mode which does not output and generally loops only once
* only use one node for perfparents
2015-12-08 07:05:37 +00:00
timeless
15faf26352 convert/svn: quiet check-config 2015-12-08 08:37:12 +00: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
568fd6bf86 tests: use a single repo for test-contrib-perf 2015-12-08 04:56:26 +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
7a14eca3ba tests: use absolute_import in tinyproxy
Thus begins a series of adding absolute_import to a bunch of files for
Python 3 compatibility.
2015-12-06 22:20:08 -08:00
Gregory Szorc
32a26751a0 tests: use absolulte_import in test-wireproto.py 2015-12-06 22:02:39 -08:00
Gregory Szorc
6aedf6c7e9 tests: use absolute_import in test-walkrepo 2015-12-06 22:05:19 -08:00
Gregory Szorc
6700f82707 tests: use absolute_import in hgweberror.py 2015-12-06 22:27:53 -08:00
Gregory Szorc
dd5b65b197 tests: use absolute_import in hghave.py 2015-12-06 22:27:18 -08:00
Gregory Szorc
8cca557cf0 tests: use absolute_import for heredoctest.py 2015-12-06 22:26:12 -08:00
Gregory Szorc
df8d1f17a7 tests: use absolute_import in /get-with-headers.py
While I was here, I removed condition code for failure to import json.
This code was necessary to support Python < 2.6, which didn't include
the json module.
2015-12-06 22:25:41 -08:00
Gregory Szorc
a89bad72f6 tests: use absolute_import in generate-working-copy-states.py 2015-12-06 22:23:37 -08: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