Wed, 20 Feb 2019 11:49:06 +0100 changelog: prefilter in headrevs()
Georges Racinet <georges.racinet@octobus.net> [Wed, 20 Feb 2019 11:49:06 +0100] rev 41763
changelog: prefilter in headrevs() In case where headrevs() is called on some revisions, we perform the check that aren't filtered in advance, and switch revlog to use its unchecked form. This allows to work with alternative implementations that don't have knowledge of the filtering system, such as the Rust one.
Thu, 21 Feb 2019 11:23:10 +0100 tests: fixed test too dependent on actual exception wording
Georges Racinet <gracinet@anybox.fr> [Thu, 21 Feb 2019 11:23:10 +0100] rev 41762
tests: fixed test too dependent on actual exception wording On one of the machines I use to run the tests prior to submission, the default Python is 2.7.5, with the following wording: must be encoded string without NULL bytes, not str This third form (and possible future ones) are motivation to use a wider catching regexp.
Sun, 13 Jan 2019 20:27:00 -0500 contrib: enforce wrapping too-long lines with () instead of \
Augie Fackler <augie@google.com> [Sun, 13 Jan 2019 20:27:00 -0500] rev 41761
contrib: enforce wrapping too-long lines with () instead of \ This is the style I prefer, and an anecdotal exploration of styles recommended in style guides etc. Further, to quote pep8: > The preferred way of wrapping long lines is by using Python's implied > line continuation inside parentheses, brackets and braces. Long lines > can be broken over multiple lines by wrapping expressions in > parentheses. These should be used in preference to using a backslash > for line continuation. So I think this is a virtuous change. Differential Revision: https://phab.mercurial-scm.org/D5995
Wed, 20 Feb 2019 18:02:28 -0500 cleanup: prefer nested context managers to \-continuations
Augie Fackler <augie@google.com> [Wed, 20 Feb 2019 18:02:28 -0500] rev 41760
cleanup: prefer nested context managers to \-continuations I'd prefer Python accept a tuple of context managers, but alas it isn't meant to be. This will have to suffice. Differential Revision: https://phab.mercurial-scm.org/D5994
Wed, 20 Feb 2019 19:28:51 -0500 cleanup: use () to wrap long lines instead of \
Augie Fackler <augie@google.com> [Wed, 20 Feb 2019 19:28:51 -0500] rev 41759
cleanup: use () to wrap long lines instead of \ This is a little less brittle, and often helps indentation. In a surprising number of cases the entire cleanup was deleting the \, as the expression was *already* parenthesized in a workable way. Differential Revision: https://phab.mercurial-scm.org/D5993
Sun, 13 Jan 2019 20:13:22 -0500 tests: use () instead of \ to wrap lines
Augie Fackler <augie@google.com> [Sun, 13 Jan 2019 20:13:22 -0500] rev 41758
tests: use () instead of \ to wrap lines This should auto-format more consistently, and is slightly more typical Python. Differential Revision: https://phab.mercurial-scm.org/D5992
Wed, 20 Feb 2019 20:49:41 -0800 merge with stable
Martin von Zweigbergk <martinvonz@google.com> [Wed, 20 Feb 2019 20:49:41 -0800] rev 41757
merge with stable
Tue, 19 Feb 2019 15:42:45 -0800 copies: do copy tracing based on ctx.p[12]copies() if configured
Martin von Zweigbergk <martinvonz@google.com> [Tue, 19 Feb 2019 15:42:45 -0800] rev 41756
copies: do copy tracing based on ctx.p[12]copies() if configured This adds an option to do copy tracing in a changeset-optimized way. If the metadata is stored in filelogs, this is obviously going to be suboptimal. The point is that it provides a way of transitioning to changeset-stored metadata. Some of the tests behave a little differently, but they all seem resonable to me. The config option may very well be renamed later when it's clearer what options we want and how they will behave. When the test suite is run with --extra-config-opt to use the new copy tracing, all tests pass, besides test-copies.t (which fails in the same way as you can see in this patch). `hg debugpathcopies 4.0 4.8` reports 82 copies. With this option enabled, the only difference is this: -mercurial/pure/bdiff.py -> mercurial/cffi/bdiff.py +setup_bdiff_cffi.py -> mercurial/cffi/bdiff.py I believe that happened because it was renamed in different ways on different sides of a merge and the new algorithm arbitrarily prefers copies that happened on p1. The runtime is about 0.85 seconds with the old copy tracing and 5.7 seconds with the new copy tracing. That's kind of slow, but actually better than I had expected. Differential Revision: https://phab.mercurial-scm.org/D5991
Fri, 18 Jan 2019 13:13:30 -0800 context: introduce p[12]copies() methods and debugp[12]copies commands
Martin von Zweigbergk <martinvonz@google.com> [Fri, 18 Jan 2019 13:13:30 -0800] rev 41755
context: introduce p[12]copies() methods and debugp[12]copies commands As mentioned earlier, I'm working on support for storing copy metadata in the changeset instead of in the filelog. In order to transition a repo from storing metadata in filelogs to storing it in the changeset, I'm going to provide a config option for reading the metadata from the changeset, but falling back to getting it from the filelog if it's not in the changeset. In this compatiblity mode, the changeset-optmized algorithms will be used. We will then need to convert the filelog copy metadata to look like that provided by changeset copy metadata. This patch introduces methods that do just that. By having these methods here, we can start writing changeset-optimized algorithms that should work already before we add any support for storing the metadata in the changesets. This commit also includes new debugp[12]copies commands and exercises them in test-copies.t. Differential Revision: https://phab.mercurial-scm.org/D5990
Thu, 14 Feb 2019 22:46:18 -0800 copies: filter out copies when target is not in destination manifest
Martin von Zweigbergk <martinvonz@google.com> [Thu, 14 Feb 2019 22:46:18 -0800] rev 41754
copies: filter out copies when target is not in destination manifest When chaining a series of commits that copied a file with a series that removed the destination file, we would still include the copy in the result. Similar to the previous patch, I have checked that `hg status --copies` is not affected by this bug, but I wouldn't be surprised if some commands are. Differential Revision: https://phab.mercurial-scm.org/D5989
Tue, 19 Feb 2019 10:45:22 -0800 copies: make _backwardrenames() filter out copies by destination
Martin von Zweigbergk <martinvonz@google.com> [Tue, 19 Feb 2019 10:45:22 -0800] rev 41753
copies: make _backwardrenames() filter out copies by destination As shown by the test case, _backwardrenames() doesn't filter by the matcher. It doesn't show up in `hg status --copies` because that only prints files changed between the two commits. I wouldn't be surprised if some other command that replies on pathcopies() was broken before this patch, but I haven't bothered to check other commands. Differential Revision: https://phab.mercurial-scm.org/D5988
Tue, 19 Feb 2019 10:31:06 -0800 copies: respect narrowmatcher in "parent -> working dir" case
Martin von Zweigbergk <martinvonz@google.com> [Tue, 19 Feb 2019 10:31:06 -0800] rev 41752
copies: respect narrowmatcher in "parent -> working dir" case I don't know when this case happens and we don't seem to have tests for it, but let's fix it anyway since I happened to notice it. Differential Revision: https://phab.mercurial-scm.org/D5987
Wed, 20 Feb 2019 15:39:01 -0800 tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com> [Wed, 20 Feb 2019 15:39:01 -0800] rev 41751
tests: add tests of pathcopies() I'm working on support for storing copy metadata in the changeset instead of in the filelog. When storing it in the changeset, it will obviously be efficient to get the copy metadata for all files in a single changeset, but it will be more expensive to get the copy metadata all revisions of a single file. Some algorithms will then need to be optimized differently. The first method I'm going to rewrite is pathcopies(). This commit adds many tests for pathcopies(), so we can run the tests with both old and new versions of the code, as well as with metadata stored in filelog or in changeset (later). They use the debugpathcopies command I recently added (with no tests when it was added). They show a few bugs and few cases of slightly weird behavior. I'll fix the bugs in the next few commits. Differential Revision: https://phab.mercurial-scm.org/D5986
Fri, 15 Feb 2019 10:39:45 -0800 uncommit: add config option to keep commit by default
Martin von Zweigbergk <martinvonz@google.com> [Fri, 15 Feb 2019 10:39:45 -0800] rev 41750
uncommit: add config option to keep commit by default We have a Google-internal extension that keeps track of "review units" (like Phabricator reviews, or Gerrit's Change-Id). This information is stored outside of the commit. It is updated with rewrites. Every now and then we get reports from users who are confused because `hg uncommit` lost track of their review. Keeping the empty commit by default would reduce this confusion. It may also cause confusion about the empty commit. This patch adds a config option that lets us easily test both behaviors on our users. Differential Revision: https://phab.mercurial-scm.org/D5970
Thu, 14 Feb 2019 15:17:54 -0800 debugpathcopies: sort output so it's deterministic
Martin von Zweigbergk <martinvonz@google.com> [Thu, 14 Feb 2019 15:17:54 -0800] rev 41749
debugpathcopies: sort output so it's deterministic Differential Revision: https://phab.mercurial-scm.org/D5983
Sun, 17 Feb 2019 09:12:30 -0800 subrepo: use root-repo-relative path from `hg files` with ui.relative-paths=no
Martin von Zweigbergk <martinvonz@google.com> [Sun, 17 Feb 2019 09:12:30 -0800] rev 41748
subrepo: use root-repo-relative path from `hg files` with ui.relative-paths=no The fix is to pass in a "subuipathfn" as we do everywhere else. Differential Revision: https://phab.mercurial-scm.org/D5978
Sun, 17 Feb 2019 09:05:28 -0800 subrepo: demonstrate broken `hg files` with ui.relative-paths=no
Martin von Zweigbergk <martinvonz@google.com> [Sun, 17 Feb 2019 09:05:28 -0800] rev 41747
subrepo: demonstrate broken `hg files` with ui.relative-paths=no Differential Revision: https://phab.mercurial-scm.org/D5977
Mon, 18 Feb 2019 03:39:47 +0530 py3: whitelist 5 new passing tests caught by buildbot
Pulkit Goyal <pulkit@yandex-team.ru> [Mon, 18 Feb 2019 03:39:47 +0530] rev 41746
py3: whitelist 5 new passing tests caught by buildbot Thanks to indygreg and durin42 recent patches. Differential Revision: https://phab.mercurial-scm.org/D5979
Fri, 15 Feb 2019 10:49:12 -0800 uncommit: inform user if the commit is empty after uncommit
Martin von Zweigbergk <martinvonz@google.com> [Fri, 15 Feb 2019 10:49:12 -0800] rev 41745
uncommit: inform user if the commit is empty after uncommit Differential Revision: https://phab.mercurial-scm.org/D5969
Thu, 14 Feb 2019 15:35:47 +0100 test: stabilize test-run-tests.t output
Boris Feld <boris.feld@octobus.net> [Thu, 14 Feb 2019 15:35:47 +0100] rev 41744
test: stabilize test-run-tests.t output We have reached a point where the duration in JSON reports of `test-run-tests.t` were greater or equal than 10 seconds, which doesn't match anymore the regex. For example here: https://ci.octobus.net/blue/organizations/jenkins/MercurialPy2/detail/MercurialPy2/276/pipeline ``` "diff": "", ? (re) - "end": "\s*[\d\.]{4,5}", ? (re) + "end": "10.040", "result": "skip", ? (re) ``` Instead of accepting more characters, I changed the regex to accept any number of digits before the `.` then 3 or 4 digits after. This way the regex is more precise (only one `.` is authorized and we can ensure that the precision doesn't change). Differential Revision: https://phab.mercurial-scm.org/D5966
Thu, 14 Feb 2019 14:36:16 +0100 test: stabilize test-remotefilelog-bgprefetch.t flaky output
Boris Feld <boris.feld@octobus.net> [Thu, 14 Feb 2019 14:36:16 +0100] rev 41743
test: stabilize test-remotefilelog-bgprefetch.t flaky output When running the test suite with multiple processes, we often get flaky outputs, like here: https://ci.octobus.net/job/MercurialPy2/274/console ``` - $TESTTMP/hgcache/master/packs/8f1443d44e57fec96f72fb2412e01d2818767ef2.histidx - $TESTTMP/hgcache/master/packs/8f1443d44e57fec96f72fb2412e01d2818767ef2.histpack - $TESTTMP/hgcache/master/packs/f4d50848e0b465e9bfd2875f213044c06cfd7407.dataidx - $TESTTMP/hgcache/master/packs/f4d50848e0b465e9bfd2875f213044c06cfd7407.datapack + $TESTTMP/hgcache/master/11/f6ad8ec52a2984abaafd7c3b516503785c2072/1406e74118627694268417491f018a4a883152f0 + $TESTTMP/hgcache/master/11/f6ad8ec52a2984abaafd7c3b516503785c2072/ef95c5376f34698742fe34f315fd82136f8f68c0 + $TESTTMP/hgcache/master/39/5df8f7c51f007019cb30201c49e884b46b92fa/69a1b67522704ec122181c0890bd16e9d3e7516a + $TESTTMP/hgcache/master/95/cb0bfd2977c761298d9624e4b4d4c72a39974a/076f5e2225b3ff0400b98c92aa6cdf403ee24cca + $TESTTMP/hgcache/master/af/f024fe4ab0fece4091de044c58c9ae4233383a/bb6ccd5dceaa5e9dc220e0dad65e051b94f69a2c ``` Add some sleeps after `debugwaitonrepack` calls as it seems it needs some extra time to cleanup. Differential Revision: https://phab.mercurial-scm.org/D5960
Tue, 19 Feb 2019 21:55:05 -0800 merge with stable
Martin von Zweigbergk <martinvonz@google.com> [Tue, 19 Feb 2019 21:55:05 -0800] rev 41742
merge with stable
Fri, 15 Feb 2019 15:49:17 -0500 color: change color of grep.rev label (BC)
Jordi Gutiérrez Hermoso <jordigh@octave.org> [Fri, 15 Feb 2019 15:49:17 -0500] rev 41741
color: change color of grep.rev label (BC) GNU grep uses green for line numbers as we do, but I sometimes get a bit confused when I do `hg grep --diff -n` and get both line numbers and revisions and don't know which one is which. A different colour can help.
Fri, 15 Feb 2019 15:43:22 -0500 color: give colours to the grep.inserted and grep.deleted labels
Jordi Gutiérrez Hermoso <jordigh@octave.org> [Fri, 15 Feb 2019 15:43:22 -0500] rev 41740
color: give colours to the grep.inserted and grep.deleted labels I find the "bold" makes it stand out a bit more when the green is next to the line number. Note that these labels are applied before the grep.change label, which is now disabled. To get the old colour, users can restore [color] grep.change = green dim to their hgrc.
Fri, 15 Feb 2019 15:24:04 -0500 grep: give different labels to + and - symbols
Jordi Gutiérrez Hermoso <jordigh@octave.org> [Fri, 15 Feb 2019 15:24:04 -0500] rev 41739
grep: give different labels to + and - symbols I find it more useful to give different colours to plus and minus, but it's difficult to do so if the default output uses the same label for both. The following augments the names of columns with some extra labels, akin to the diff.inserted and diff.deleted labels for the diff command. This is done by adding an extra label field to the columns tuples.
Mon, 18 Feb 2019 00:27:25 +0900 tests: bulk changes to avoid whitespace errors of check-code.py
FUJIWARA Katsunori <foozy@lares.dti.ne.jp> [Mon, 18 Feb 2019 00:27:25 +0900] rev 41738
tests: bulk changes to avoid whitespace errors of check-code.py This is a part of preparation to apply checking with check-code.py on code fragments embedded in *.t test scripts. This revision avoids "whitespace" errors of check-code.py below: - missing whitespace after "," - missing whitespace in expression - no whitespace around "=" for named parameters - wrong whitespace around "="
Mon, 18 Feb 2019 00:27:25 +0900 tests: replace "naked except clause" to avoid check-code.py error
FUJIWARA Katsunori <foozy@lares.dti.ne.jp> [Mon, 18 Feb 2019 00:27:25 +0900] rev 41737
tests: replace "naked except clause" to avoid check-code.py error This is a part of preparation to apply checking with check-code.py on code fragments embedded in *.t test scripts.
Mon, 18 Feb 2019 00:27:25 +0900 tests: bulk changes to avoid "omit superfluous pass" check-code.py error
FUJIWARA Katsunori <foozy@lares.dti.ne.jp> [Mon, 18 Feb 2019 00:27:25 +0900] rev 41736
tests: bulk changes to avoid "omit superfluous pass" check-code.py error This is a part of preparation to apply checking with check-code.py on code fragments embedded in *.t test scripts.
Mon, 18 Feb 2019 00:27:25 +0900 tests: replace imported module to avoid check-code.py error
FUJIWARA Katsunori <foozy@lares.dti.ne.jp> [Mon, 18 Feb 2019 00:27:25 +0900] rev 41735
tests: replace imported module to avoid check-code.py error This is a part of preparation to apply checking with check-code.py on code fragments embedded in *.t test scripts.
Mon, 18 Feb 2019 00:27:25 +0900 tests: bulk change to avoid "unneeded trailing ',' ..." error of check-code.py
FUJIWARA Katsunori <foozy@lares.dti.ne.jp> [Mon, 18 Feb 2019 00:27:25 +0900] rev 41734
tests: bulk change to avoid "unneeded trailing ',' ..." error of check-code.py This is a part of preparation to apply checking with check-code.py on code fragments embedded in *.t test scripts. "trailing ','" at the end of command option list in the code fragment of test-bundle2-format.t is still left as it is, in order to follow the style of command definitions in Mercurial core.
(0) -30000 -10000 -3000 -1000 -300 -100 -50 -30 +30 +50 +100 +300 +1000 +3000 +10000 tip