Georges Racinet <georges.racinet@octobus.net> [Mon, 14 Jan 2019 20:42:25 +0100] rev 41241
rust: factorized testing Graphs
it will useful to use these outside of `ancestors`, too.
Differential Revision: https://phab.mercurial-scm.org/D5579
Georges Racinet <georges.racinet@octobus.net> [Sat, 12 Jan 2019 16:57:04 +0100] rev 41240
rust-cpython: moved generic conversion fn out of ancestors module
This will allow to use it easily from other submodules
Differential Revision: https://phab.mercurial-scm.org/D5578
Boris Feld <boris.feld@octobus.net> [Tue, 15 Jan 2019 20:24:17 +0100] rev 41239
revset: transparently forward _intlist argument in all case
We took a safe approach for the first take, we can get bolder now.
Martin von Zweigbergk <martinvonz@google.com> [Sun, 30 Dec 2018 00:15:38 -0800] rev 41238
narrow: reuse narrowspec.updateworkingcopy() when narrowing
Similar to the previous patch for widening, but here we also need to
teach updateworkingcopy() to forcefully delete files that are not
recorded in the dirstate as clean. That should be safe because the
narrowing command (e.g. `hg tracked --removeinclude`) has already
checked that the working copy is clean.
Differential Revision: https://phab.mercurial-scm.org/D5511
Martin von Zweigbergk <martinvonz@google.com> [Fri, 21 Dec 2018 10:05:37 -0800] rev 41237
narrow: reuse narrowspec.updateworkingcopy() when widening
The widening of the working copy we do after widening a repo is
practically the same as we do in a repo share after the store
narrowspec has been changed in a different share. Let's reuse the code
for that that we now have in the narrowspec module.
Differential Revision: https://phab.mercurial-scm.org/D5510
Martin von Zweigbergk <martinvonz@google.com> [Sat, 29 Dec 2018 23:40:18 -0800] rev 41236
narrow: move copytonarrowspec() out of setnarrowpats()
I think it was a mistake to write the working copy's narrowspec every
time the store narrowspec is written. This starts separating those
actions.
Differential Revision: https://phab.mercurial-scm.org/D5509
Martin von Zweigbergk <martinvonz@google.com> [Sat, 29 Dec 2018 23:09:07 -0800] rev 41235
narrow: drop now-unnecessary reassignment of repo attributes
Differential Revision: https://phab.mercurial-scm.org/D5507
Mathias De Mare <mathias.de_mare@nokia.com> [Fri, 11 Jan 2019 14:55:31 +0100] rev 41234
packaging: allow running packaging with custom uid+gid for CentOS
rpmbuild in CentOS 7 has a bug causing rpmbuild to fail
with "Bad owner/group" if spec or source files are owned
by a different user: https://github.com/rpm-software-management/rpm/issues/2
This makes it very annoying to try and build the CentOS RPMs
on CentOS with Docker.
As an alternative, this change makes it possible to do so,
using an environment variable.
Differential Revision: https://phab.mercurial-scm.org/D5571
Mathias De Mare <mathias.de_mare@nokia.com> [Fri, 11 Jan 2019 13:14:25 +0100] rev 41233
hg-docker: fix Python 3.4 compatibility (for CentOS 7)
I realize Mercurial is not targetting Python 3.4 compatibility,
but without this change, it's not even possible to build it on
CentOS 7 (and I assume the same is true for RHEL 7).
Differential Revision: https://phab.mercurial-scm.org/D5570
Martin von Zweigbergk <martinvonz@google.com> [Tue, 15 Jan 2019 11:07:34 -0800] rev 41232
copies: use node.nullrev instead of literal -1
Differential Revision: https://phab.mercurial-scm.org/D5593
Martin von Zweigbergk <martinvonz@google.com> [Tue, 15 Jan 2019 09:20:47 -0800] rev 41231
copies: use node.wdirrev instead of inventing another constant for it
Differential Revision: https://phab.mercurial-scm.org/D5592
Martin von Zweigbergk <martinvonz@google.com> [Sat, 29 Dec 2018 23:35:05 -0800] rev 41230
narrow: extract repo property for store narrowmatcher
When a repo lock is released, we try to persist the manifest
cache. That involves getting the narrowmatcher for the
manifestlog. That should not fail if the store and working copy
narrowspecs are out of sync. Without this patch, the later patches in
this series will fail because of that.
Differential Revision: https://phab.mercurial-scm.org/D5508
Martin von Zweigbergk <martinvonz@google.com> [Sat, 29 Dec 2018 23:01:12 -0800] rev 41229
narrow: copy store narrowspec to working copy immediately
We no longer need to delay it until the end of the transaction since
we now restore a backup if the transaction aborts.
Differential Revision: https://phab.mercurial-scm.org/D5506
Martin von Zweigbergk <martinvonz@google.com> [Sat, 29 Dec 2018 22:34:38 -0800] rev 41228
narrow: include working copy narrowspec in transaction journal
Now that we have separate narrowspecs for the store and the working
copy, we need to include both in the transaction journal.
Differential Revision: https://phab.mercurial-scm.org/D5505
Martin von Zweigbergk <martinvonz@google.com> [Sat, 29 Dec 2018 22:27:39 -0800] rev 41227
narrow: make dirstateguard back up and restore working copy narrowspec instead
We used to have only one narrowspec for the store and the working
copy, but now that we have one narrowspec for each, it seems clear
that the dirstateguard was supposed to back up and restore the
narrowspec associated with the working copy, not the one associated
with the store.
clearbackup() (for the store narrowspec) is not needed because the
presence of the file in localrepository._journalfiles() takes care of
that.
Differential Revision: https://phab.mercurial-scm.org/D5504
Martin von Zweigbergk <martinvonz@google.com> [Thu, 10 Jan 2019 13:36:25 -0800] rev 41226
narrow: include journal.narrowspec in transaction journal
We had missed this file before, which led to it lying around after the
transaction completed.
Differential Revision: https://phab.mercurial-scm.org/D5556
Martin von Zweigbergk <martinvonz@google.com> [Tue, 08 Jan 2019 09:50:40 -0800] rev 41225
progress: deprecate ui.progress()
It is now just a weird wrapper for ui.makeprogress().
Differential Revision: https://phab.mercurial-scm.org/D5531
Kyle Lippincott <spectral@google.com> [Tue, 15 Jan 2019 15:43:00 -0800] rev 41224
context: use scmutil.matchfiles instead of matchmod.match(exact=True)
Differential Revision: https://phab.mercurial-scm.org/D5591
Augie Fackler <augie@google.com> [Mon, 14 Jan 2019 22:19:43 -0500] rev 41223
histedit: fix call to _getgoal() by adding a byteskwargs() wrapper
I also added some b-prefixes while I was here because I got confused
and it seems silly to not just add them since it clarifies the whole
change.
Differential Revision: https://phab.mercurial-scm.org/D5585
Boris Feld <boris.feld@octobus.net> [Fri, 04 Jan 2019 13:41:21 +0100] rev 41222
revset: introduce an API that avoids `formatspec` input serialization
Instead of having the data fully serialized, the input can be directly inserted
in the tree at a later stage.
Just using it for simple "%ld" case provide a significant boost. For example
here are the impact on a sample discovery run between two pypy repositories
with arbitrary differences (using hg perfdiscovery).
$ hg perfdiscovery
before: ! wall 0.700435 comb 0.710000 user 0.700000 sys 0.010000 (median of 15)
after: ! wall 0.501305 comb 0.510000 user 0.490000 sys 0.020000 (median of 20)
Boris Feld <boris.feld@octobus.net> [Fri, 04 Jan 2019 05:26:13 +0100] rev 41221
revset: detect integer list on parsing
Right now, using "%ld" with `repo.revs("…%ld…", somerevs)` is very
inefficient, all items in `somerevs` will be serialized to ascii and then
reparsed as integers. If `somerevs` contains just an handful of entry this is
fine, however, when you get to thousands or hundreds of thousands of revisions
this becomes very slow.
To avoid this serialization we need to first detect this situation. The code
involved in the whole process is quite complex so we start simple and focus on
some "simple" but widespread cases.
So far we only detect the situation and don't do anything special about it.
The singled out will be serialized in `formatspec` in the same way as before.
Boris Feld <boris.feld@octobus.net> [Fri, 04 Jan 2019 05:16:57 +0100] rev 41220
revert: extract "%ld" formatting in a _formatintlist function
We'll have to reuse this logic in different places.
Boris Feld <boris.feld@octobus.net> [Fri, 04 Jan 2019 02:29:04 +0100] rev 41219
revset: extract parsing logic out of formatspec
We want to be able to perform better handling of some input when running
revset (eg: `repo.revs("%ld", somerevs)`). The first step is to be able to
access some of the parsed content before it gets substituted. There are many
possible different substitutions, we'll add support for them gradually.
In this changeset we support none, we just split some logic in a sub function
as a preparatory step.
Boris Feld <boris.feld@octobus.net> [Thu, 10 Jan 2019 15:23:58 +0100] rev 41218
revset: enforce "%d" to be interpreted as literal revision number (API) (BC)
Before this change, `formatspec("%d", x)` results in `"%d" % int(x)`. This
seems simple and correct until you consider `nullrev`. In revset, a direct
"-1" symbol is equivalent to `tip` not `nullrev`. This is a subtle error that
went undetected for a while. Wrapping the revision number inside 'rev()'
remove the ambiguity, preserving nullrev value passed to formatspec.
It got caught by the rebase code, were the following wrongly returned `[1]`:
repo.revs("children(%d) and ancestors(%ld)", 0, [nullrev])
This is flagged as API, because `%d` can be used for non-revision integer
argument of revset function. We probably need to introduce a new '%…'
substitution to allow literal integer (maybe `%i`). However, the `%d` usage is
currently widespread for revision number so it is important to fix this issue
for `%d`. This choice is reinforced by the fact _intlist is implemented as
revisions only. Restricting `%d` to revision only makes things more
consistent.
This bug can become especially tricky since `_intlist` recognize `nullrev`
right. So `revs('%ld', [-1, 0])` → select `[nullrev, 0]` but `revs('%ld',
[-1])` is simplified and treated as `%d` selecting `[tip]`.
Another side effect is that "%d" of an unknown revision simply match nothing. It
was previously raising and error. This is consistent with what "%ld" (and
`_intlist`) is doing, so it seems like a good move.