Pierre-Yves David <pierre-yves.david@octobus.net> [Wed, 19 Jun 2019 05:46:07 +0200] rev 42507
test: factor out the "wait" logic in bookrace
The test is currently not testing the race it is supposed to test. The
synchronisation is still valid, but needs to run at a different point.
We start with extracting the synchronisation logic for clarity.
Pierre-Yves David <pierre-yves.david@octobus.net> [Wed, 19 Jun 2019 05:45:44 +0200] rev 42506
test: remove dead code in the bookrace extension
This code is the remain of a previous version of the code. It is never ran, so
we can remove it.
Pierre-Yves David <pierre-yves.david@octobus.net> [Wed, 19 Jun 2019 05:37:33 +0200] rev 42505
run-tests: stop matching line for missing feature
Before this change, the following unified test input would silently pass
$ echo foo
foo (false !)
After this change, the "foo" output is properly detected as unexpected.
The output of an handful of test had to be updated from broken conditional (that
ended up working by chance).
Martin von Zweigbergk <martinvonz@google.com> [Wed, 19 Jun 2019 10:19:32 -0700] rev 42504
log: pass getcopies() function instead of getrenamed() to displayer (API)
This reduces the duplication between the two displayer functions (and
between them and scmutil.getcopiesfn()). It's still more code than two
patches ago, but there's less duplication.
Differential Revision: https://phab.mercurial-scm.org/D6546
Martin von Zweigbergk <martinvonz@google.com> [Wed, 19 Jun 2019 09:59:45 -0700] rev 42503
copies: create helper for getting all copies for changeset
There are a few places where we get all the copies for a changeset (at
least the {file_copies} template and in two places in `hg log
--copies` code). These places currently call scmutil.getrenamedfn() to
get a caching "getrenamed" function. They all use it in a similar
way. We will be able to reuse more code by having a function for
getting all the copies for a changeset. This patch introduces such a
function. It uses it in the {file_copies} template to show that it
works. It relies on the existing scmutil.getrenamedfn() for caching in
the filelog-centric case.
Differential Revision: https://phab.mercurial-scm.org/D6545
Martin von Zweigbergk <martinvonz@google.com> [Tue, 18 Jun 2019 23:19:24 -0700] rev 42502
logcmdutil: also check for copies in null revision and working copy
It's safe (and fast) to look for copies in the null revision, and it's
incorrect not to look for them in the working copy, so let's look in
both places.
Differential Revision: https://phab.mercurial-scm.org/D6544
Martin von Zweigbergk <martinvonz@google.com> [Tue, 18 Jun 2019 23:23:30 -0700] rev 42501
tests: demonstrate missing copy information in working copy with graphlog
Differential Revision: https://phab.mercurial-scm.org/D6543
Martin von Zweigbergk <martinvonz@google.com> [Wed, 19 Jun 2019 10:33:13 -0700] rev 42500
remotefilelog: handle copies in changesets in getrenamedfn() override
E.g. the {file_copies} template keyword didn't work with copies in
changesets before this patch because remotefilelog overrides the
getrenamedfn() and didn't handle the changeset-centric case.
Differential Revision: https://phab.mercurial-scm.org/D6542
Martin von Zweigbergk <martinvonz@google.com> [Wed, 19 Jun 2019 11:12:06 -0700] rev 42499
remotefilelog: check if RFL is enabled in getrenamedfn() override
In
8a0e03f7baf4 (remotefilelog: move most setup from onetimesetup() to
uisetup(), 2019-05-01), I said:
All the wrappers moved in this patch check if remotefilelog is enabled
before they change behavior, so it's safe to always wrap.
That was clearly a lie, because getrenamedfn() didn't. That made
e.g. `hg log -T {file_copies}` unbearably slow. This patch fixes that.
Differential Revision: https://phab.mercurial-scm.org/D6541
Martin von Zweigbergk <martinvonz@google.com> [Tue, 18 Jun 2019 08:55:23 -0700] rev 42498
relnotes: document template support for `hg root`
Differential Revision: https://phab.mercurial-scm.org/D6540
Augie Fackler <augie@google.com> [Tue, 18 Jun 2019 09:57:06 -0400] rev 42497
remotefilelog: tell runbgcommand to not block on child process startup
These two invocations will always find a binary because they're
re-running hg. As a result, we can skip waiting for the subprocess to
start running and save a little bit of wall-time.
Differential Revision: https://phab.mercurial-scm.org/D6539
Augie Fackler <augie@google.com> [Tue, 18 Jun 2019 09:43:27 -0400] rev 42496
procutil: allow callers of runbgcommand to assume the process starts
Experimentally starting the subprocess can take as much as 40ms, and
for some of our use cases that's frivolous: we know the binary will
start, and if it doesn't we'd only ever ignore it and continue
anyway. This lets those use cases be faster.
Differential Revision: https://phab.mercurial-scm.org/D6537
Augie Fackler <augie@google.com> [Tue, 18 Jun 2019 09:58:01 -0400] rev 42495
shallowrepo: remove backwards compat code that predates in-tree remotefilelog
Differential Revision: https://phab.mercurial-scm.org/D6538
Sushil khanchi <sushilkhanchi97@gmail.com> [Tue, 16 Apr 2019 02:53:28 +0530] rev 42494
commit: make the error message more specific while aborting branch closing
Differential Revision: https://phab.mercurial-scm.org/D6493
Sushil khanchi <sushilkhanchi97@gmail.com> [Tue, 16 Apr 2019 02:33:54 +0530] rev 42493
commit: add a check if it is trying to close an already closed branch head
It would check if the revision we are going to close is already a
closed branch head and print the error message accordingly.
Differential Revision: https://phab.mercurial-scm.org/D6491
Martin von Zweigbergk <martinvonz@google.com> [Mon, 17 Jun 2019 10:53:00 -0700] rev 42492
strip: move checksubstate() to mq (its only caller)
Differential Revision: https://phab.mercurial-scm.org/D6536
Martin von Zweigbergk <martinvonz@google.com> [Mon, 17 Jun 2019 10:19:41 -0700] rev 42491
strip: use bailifchanged() instead of reimplementing it
This also means that we get the standard error messages (see changed
test cases).
Differential Revision: https://phab.mercurial-scm.org/D6535
Martin von Zweigbergk <martinvonz@google.com> [Mon, 17 Jun 2019 10:40:24 -0700] rev 42490
strip: remove unused excsuffix argument from checklocalchanges()
It was only used by mq, and mq now has its own copy of the function.
Differential Revision: https://phab.mercurial-scm.org/D6534
Martin von Zweigbergk <martinvonz@google.com> [Mon, 17 Jun 2019 10:38:50 -0700] rev 42489
mq: remove dependency on strip's checklocalchanges()
Some of the functionality in strip.checklocalchanges() was only used
by mq, so let's move it to mq so we can clean up strip.
Differential Revision: https://phab.mercurial-scm.org/D6533
Martin von Zweigbergk <martinvonz@google.com> [Thu, 02 May 2019 23:39:33 -0700] rev 42488
copies: avoid calling matcher if matcher.always()
When storing copy information in the changesets
(experimental.copies.read-from=changeset-only), this patch speeds up
hg debugpathcopies FENNEC_58_0_2_BUILD1 FIREFOX_59_0b8_BUILD2
from 5.9s to 4.7s. At the start of this series (
b162229e), that
command took 18min.
Differential Revision: https://phab.mercurial-scm.org/D6422
Martin von Zweigbergk <martinvonz@google.com> [Thu, 18 Apr 2019 21:21:44 -0700] rev 42487
copies: avoid unnecessary copying of copy dict
When storing copy information in the changesets, this patch speeds up
hg debugpathcopies FENNEC_58_0_2_BUILD1 FIREFOX_59_0b8_BUILD2
from 11s to 5.9s. That command takes 6.2s when storing copy
information in filelogs.
Differential Revision: https://phab.mercurial-scm.org/D6421
Martin von Zweigbergk <martinvonz@google.com> [Thu, 18 Apr 2019 21:22:14 -0700] rev 42486
copies: don't filter out copy targets created on other side of merge commit
If file X is copied to Y on one side of merge and the other side
creates Y (no copy), we would not mark that as copy. In the
changeset-centric pathcopies() version, that was done by checking if
the copy target existed on the other branch. Even though merge commits
are pretty uncommon, it still turned out to be too expensive to load
the manifest of the parents of merge commits. In a repo of
mozilla-unified converted to storing copies in changesets, about 2m30s
of `hg debugpathcopies FIREFOX_BETA_59_END FIREFOX_BETA_60_BASE` is
spent on this check of merge commits.
I tried to think of a way of storing more information in the
changesets in order to cheaply detect these cases, but I couldn't
think of a solution. So this patch simply removes those checks.
For reference, these extra copies are reported from the aforementioned
command after this patch:
browser/base/content/sanitize.js -> browser/modules/Sanitizer.jsm
testing/mozbase/mozprocess/tests/process_normal_finish_python.ini -> testing/mozbase/mozprocess/tests/process_normal_finish.ini
testing/mozbase/mozprocess/tests/process_waittimeout_python.ini -> testing/mozbase/mozprocess/tests/process_waittimeout.ini
testing/mozbase/mozprocess/tests/process_waittimeout_10s_python.ini -> testing/mozbase/mozprocess/tests/process_waittimeout_10s.ini
Since these copies were created on one side of some merge, it still
seems reasonable to include them, so I'm not even sure it's worse than
filelog pathcopies(), just different.
Differential Revision: https://phab.mercurial-scm.org/D6420
Martin von Zweigbergk <martinvonz@google.com> [Thu, 18 Apr 2019 00:40:53 -0700] rev 42485
copies: do full filtering at end of _changesetforwardcopies()
As mentioned earlier, pathcopies() is very slow when copies are stored
in the changeset. Most of the cost comes from calling _chain() for
every changeset, which is slow because it needs to read manifests. It
needs to read manifests to be able to filter out copies that are were
created in one commit and then deleted. (It also filters out copies
that were created from a file that didn't exist in the starting
revision, but that's a fixed revision across calls to _chain(), so
it's much cheaper.)
This patch changes from _chainandfilter() to just _chain() in the main
loop in _changesetforwardcopies(). It instead removes copies that have
subsequently been removed by using ctx.filesremoved(). We thus rely on
that to be fast.
It timed this command in mozilla-unified:
hg debugpathcopies FIREFOX_59_0b3_BUILD2 FIREFOX_BETA_59_END
It took 18s before and 1.1s after. It's still faster when copy
information is stored in filelogs: 0.70s. It also still gets slow when
there are merge commits involved, because we read manifests there
too. We'll deal with that later.
Differential Revision: https://phab.mercurial-scm.org/D6419
Yuya Nishihara <yuya@tcha.org> [Sat, 15 Jun 2019 10:58:53 +0900] rev 42484
rust-filepatterns: add comment about Windows path handling
As I replied to the Phabricator message, this is wrong. And I even suspect
it wouldn't compile because of multiple type mismatches.
I think, in Rust where type system is rock solid, we can live with UTF-8
strings except for the bottom storage layer and the top UI/command layer.
We'll still have to get around undecodable characters not to be lost, but
I think it's okay to drop such filenames from match result if they don't
match in UTF-8 world, not in Latin-1 world.