- Jul 31, 2017
-
-
Martin von Zweigbergk authored
Differential Revision: https://phab.mercurial-scm.org/D204
-
Martin von Zweigbergk authored
Differential Revision: https://phab.mercurial-scm.org/D203
-
Martin von Zweigbergk authored
The test for duplicate flag processors depended on the timestamps being set in the dirstate to work. If the time between the the previous failed commit (which would set the timestamp, due to bug 5645) and the attempted commit with the duplicate flag processors was small enough, it would fail. The failure was caused by a call to commands.status() early in the commit process. If the dirstate did not have the timestamp set, it would need to fetch the file content to compare with. Since two flag processors had been registered, it would attempted to base64 decode the contents twice, which would of course fail. This patch adds a "hg debugrebuilddirstate" to make it deterministic and also replaces the test case's "hg commit" by simply "hg status", since that will trigger reading of the contents and thereby use of the flag processors as noted above. Differential Revision: https://phab.mercurial-scm.org/D202
-
Martin von Zweigbergk authored
The flag processors test for duplicate processors for a single flag was misleading because the file from the previous test case caused it to fail (making the "echo 'this should fail' > file" part irrelevant). Let's remove the leftover from the previous test case to make it clear that duplicate flag processors results only in a warning. Note that duplicate flag processors would have resulted in a failure (not just a warning) until ea1c2eb7abd3 (extensions: catch uisetup and extsetup failures and don't let them break hg, 2017-06-06). I remember expressing my concern about ending up with half-loaded extensions. It would be pretty unfortunate to have double-encoded revlog content enter a repo, so maybe we should reconsider? Differential Revision: https://phab.mercurial-scm.org/D201
-
Katsunori FUJIWARA authored
Invocation of "diff tool.py" in test-extdiff.t tests whether shellquote() is applied on specified command as expected. But direct invocation of "*.py" file might cause unexpected result on Windows according to suffix binding. For example, starting IDE, showing dialog to choose program to be used, and so on. In such case, running test-extdiff.t is easily timed out. This patch uses intermediate *.bat file on Windows, to avoid such unexpected result. Naming that intermediate file as "diff tool.bat" is enough to test applying shellquote().
-
Katsunori FUJIWARA authored
"diff" command might cause redundant message, "No differences encountered" on Solaris for example. But suppressing option like "-q" isn't portable, because POSIX specification doesn't define it. pdiff script was introduced by b59ef0c21405 to stabilize output of standard diff command on each platforms.
-
Katsunori FUJIWARA authored
Before this patch, pdiff script returns 0, even if diff is detected. This issue doesn't cause failure of tests using it, if it is invoked via extdiff extension, because extdiff itself examines changes between specified revisions and decides exit code. BTW, this patch ignores recursive comparison case, because: - there is no portable way for current while-read based implementation to return 1 at detecting changes - it isn't yet needed to replace direct "diff -r" invocation by pdiff for portability
-
Martin von Zweigbergk authored
We had the first 3 tests in test-profile.t fail because the output didn't match. I have not yet confirmed that this was because no samples were collected, but we shouldn't require samples to be collected for the test to pass either way. Differential Revision: https://phab.mercurial-scm.org/D199
-
- Jul 27, 2017
-
-
Boris Feld authored
In Pypy 5.6.0, traceback exception classes are not displayed with their full qualified name. Instead of displaying mercurial.error.ProgrammingError, Pypy displays ProgrammingError. Update the test to support both version.
-
- Jul 31, 2017
-
-
Boris Feld authored
Pypy 5.6.0 saves cached bytecode files in __pycache__ directory, clean them in tests to fix loading old test extensions code. Doing so should also helps for Python3.x migration.
-
- Jul 30, 2017
-
-
Pulkit Goyal authored
Thanks to Yuya for catching this.
-
Sean Farley authored
This fixes the build process for ppa (at least in my simple check). Perhaps we should loop through all directory that aren't 'packages'?
-
- Jul 29, 2017
-
-
Gregory Szorc authored
statichttprepo inherits from localrepository. In doing so, it obtains default implementations of various methods, like wlock(). Before this change, tags cache writing would call repo.wlock(). This failed on statichttprepo due to localrepository's wlock() looking for an instance attribute that doesn't exist on statichttprepo (statichttprepo doesn't call localrepository.__init__). We /could/ define missing attributes until the base wlock() works. However, a statichttprepo is remote and read-only and can't be locked. The class already has a lock() that short circuits. So it makes sense to implement a short-circuited wlock() as well. That is what this patch does. LockError is expected to be raised when locking fails. The constructor takes a number of arguments that are local repository centric. Rather than rework LockError to not require them (which would not be appropriate for stable), this commit populates dummy values. I don't believe they'll ever be seen by the user, as lock failures on static http repos should be limited to well-defined (and tested) scenarios. We can and should revisit the LockError type to improve this.
-
Gregory Szorc authored
Mercurial currently fails to clone by revision on static http repos with tags. The added tests demonstrate this.
-
- Jul 28, 2017
-
-
Pulkit Goyal authored
-
- Jul 27, 2017
-
-
Jun Wu authored
This is a quick fix to make `hg phabread D189` work. It seems we might want to replace all `r''` to `u''`, and add more `encoding.*to*` to be more explicit when interacting with `json` module. Differential Revision: https://phab.mercurial-scm.org/D192
-
Yuya Nishihara authored
/usr/lib/python2.7/distutils/dist.py:267: UserWarning: Unknown distribution option: 'python_requires'
-
- Jul 20, 2017
-
-
Yuya Nishihara authored
Since these modules are implicitly imported by policy.importmod(), py2exe can't track them statically. cffi modules are excluded for now because they wouldn't be useful in frozen (i.e. CPython) environment.
-
Yuya Nishihara authored
Otherwise the subsequent hg.run() would fail. This factors out the filtering function so the same rule should apply.
-
- Jul 27, 2017
-
-
Mathias De Mare authored
Building in Docker when behind a proxy requires passing the proxy variables. Differential Revision: https://phab.mercurial-scm.org/D190
-
Mathias De Mare authored
Differential Revision: https://phab.mercurial-scm.org/D189
-
- Jul 25, 2017
-
-
Augie Fackler authored
The only version strings that are changed are the ones baked into the .pkg - hg's self-reported version string doesn't change, so users will still see our mostly-pip-compatible version strings. For reference, the part of our versioning setup that's not PEP440 compatible is the RC releases - those should be .rc0 insted of -rc. It's too late to change that for the 4.3 cycle, so I'll worry about fixing that during the 4.4 cycle.
-
Augie Fackler authored
If you're shipping prerelease or rc packages using Munki, you'll eventually discover that Munki's version comparison logic is not as good as pip's. In theory we should be able to fix Munki, but it seems entirely reasonable to produce version strings that sort reasonably under these conditions. Since the requried logic not brief, add a new script and some tests of that logic. A followup change will wire this into the Makefile.
-
Augie Fackler authored
Some more files are included these days.
-
- Jul 26, 2017
-
-
Augie Fackler authored
I don't like the color output, so this gives me a way to easily never see it while still having pygments on my machine.
-
Augie Fackler authored
My intent was to only allow Python 3 if the right environment variable is set (for when people want to use `pip install .` on hg locally). This fixes the bug in my previous change. I verified that `python3.6 run-tests.py` still passes the tests that passed before, and that all tests pass on 2.7 (including our virtualenv-using installation test). Differential Revision: https://phab.mercurial-scm.org/D185
-
- Jul 25, 2017
-
-
Jun Wu authored
When rebasing a changeset X and that changeset becomes empty, we should move the bookmark on X to rebase destination. This is a regression caused by the scmutil.cleanupnodes refactoring for rebase. The `adjustdest` function calculates the destination of bookmark movement. It was back-ported from https://phab.mercurial-scm.org/D21. It might be slightly more powerful than the minimal requirement to solve this issue. For example, it's impossible for a merge changeset to become empty while any of its ancestors does not become empty, but the code could handle that case. Since the code is reasonably short and clean, and helps the upcoming D21 series, I'd like to check-in `adjustdest` now. Thanks Martin von Zweigbergk for spotting corner cases (-k and descendant with bookmarks) in this area!
-
- Jul 26, 2017
-
-
Yuya Nishihara authored
Otherwise friendly error wouldn't be displayed.
-
- Jul 21, 2017
-
-
Augie Fackler authored
Modern pip can detect supported Python versions (which we now declare), and pull down a reasonable release. This trick was suggested in http://bit.ly/pycon2017-build-bridges, and seems like a good defensive maneuver so that when we want to move to Python 3 it's less risky for existing users. This moves the version-check logic after defining our printf function so we can print more informative messages.
-
Augie Fackler authored
I think we should probably backport this to 4.2 as well, and do one more release there that explicitly declares 2.6 support. That way anyone stuck on Python 2.6 will end up getting the right hg if they use a modern pip to install. Users can still use `python setup.py` incantations to attempt installing Mercurial on unsupported Pythons, including 3.5 and 3.6. A followup change will switch to only doing our own Python-version-check logic if we're not being installed by a reasonable pip.
-
- Jul 24, 2017
-
-
Augie Fackler authored
439b4d005b4a introduced a use of 'hg revert --no-backup' which is currently broken. Rather than try and do a fix on the (complicated) revert code during the freeze, let's just give up on this test under Python 3 until later. Once we do fix things, the test ratchet script will re-enable it.
-
Augie Fackler authored
Fixes configbytes on Python 3.
-
Augie Fackler authored
-
- Jul 21, 2017
-
-
Alex Gaynor authored
Test Plan: I uploaded this revision with `arc diff` Differential Revision: https://phab.mercurial-scm.org/D171
-
- Jul 19, 2017
-
-
Martin von Zweigbergk authored
When we changed basematcher.visitdir() in cf15c3cc304c (match: make base matcher return True for visitdir, 2017-07-14), we forgot to add an override in nevermatcher. This led to tests failing in narrowhg. As Durham pointed out, it's high time to add unit tests for the matcher, so this patch also adds a first unit test. Differential Revision: https://phab.mercurial-scm.org/D151
-
- Jul 21, 2017
-
-
Steve Borho authored
-
Jun Wu authored
This speeds up run-tests.py diff output by 10x, which affects developer experience significantly. As demonstrated by the following test: ``` #require pygments $ for i in `seq 1 200`; do > echo ' $ echo '$i >> test-a.t > echo ' wrong' >> test-a.t > done $ cat > walltime.py <<EOF > from __future__ import absolute_import, print_function > import os, sys, time > t1 = time.time() > os.system(' '.join(sys.argv[1:]) + ' >/dev/null 2>/dev/null') > t2 = time.time() > print('%0.2f' % (t2 - t1)) > EOF $ $PYTHON walltime.py $TESTDIR/run-tests.py -l --color=never $TESTTMP/test-a.t 0.24 Before this patch: $ $PYTHON walltime.py $TESTDIR/run-tests.py -l --color=always $TESTTMP/test-a.t 2.46 After this patch: $ $PYTHON walltime.py $TESTDIR/run-tests.py -l --color=always $TESTTMP/test-a.t 0.25 ```
-
- Jul 19, 2017
-
-
Augie Fackler authored
-
Augie Fackler authored
-
- Jul 21, 2017
-
-
Siddharth Agarwal authored
See the explanation for more. Differential Revision: https://phab.mercurial-scm.org/D153
-