Commit Graph

34235 Commits

Author SHA1 Message Date
Boris Feld
43de0b805b configitems: register the 'perf.stub' config 2017-06-30 03:43:46 +02:00
Boris Feld
a37fa16d39 configitems: register the 'commands.rebase.requiredest' config 2017-06-30 03:32:25 +02:00
Boris Feld
529a966468 configitems: register the 'experimental.rebaseskipobsolete' config 2017-06-30 03:42:06 +02:00
Boris Feld
112417d22c configitems: register the 'experimental.nonnormalparanoidcheck' config 2017-06-30 03:41:49 +02:00
Boris Feld
9d0cb965ed configitems: register the 'experimental.allowdivergence' config 2017-06-30 03:39:44 +02:00
Saurabh Singh
ffc1ad2f09 histedit: removing the experimental config 'histeditng'
This config has been around for about 2 years now. So, it can be
assumed to be stable. Therefore, I am removing the config. This also makes the
test 'test-histedit-base.t' compatible with chg.

Test Plan:
 - Ran the test 'test-histedit-base.t' with and without '--chg' option.
 - Ran all the other tests without '--chg' option.
 - Checked the output of 'hg help histedit'.

Differential Revision: https://phab.mercurial-scm.org/D942
2017-10-05 21:56:25 +00:00
Saurabh Singh
abf69172aa convert: fix the RevisionSpec import in the bzr module
This import was failing (because its invalid) which was resulting in
the following tests failing with chg running:

 - test-convert-bzr.t
 - test-convert-bzr-directories.t
 - test-convert-bzr-ghosts.t
 - test-convert-bzr-treeroot.t
 - test-convert-bzr-114.t
 - test-convert-bzr-merges.t

This commit fixes the import which in turn fixes the tests.

Test Plan:
Ran the aforementioned tests with and without '--chg' option.

Differential Revision: https://phab.mercurial-scm.org/D936
2017-10-05 00:48:44 +00:00
Augie Fackler
49deaca739 test-annotate: fix up expected output for pure
This is just a side effect of surfacing the "revisions were skipped"
state in the blame output.

Differential Revision: https://phab.mercurial-scm.org/D956
2017-10-05 15:12:11 -04:00
Alex Gaynor
88c328dbf9 style: never use a space before a colon or comma
Differential Revision: https://phab.mercurial-scm.org/D954
2017-09-29 15:48:34 +00:00
Jun Wu
bcceeef325 eol: make [eol] config section sensitive for chg confighash
The eol extension may mangle the [eol] config section and that means chg is
unable to detect config file change (because it re-applies setconfig
changes).

This makes test-eol.t pass with chg.

Differential Revision: https://phab.mercurial-scm.org/D917
2017-10-02 19:25:11 -07:00
Jun Wu
0802429abd test-alias: make it compatible with chg
ad1bdea (dispatch: defer environment variable resolution in alias commands
(BC), 2016-05-06) made environment variables lazily resolved. But after
D805 (alias: make alias command lazily resolved 2017-09-23), alias
resolution happened after uisetup, which breaks the test for chg.

`uisetup` is known to behave different in chg. Let's verify the feature
without using `*setup`.

Differential Revision: https://phab.mercurial-scm.org/D912
2017-10-02 16:48:58 -07:00
Saurabh Singh
c06453cd30 serve: make tests compatible with chg
chg only supports 'hg serve' when the options to the serve command
follow the 'hg serve'. For example, 'hg -R <repo> serve ..' is unsupported.
This leads to issues with chg running for the following tests:

 - test-bundle2-exchange.t
 - test-clone-uncompressed.t
 - test-hgweb-csp.t
 - test-http-bad-server.t
 - test-http-bundle1.t
 - test-http-protocol.t
 - test-http.t

There was an effort made earlier to fix this issue for chg and the tests were
fixed to confirm to the compatible pattern. But the new tests did not take care
of the same and hence, fail. Hopefully, there will be continuous build setup
for chg after all tests are made compatible with chg so that we can avoid such
issues.

Test Plan:
Ran the aforementioned tests with and without '--chg' option.

Differential Revision: https://phab.mercurial-scm.org/D946
2017-10-04 18:39:26 -07:00
Augie Fackler
ffcbb8d170 ui: convert to/from Optional[bytes] to Optional[str] in password manager
This password manager proxy is roughly the right-looking layer to
convert between strings and bytes. Many of these arguments can be
None, so we have a helper method to make the conversion preserve Nones
without exploding.

Differential Revision: https://phab.mercurial-scm.org/D886
2017-10-01 12:10:48 -04:00
Boris Feld
568bdc4e58 configitems: register the 'debug.dirstate.delaywrite' config 2017-06-30 03:37:05 +02:00
Boris Feld
4ec25dd5f8 configitems: register the 'merge.preferancestor' config 2017-06-30 03:43:13 +02:00
Boris Feld
a27db1fe3f configitems: register the 'email.from' config 2017-06-30 03:39:10 +02:00
Boris Feld
76fddb75bd configitems: register the 'smtp.port' config 2017-06-30 03:44:24 +02:00
Boris Feld
1e6c1ea742 configitems: register the 'phases.new-commit' config 2017-06-30 03:43:48 +02:00
Boris Feld
e2c066c1d2 configitems: register the 'experimental.histeditng' config 2017-06-30 03:41:23 +02:00
Boris Feld
c5961e53a9 configitems: register the 'experimental.histedit.autoverb' config 2017-06-30 03:41:19 +02:00
Boris Feld
3511ff1228 configitems: register the 'histedit.singletransaction' config 2017-06-30 03:42:40 +02:00
Boris Feld
232028d78c configitems: register the 'histedit.linelen' config 2017-06-30 03:42:39 +02:00
Boris Feld
320e358126 configitems: register the 'histedit.dropmissing' config 2017-06-30 03:42:38 +02:00
Boris Feld
c8792151c9 configitems: register the 'histedit.defaultrev' config 2017-06-30 03:42:37 +02:00
Boris Feld
d5b4ab79b8 configitems: register the 'transplant.log' config 2017-06-30 03:44:30 +02:00
Boris Feld
4c15dbe270 configitems: register the 'transplant.filter' config 2017-06-30 03:44:29 +02:00
Augie Fackler
271f9f69f9 urllibcompat: move some adapters from pycompat to urllibcompat
These are all the httpserver and urllib.* aliases. They seem to make
more sense in the slightly-more-specific urllibcompat package than the
general-purpose pycompat.

Differential Revision: https://phab.mercurial-scm.org/D935
2017-10-04 11:58:00 -04:00
Augie Fackler
321287c10b cleanup: use urllibcompat for renamed methods on urllib request objects
Differential Revision: https://phab.mercurial-scm.org/D891
2017-10-01 12:14:21 -04:00
Augie Fackler
4337c21943 urllibcompat: new library to help abstract out some python3 urllib2 stuff
Doing a new file instead of pycompat because I'm starting to feel like
pycompat is getting a little enormous in terms of scope.

Differential Revision: https://phab.mercurial-scm.org/D890
2017-10-01 10:45:03 -04:00
Saurabh Singh
93c6f3667f test-devel-warnings: make the test compatible with chg
The test fails when run with the "--chg" option. Therefore, this
commit makes it compatible with chg.

Test Plan:
Ran the test "test-devel-warnings.t' with and without the "--chg"
option

Differential Revision: https://phab.mercurial-scm.org/D915
2017-10-04 10:42:55 -07:00
Gregory Szorc
38e83867e1 fsmonitor: use configitem
We might as well get this out of the way.

Differential Revision: https://phab.mercurial-scm.org/D893
2017-10-01 22:26:24 +01:00
Gregory Szorc
e554f0b9a9 fsmonitor: access copymap in new location
fsmonitor has been busted since 00d68e462d1d due to moving
self._copymap. Fix it.

Differential Revision: https://phab.mercurial-scm.org/D892
2017-10-01 23:47:16 +01:00
Yuya Nishihara
41fead32d1 extdata: use subprocess so we don't have to chdir() manually 2017-10-01 12:12:56 +01:00
Yuya Nishihara
ccfb5e786c extdata: just use iterator to read lines one by one 2017-10-01 11:58:27 +01:00
Yuya Nishihara
810071518d extdata: ignore ambiguous identifier as well 2017-10-01 11:56:41 +01:00
Yuya Nishihara
a5c1e61fda templater: add experimental support for extdata
This is minimal and non-controversial implementation of extdata() template
function. Originally extdata sources were exposed to the keyword namespace,
but I've changed it to a plain function for simplicity.
2017-10-01 11:13:09 +01:00
Yuya Nishihara
235c46722f revset: add experimental support for extdata
This is minimal and non-controversial implementation of extdata() revset.
Originally extdata sources were exposed to the symbol namespace, but I've
changed it to a plain function for simplicity.
2017-10-01 10:50:00 +01:00
Matt Mackall
21e38b9770 extdata: add extdatasource reader
This adds basic support for extdata, a way to add external data
sources for revsets and templates. An extdata data source is simply a
list of lines of the form:

<revision identifier>[<space><freeform text>]\n

An extdata source is configured thusly:

[extdata]
name = <a url or path>

urls of the form shell: are launch shell commands to generate data.

This patch is slightly modified by Yuya Nishihara as follows:

 - fix typo
 - remove unused function
 - remove future expansion point for parameter (which can be added later
   as the extdata revset/template are experimental)

You can see the original patch at
https://www.mercurial-scm.org/pipermail/mercurial-devel/2016-September/088426.html
2016-09-13 14:14:05 -05:00
Denis Laxalde
ca0e3377b8 tests: change to parent directory before all "hg init" in test-log.t
Add a "cd .." before the second "hg init" so that all repositories are on top
level of test directory. Makes inspection of test directory easier.
2017-10-04 10:02:15 +02:00
Jun Wu
e296c0748d config: add a missing preparewrite() call
Thanks Yuya for pointing this out in D808.

Differential Revision: https://phab.mercurial-scm.org/D924
2017-10-03 12:00:07 -07:00
Saurabh Singh
ea7132319b test-strip: make test compatible with chg
The test was using reposetup which had the logic for stripping
commits. This leads to a situation where if the reposetup was called twice for
an extension (which can happen with chg running), the stripped node would not
be found the second time. Therefore, this commit changes the test to put the
stripping logic inside commands instead of the reposetup. This ensures that the
stripping logic is invoked only when the command is invoked and thus, avoids
any problems.

Test Plan:
Ran the test 'test-strip.t' with and without the '--chg' option.

Differential Revision: https://phab.mercurial-scm.org/D928
2017-10-03 16:59:17 -07:00
Saurabh Singh
fd92abf61e test-hook: make test compatible with chg
The test uses the 'print' method instead of writing to stdout using
'ui.write' which leads to incompatibility with chg. This commit modifies the
test to use 'ui' instead which fixes the problem.

Test Plan:
Ran the test 'test-hook.t' with and without '--chg' option.

Differential Revision: https://phab.mercurial-scm.org/D927
2017-10-03 14:35:24 -07:00
Saurabh Singh
15210308cf test-setdiscovery: make test compatible with chg
The test checks the output of the blackbox extension which will
contain logs corresponding to chg in case chg is running. Therefore, this
commit modifies the test to take chg into consideration while working with the
blackbox extension.

Test Plan:
Ran the test 'test-setdiscovery.t' with and without the '--chg'
option.

Differential Revision: https://phab.mercurial-scm.org/D926
2017-10-03 13:30:36 -07:00
Saurabh Singh
31fe1e97ae test-merge-subrepos: make test compatible with chg
The test checks the output of '.hg/blackbox.log' which will contain
logs corresponding to chg in case chg is running. Therefore, this commit
modifies the test to take chg into consideration while checking the
blackbox.log contents.

Test Plan:
Ran the test 'test-merge-subrepos.t' with and without the '--chg'
option.

Differential Revision: https://phab.mercurial-scm.org/D925
2017-10-03 13:05:58 -07:00
Saurabh Singh
8bb0e0f54f test-convert-cvs: make test compatible with chg
The test uses the 'print' method instead of writing to stdout using
'ui.write' which leads to incompatibility with chg. This commit modifies the
test to use the 'ui' object instead which fixes the problem.

Test Plan:
Ran the test 'test-convert-cvs.t' with and without '--chg' option.

Differential Revision: https://phab.mercurial-scm.org/D923
2017-10-03 12:49:28 -07:00
Saurabh Singh
04d7964be4 test-basic: make test compatible with chg
The error codes returned when writing to /dev/full are different after
the first failure with and without '--chg' option. Therefore, this commit
conditionally handles the error codes as appropriate.

Test Plan:
Ran the test 'test-basic.t' with and without '--chg' option.

Differential Revision: https://phab.mercurial-scm.org/D922
2017-10-03 12:09:23 -07:00
Jun Wu
02fcca0577 zeroconf: do not crash if socket being read is closed by another thread
In zeroconf/__init__.py, there is:

    server = Zeroconf.Zeroconf(ip)
    l = listener()
    Zeroconf.ServiceBrowser(server, "_hg._tcp.local.", l)
    time.sleep(1)
    server.close()

`server.close()` closes the underlying socket while the `ServiceBrowser` may
still have a background thread reading the socket. There could be a race
condition where the reading thread reads the closed socket, resulting in
EBADF crash. This patch catches the exception.

This makes test-paths.t pass with chg.

Differential Revision: https://phab.mercurial-scm.org/D919
2017-10-02 20:23:25 -07:00
Jun Wu
372ecf5929 test-revlog-mmapindex: make it compatible with chg
The test misses an explicit flush().

Differential Revision: https://phab.mercurial-scm.org/D918
2017-10-02 19:31:33 -07:00
Jun Wu
9dd2be2e99 test-profile: gate chg-incompatible part with '#if chg'
chg has a different extension loading logic, which affects the profiler
extension test case. Gate the block with '#if chg' so the test passes with
chg.

Differential Revision: https://phab.mercurial-scm.org/D916
2017-10-02 19:10:32 -07:00
Jun Wu
5c5bc340e6 test-logtoprocess: make it compatible with chg
chg runs more commands and outputs more lines. This patch matches them.

Differential Revision: https://phab.mercurial-scm.org/D914
2017-10-02 18:22:43 -07:00