Boris Feld <boris.feld@octobus.net> [Fri, 27 Oct 2017 18:19:07 +0200] rev 34932
internal-doc: document the config register mechanism
This explains the various usage and feature of the config register introduced
in Mercurial 4.3 and 4.4.
Boris Feld <boris.feld@octobus.net> [Fri, 27 Oct 2017 21:43:22 +0200] rev 34931
help: clarify the pre-txnclose-phase documentation
Gregory Szorc requested some clarification.
Boris Feld <boris.feld@octobus.net> [Fri, 27 Oct 2017 21:35:34 +0200] rev 34930
internal-doc: document the 'phases' parameters to 'getbundle'
The getbundle wireprotocol method has some extended documentation. We update it
with the next parameters introduced for binary phases.
Matt Harbison <matt_harbison@yahoo.com> [Sat, 28 Oct 2017 00:00:05 -0400] rev 34929
status: update the help to indicate that clean files are not normally tersed
The same applies to '?' if --quiet is used (or any of the other states if some
of -marduic is specified), but I couldn't figure out how to express that
clearly.
Matt Harbison <matt_harbison@yahoo.com> [Fri, 27 Oct 2017 23:48:38 -0400] rev 34928
terse: split on repo separator instead of os.sep (
issue5715)
The paths being processed are from scmutil.status, and therefore normalized to
'/' separators.
Anton Shestakov <av6@dwimlabs.net> [Thu, 26 Oct 2017 11:58:55 +0800] rev 34927
makefile: put format-c into .PHONY targets
Yuya Nishihara <yuya@tcha.org> [Wed, 25 Oct 2017 21:58:03 +0900] rev 34926
statichttprepo: prevent loading dirstate over HTTP on node lookup (
issue5717)
This seems a bit hacky, but works well. There should be no reason that
static-http repo had to load dirstate.
Initially I tried to proxy os.stat() call through vfs so that statichttpvfs
could hook it, but there wasn't a good error value which the statichttpvfs
could return to get around the util.filestat issue.
Yuya Nishihara <yuya@tcha.org> [Wed, 25 Oct 2017 21:21:42 +0900] rev 34925
test-static-http: show all files accessed over HTTP
This provides some confidence on files that should be loadable over HTTP.
Hopefully it will prevent future bugs.
Yuya Nishihara <yuya@tcha.org> [Wed, 25 Oct 2017 21:20:01 +0900] rev 34924
server: drop executable bit from daemon log file
The logfile option was unused, so it was okay until now.
Kevin Bullock <kbullock+mercurial@ringworld.org> [Mon, 23 Oct 2017 22:13:59 -0500] rev 34923
setup: filter out devel-warn messages from system hg
If we're going to use the user's installed and configured hg command
(which we do since
8b20338b989e), we should prevent devel-warn messages
from interfering with locating it.
Kevin Bullock <kbullock+mercurial@ringworld.org> [Mon, 23 Oct 2017 21:30:59 -0500] rev 34922
setup: remove duplicate assignment of HGRCPATH
HGRCPATH is already set in localhgenv().
Kevin Bullock <kbullock+mercurial@ringworld.org> [Fri, 20 Oct 2017 13:54:51 -0500] rev 34921
packaging: update book URL in Mac and Windows READMEs
muxator <a.mux@inwind.it> [Mon, 23 Oct 2017 22:45:24 +0200] rev 34920
commands: be more uniform in an "hg update" error message
"can only specify one of -C/--clean, -c/--check, or -m/merge"
becomes
"can only specify one of -C/--clean, -c/--check, or -m/--merge"
muxator <a.mux@inwind.it> [Wed, 04 Oct 2017 23:22:34 +0200] rev 34919
update: mention long options explicitly in description of merge.update()
The short options "-c" and "-C" may be confusing for a novice reading the
documentation. Let's try to be more explicit, also mentioning the equivalent
long options ("--check" and "--clean") in the comments.
Yuya Nishihara <yuya@tcha.org> [Sat, 21 Oct 2017 13:42:43 +0900] rev 34918
mq: copy pager attributes back to qrepo.ui
If the legacy pager extension is enabled, a pager is started through repo.ui
at dispatch._runcommand(). After that, mqcommand() creates a qrepo with a
fresh repo.baseui, at which point pager information was lost and another pager
would be spawned by the modern pager interface.
This is a minimal workaround for the problem.
Yuya Nishihara <yuya@tcha.org> [Sat, 21 Oct 2017 13:13:20 +0900] rev 34917
registrar: host "dynamicdefault" constant by configitem object
This is the common pattern seen in the other registrar classes.
Yuya Nishihara <yuya@tcha.org> [Sat, 21 Oct 2017 13:04:58 +0900] rev 34916
configitems: register 'ui.editor'
Joe Blaylock <jrbl@google.com> [Fri, 20 Oct 2017 14:15:46 -0700] rev 34915
help: fix typo in hg merge documentation
Kevin Bullock <kbullock@ringworld.org> [Fri, 20 Oct 2017 13:44:38 -0500] rev 34914
Added signature for changeset
1e2454b60e59
Kevin Bullock <kbullock@ringworld.org> [Fri, 20 Oct 2017 13:44:35 -0500] rev 34913
Added tag 4.4-rc for changeset
1e2454b60e59
Yuya Nishihara <yuya@tcha.org> [Sat, 05 Aug 2017 23:15:37 +0900] rev 34912
help: do not abort topicmatch() because of unimportable extensions
This is alternative workaround to D1198, originally spotted by the earlier
version of the releasenotes extension.
Yuya Nishihara <yuya@tcha.org> [Fri, 20 Oct 2017 22:25:09 +0900] rev 34911
configitems: register 'email.to' and 'patchbomb.to'
Boris Feld <boris.feld@octobus.net> [Thu, 19 Oct 2017 21:50:14 +0200] rev 34910
exchange: propagate the subfunctions return
The parts generator can return a callback to handle server reply. We should
propagate the return for correctness.
Kevin Bullock <kbullock+mercurial@ringworld.org> [Thu, 19 Oct 2017 15:15:05 -0500] rev 34909
merge default into stable for code freeze
# no-check-commit because default contains new vendored code
Denis Laxalde <denis.laxalde@logilab.fr> [Thu, 19 Oct 2017 15:06:33 +0200] rev 34908
log: add an assertion about fctx not being None in patch.diff()
As noted in the comment, this should not happen as removed files (the cause of
fctx2 being None) are caught earlier.
Denis Laxalde <denis.laxalde@logilab.fr> [Thu, 19 Oct 2017 14:55:10 +0200] rev 34907
log: handle removed files with --line-range patterns
I.e. abort when the pattern corresponds to a removed file, as done with bare
file patterns.
Denis Laxalde <denis.laxalde@logilab.fr> [Thu, 19 Oct 2017 14:12:49 +0200] rev 34906
log: disable bare file patterns with --line-range
Currently, specifying both a line-range pattern and a bare file pattern
results in an AND operation whereas we probably want an OR so that bare file
patterns are like a line-range pattern with all lines specified.
So, until this works as expected, we disable this.
Denis Laxalde <denis.laxalde@logilab.fr> [Thu, 19 Oct 2017 12:37:26 +0200] rev 34905
log: switch to FROMLINE:TOLINE syntax for -L/--line-range
This is more consistent with the followlines() revset.
Denis Laxalde <denis@laxalde.org> [Wed, 18 Oct 2017 19:00:33 +0200] rev 34904
log: handle binary files in --line-range patterns
When a file is binary patch.trydiff() would yield None for 'hunkrange'. Handle
this case in the hunksfilter() callback.
Add tests with and without diff.git option as binary handling differs
depending on this option's value.
muxator <a.mux@inwind.it> [Tue, 17 Oct 2017 22:46:08 +0200] rev 34903
build: build deb/rpm independently on config/extensions in the host system
Reverts
5aac617a028d and replaces it with a more general solution.
- works for both rpm and deb
- sidesteps eventual problems with local extensions that have nothing to do with
the build process (hg-git, for example, fails with version 4.4 because
dedab036215d removed peerrepository, and hg-git still uses it as of 0.8.9)
Boris Feld <boris.feld@octobus.net> [Thu, 19 Oct 2017 17:50:20 +0200] rev 34902
config: also gather effect-flags on experimental.evolution
Effect-flags config was in flight while the previous evolve config renaming
was written. Now that both landed, gather effect-flags in
experimental.evolution like the others evolve-related configurations.
Differential Revision: https://phab.mercurial-scm.org/D1197
Boris Feld <boris.feld@octobus.net> [Thu, 19 Oct 2017 12:33:53 +0200] rev 34901
obsfate: rename obsfate into obsolete in default mapfile
Like the previous patch, replace obsfate by obsolete in default mapfile.
Differential Revision: https://phab.mercurial-scm.org/D1190
Boris Feld <boris.feld@octobus.net> [Thu, 19 Oct 2017 12:32:42 +0200] rev 34900
obsfate: rename obsfate into obsolete in changeset_printer
Yuja's comment on the original obsfate about how we would translate obsfate
and the recent discussions about exposing users to new concepts and names lead
have led me to think that 'obsfate' should be treated as internal jargon. End-
users should not be aware of obsfate, so we replace 'obsfate' by 'obsolete' in
changeset_printer.
It will be easier to understand for end-users, easier to translate and closer
to the original Evolve obsfate output.
I'm aware it's extremely late in the cycle but I think it's an UX improvement
for the end-users.
Differential Revision: https://phab.mercurial-scm.org/D1189
Augie Fackler <augie@google.com> [Thu, 19 Oct 2017 11:17:10 -0400] rev 34899
tests: add some (?) output lines to catch "helpful" output from Solaris diff
Differential Revision: https://phab.mercurial-scm.org/D1196
Paul Morelle <paul.morelle@octobus.net> [Wed, 18 Oct 2017 15:28:19 +0200] rev 34898
sparse-read: ignore trailing empty revs in each read chunk
An empty entry in the revlog may happen for two reasons:
- when the file is empty, and the revlog stores a snapshot;
- when there is a merge and both parents were identical.
`hg debugindex -m | awk '$3=="0"{print}' | wc -l` gives 1917 of such entries
in my clone of pypy, and 113 on my clone of mercurial.
These empty revision may be located at the end of a sparse chain, and in some
special cases may lead to read relatively large amounts of data for nothing.
Jun Wu <quark@fb.com> [Wed, 18 Oct 2017 15:42:44 -0700] rev 34897
fsmonitor: use nonnormalset from dirstatemap
`dirstate._nonnormalset` has been moved to `dirstate._map.nonnormalset` by
60927b19ed65 (dirstate: move nonnormal and otherparent sets to dirstatemap)
and is guaranteed to be existed.
Let's update fsmonitor code to use the new `nonnormalset`. Thix fixed a perf
regression that slows down `hg status` by 0.5 seconds in one of our
production repos.
Differential Revision: https://phab.mercurial-scm.org/D1184
Martin von Zweigbergk <martinvonz@google.com> [Wed, 18 Oct 2017 22:10:08 -0700] rev 34896
registrar: don't i18n ProgrammingError message
Differential Revision: https://phab.mercurial-scm.org/D1188
Martin von Zweigbergk <martinvonz@google.com> [Wed, 18 Oct 2017 22:07:53 -0700] rev 34895
registrar: move "constant" possiblecmdtypes to class level
While at it, switch to set literal syntax.
Differential Revision: https://phab.mercurial-scm.org/D1187
Martin von Zweigbergk <martinvonz@google.com> [Wed, 18 Oct 2017 16:28:18 -0700] rev 34894
tests: de-flake test-run-tests.t's "--jobs=2 --first" test
Once in a while, test-nothing.t finished before test-failure.t or
test-failure-copy.t (I haven't checked which one actually gets run
first). Since there already are two tests that will fail in the same
way, just run those two instead so the diff will be reproducible and
not timing-dependent.
The test case was added in
9a20f53e436f (run-tests: handle --jobs and
--first gracefully, 2014-10-09), and I have checked that backing that
out results in two failures being printed. Note that the summary may
still include multiple tests even if --first is given, it's just that
the diff is only printed for the first failure.
Differential Revision: https://phab.mercurial-scm.org/D1186
Augie Fackler <augie@google.com> [Wed, 18 Oct 2017 18:30:02 -0400] rev 34893
cmdutil: fix status tersing on Python 3
Differential Revision: https://phab.mercurial-scm.org/D1183
Augie Fackler <augie@google.com> [Wed, 18 Oct 2017 18:29:17 -0400] rev 34892
hghave: fix clang-format check to use bytes regex
Fixes hghave on Python 3.
Differential Revision: https://phab.mercurial-scm.org/D1182
Augie Fackler <augie@google.com> [Wed, 18 Oct 2017 18:29:00 -0400] rev 34891
configitems: make all regular expressions bytes and not native str
Fixes many tests on Python 3.
Differential Revision: https://phab.mercurial-scm.org/D1181
Augie Fackler <augie@google.com> [Wed, 18 Oct 2017 18:11:50 -0400] rev 34890
convert: register missed subversion config items
Should fix the build failures on the Solaris builders.
Differential Revision: https://phab.mercurial-scm.org/D1180
Pulkit Goyal <7895pulkit@gmail.com> [Thu, 19 Oct 2017 03:20:47 +0530] rev 34889
amend: error out if the note is greater than 255bytes
In obsmarker we can't store keys and values of more than 255 bytes in metadata.
If we try to do so, ProgrammingError is raised. The note flag to amend stores
the note in obsmetadata. If a user will try to store a larger note, he will
encounter ProgrammingError which is wrong. We must error out early.
Thanks to Yuya for warning about this.
Differential Revision: https://phab.mercurial-scm.org/D1179
Jun Wu <quark@fb.com> [Wed, 18 Oct 2017 15:05:03 -0700] rev 34888
show: move configitems to core
chgserver.py is also checking the config and will get:
devel-warn: accessing unregistered config item:
'commands.show.aliasprefix' at:
mercurial/chgserver.py:109
if the config is not registered.
Differential Revision: https://phab.mercurial-scm.org/D1178
Jun Wu <quark@fb.com> [Wed, 18 Oct 2017 14:55:39 -0700] rev 34887
chgserver: do not treat HG as sensitive environ when CHGHG is set
When `$CHGHG` is set, `$HG` is ignored by the chg client. Removing it from
chg's sensitive environment list would avoid starting up servers
unnecessarily when `$CHGHG` is the same while `$HG` is different.
Differential Revision: https://phab.mercurial-scm.org/D1177
Gregory Szorc <gregory.szorc@gmail.com> [Wed, 18 Oct 2017 22:54:50 +0200] rev 34886
fsmonitor: declare missing config options
These were added in
4aa57627692a. Attempting to run the test harness
with fsmonitor enabled spews a whole bunch of devel warnings due to
these options not be declared.
Differential Revision: https://phab.mercurial-scm.org/D1176
Gregory Szorc <gregory.szorc@gmail.com> [Wed, 18 Oct 2017 22:57:15 +0200] rev 34885
fsmonitor: warn when fsmonitor could be used
fsmonitor can significantly speed up operations on large working
directories. But fsmonitor isn't enabled by default, so naive users
may not realize there is a potential to make Mercurial faster.
This commit introduces a warning to working directory updates when
fsmonitor could be used.
The following conditions must be met:
* Working directory is previously empty
* New working directory adds >= N files (currently 50,000)
* Running on Linux or MacOS
* fsmonitor not enabled
* Warning not disabled via config override
Because of the empty working directory restriction, most users will
only see this warning during `hg clone` (assuming very few users
actually do an `hg up null`).
The addition of a warning may be considered a BC change. However, clone
has printed warnings before. Until recently, Mercurial printed a warning
with the server's certificate fingerprint when it wasn't explicitly
trusted for example. The warning goes to stderr. So it shouldn't
interfere with scripts parsing meaningful output.
The OS restriction was on the advice of Facebook engineers, who only
feel confident with watchman's stability on the supported platforms.
.. feature::
Print warning when fsmonitor isn't being used on a large repository
Differential Revision: https://phab.mercurial-scm.org/D894
Ryan McElroy <rmcelroy@fb.com> [Fri, 06 Oct 2017 06:48:43 -0700] rev 34884
merge: additional test cases to show merge-halting behavior
In the previous patches, we allowed the user to specify that
a merge process should be halted when a filemerge fails.
This patch adds tests that show additional places this logic
can be utilized -- via the options to do additional post-filemerge
checks to determine if a file merge was successful.
Differential Revision: https://phab.mercurial-scm.org/D952
Pulkit Goyal <7895pulkit@gmail.com> [Wed, 18 Oct 2017 04:31:46 +0530] rev 34883
rebase: add support to output nodechanges
This patch adds support to rebase to show the changes in node once the rebase is
complete. This will be extremely helpful for automation purposes and editors
such as Nuclide.
The output is a dictionary of predecessor hash as key and a list of successors'
hashes. The successors one is a list as there can be many successors for a single
predecessor in case of split and it will good to have a generic output format.
This patch adds tests for the same. A new file is created for the patch as
existing files related to rebase has their own purpose and there will be more
formatter support coming for rebase in next cycle.
Thanks to Jun for suggesting to use fm.data().
Differential Revision: https://phab.mercurial-scm.org/D1173
Saurabh Singh <singhsrb@fb.com> [Tue, 17 Oct 2017 13:20:25 -0700] rev 34882
ui: move request exit handlers to global state
Since the ui objects can be created with the 'load' class method, it
is possible to lose the exit handlers information from the old ui instance. For
example, running 'test-bad-extension.t' leads to this situation where chg
creates a new ui instance which does not copy the exit handlers from the
earlier ui instance. For exit handlers, which are special cases anyways, it
probably makes sense to have a global state of the handlers. This would ensure
that the exit handlers registered once are definitely executed at the end of
the request.
Test Plan:
Ran all the tests without '--chg' option. This also fixes the
'test-bad-extension.t' with the '--chg' option.
Differential Revision: https://phab.mercurial-scm.org/D1166
Paul Morelle <paul.morelle@octobus.net> [Wed, 18 Oct 2017 09:07:48 +0200] rev 34881
sparse-read: skip gaps too small to be worth splitting
Splitting at too small gaps might not be worthwhile. With this changeset,
we stop considering splitting on too small gaps. The threshold is configurable.
We arbitrarily pick 256K as a default value because it seems "okay".
Further testing on various repositories and setups will be needed to tune it.
The option name is 'experimental.sparse-read.min-gap-size`, and replaces
`experimental.sparse-read.min-block-size` which is not used any more.
Boris Feld <boris.feld@octobus.net> [Wed, 18 Oct 2017 12:53:00 +0200] rev 34880
sparse-read: move from a recursive-based approach to a heap-based one
The previous recursive approach was trying to optimise each read slice to have
a good density. It had the tendency to over-optimize smaller slices while
leaving larger hole in others.
The new approach focuses on improving the combined density of all the reads,
instead of the individual slices. It slices at the largest gaps first, as they
reduce the total amount of read data the most efficiently.
Another benefit of this approach is that we iterate over the delta chain only
once, reducing the overhead of slicing long delta chains.
On the repository we use for tests, the new approach shows similar or faster
performance than the current default linear full read.
The repository contains about 450,000 revisions with many concurrent
topological branches. Tests have been run on two versions of the repository:
one built with the current delta constraint, and the other with an unlimited
delta span (using 'experimental.maxdeltachainspan=0')
Below are timings for building 1% of all the revision in the manifest log using
'hg perfrevlogrevisions -m'. Times are given in seconds. They include the new
couple of follow-up changeset in this series.
delta-span standard unlimited
linear-read 922s 632s
sparse-read 814s 566s
Matt Harbison <matt_harbison@yahoo.com> [Tue, 17 Oct 2017 22:55:33 -0400] rev 34879
subrepo: implement 'unshare' for Mercurial subrepos
I think there's a slight hole here in that a subrepo could be shared, removed
from .hgsub, and then it's not part of context.substate (so not iterated over).
But the push command has the same hole IIRC, and I think removing a subrepo is
an edge case.
The import hack is a copy/paste of subrepo.subrepo().
Matt Harbison <matt_harbison@yahoo.com> [Tue, 17 Oct 2017 21:48:56 -0400] rev 34878
share: move the implementation of 'unshare' to the 'hg' module
This will be used to setup unsharing subrepos. Usually cmdutil is used for
this purpose. But the implementation needs hg.copystore(), and the hg module
already imports cmdutil.
Denis Laxalde <denis@laxalde.org> [Tue, 17 Oct 2017 20:25:43 +0200] rev 34877
show: use labelcset() template alias for work (and stack) views
By reusing labelcset() template alias from map-cmdline.default we can now
display obsolescence information in `hg show work/stack`.
Kevin Bullock <kbullock+mercurial@ringworld.org> [Wed, 18 Oct 2017 12:19:53 -0500] rev 34876
phases: pass phase names to hooks instead of internal values
Boris Feld <boris.feld@octobus.net> [Wed, 18 Oct 2017 12:36:23 +0200] rev 34875
configitems: document the choice of using 'match' instead of 'search'
Boris Feld <boris.feld@octobus.net> [Wed, 18 Oct 2017 12:26:08 +0200] rev 34874
configitems: do not directly match generic items
Before this changesets, a literal '.*:foo$' config would match a registered
'.*:foo$' generic. This is wrong since generic should be matched through
regular exception only. This changeset fixes this problem.
Thanks for to Yuya Nishihara for spotting the issue.
Boris Feld <boris.feld@octobus.net> [Wed, 18 Oct 2017 15:38:51 +0200] rev 34873
obsfate: fix obsfate_printer with empty date list
When the list of dates is empty, `min` and `max` would raises a ValueError.
Protect against this case by checking that the date list is not empty.
I didn't add a test because I couldn't find a reproducing test case.
Boris Feld <boris.feld@octobus.net> [Tue, 17 Oct 2017 16:54:31 +0200] rev 34872
config: gather allowdivergence under the evolution namespace
Grouping all evolution related-config under the experimental.evolution
namespace would helps the future migration outside [experimental].
Differential Revision: https://phab.mercurial-scm.org/D1155
Boris Feld <boris.feld@octobus.net> [Tue, 17 Oct 2017 15:57:56 +0200] rev 34871
config: remove stabilization.* aliases
Stabilization config items were never part of a release, remove them now that
we cleaned up the evolution related configuration.
Differential Revision: https://phab.mercurial-scm.org/D1154
Boris Feld <boris.feld@octobus.net> [Tue, 17 Oct 2017 15:56:49 +0200] rev 34870
config: rename stabilization.track-operation
We want to get rid of stabilization.* configuration, back out to the old
configuration 'evolution.track-operation'.
Differential Revision: https://phab.mercurial-scm.org/D1153
Boris Feld <boris.feld@octobus.net> [Tue, 17 Oct 2017 15:54:05 +0200] rev 34869
config: rename stabilization.bundle-obsmarker
We want to get rid of stabilization.* configuration, back out to the old
configuration 'evolution.bundle-obsmarker'.
Differential Revision: https://phab.mercurial-scm.org/D1152
Boris Feld <boris.feld@octobus.net> [Thu, 28 Sep 2017 21:07:58 +0100] rev 34868
config: use 'experimental.evolution.exchange'
Extract 'experimental.evolution' = exchange as
'experimental.evolution.exchange'.
We keep the new option in the 'experimental.evolution' namespace in order to
stay coherent with other options ('experimental.evolution.bundle-obsmarker'
and 'experimental.evolution.track-operation') ease the renaming as possibly
'evolution.exchange'.
Differential Revision: https://phab.mercurial-scm.org/D1151
Boris Feld <boris.feld@octobus.net> [Thu, 28 Sep 2017 18:56:40 +0100] rev 34867
config: use 'experimental.evolution.allowunstable'
Extract 'experimental.evolution' = allowunstable as
'experimental.evolution.allowunstable'.
We keep the new option in the 'experimental.evolution' namespace in order to
stay coherent with other options ('experimental.evolution.bundle-obsmarker'
and 'experimental.evolution.track-operation') ease the renaming as possibly
'evolution.allowunstable'.
Differential Revision: https://phab.mercurial-scm.org/D1150
Boris Feld <boris.feld@octobus.net> [Thu, 28 Sep 2017 18:19:06 +0100] rev 34866
config: use 'experimental.evolution.create-markers'
Extract 'experimental.evolution' = createmarkers as
'experimental.evolution.createmarkers'.
We keep the new option in the 'experimental.evolution' namespace in order to
stay coherent with other options ('experimental.evolution.bundle-obsmarker'
and 'experimental.evolution.track-operation') ease the renaming as possibly
'evolution.createmarkers'.
Differential Revision: https://phab.mercurial-scm.org/D1149
Boris Feld <boris.feld@octobus.net> [Tue, 17 Oct 2017 11:29:26 +0200] rev 34865
config: replace experimental.stabilization by experimental.evolution
We replace 'experimental.stabilization=all' by 'experimental.evolution=true'
as we will extract individual config in their own config in later patches.
Differential Revision: https://phab.mercurial-scm.org/D1148
Boris Feld <boris.feld@octobus.net> [Mon, 16 Oct 2017 17:14:47 +0200] rev 34864
config: update evolution-related config
Update the evolution helpers function to support both old-style configuration and
new-style configuration:
experimental.evolution=all is renamed into experimental.evolution=true
experimental.evolution=createmarkers is renamed into
experimental.evolution.createmarkers=true
experimental.evolution=allowunstable is renamed into
experimental.evolution.allowunstable=true
experimental.evolution=exchange is renamed into
experimental.evolution.exchange=true
We choose to not rename individual config options; keeping the same names
would easy the transition for users but it's something that could be easily
done in the future.
Differential Revision: https://phab.mercurial-scm.org/D1147
Boris Feld <boris.feld@octobus.net> [Mon, 16 Oct 2017 17:14:32 +0200] rev 34863
config: invert evolution-related configuration aliases
We want to split the evolution-related configuration and back-out the renaming
from evolution.* to stabilization.*.
First invert the configuration and aliases, so next changesets will be
cleaner.
Differential Revision: https://phab.mercurial-scm.org/D1146
Augie Fackler <augie@google.com> [Mon, 16 Oct 2017 14:53:57 -0400] rev 34862
parsers: allow clang-format here
# skip-blame because parsers.c is mechanically rewritten by
clang-format with no semantic change.
Differential Revision: https://phab.mercurial-scm.org/D1170
Augie Fackler <augie@google.com> [Mon, 16 Oct 2017 14:49:35 -0400] rev 34861
cext: add /* header */ comment to all PyVarObject_HEAD_INIT() calls
This gives clang-format the right notion about formatting these struct
initializers, therefore allowing us to automatically format several
additional files.
# skip-blame because this is just a content-free comment addition
Differential Revision: https://phab.mercurial-scm.org/D1169
Augie Fackler <raf@durin42.com> [Tue, 21 Apr 2015 16:02:23 -0400] rev 34860
parsers: protect some case-folding tables from clang-format
We want a slightly weird format here so that it's easier to read, but
in order to preserve that we need to disable clang-format.
Differential Revision: https://phab.mercurial-scm.org/D1168
Augie Fackler <augie@google.com> [Mon, 14 Sep 2015 14:52:20 -0400] rev 34859
makefile: add target to apply clang-format in-place
This makes it easy to reformat files after you finish editing them.
Differential Revision: https://phab.mercurial-scm.org/D1167
Boris Feld <boris.feld@octobus.net> [Mon, 16 Oct 2017 17:41:27 +0200] rev 34858
configitems: adds a developer warning when accessing undeclared configuration
Now that all known options are declared, we setup a warning to make sure it will
stay this way.
We disable the warning in two tests checking other behavior with random options.
Denis Laxalde <denis.laxalde@logilab.fr> [Tue, 17 Oct 2017 21:15:31 +0200] rev 34857
log: add -L/--line-range option to follow file history by line range
We add an experimental -L/--line-range option to 'hg log' taking file patterns
along with a line range using the (new) FILE,FROMLINE-TOLINE syntax where FILE
may be a pattern (matching exactly one file). The resulting history is similar
to what the "followlines" revset except that, if --patch is specified,
only diff hunks within specified line range are shown.
Basically, this brings the CLI on par with what currently only exists in hgweb
through line selection in "file" and "annotate" views resulting in a file log
with filtered patch to only display followed line range.
The option may be specified multiple times and can be combined with --rev and
regular file patterns to further restrict revisions. Usage of this option
requires --follow; revisions are shown in descending order and renames are
followed. Only the --graph option is currently not supported.
The UI is the result of a consensus from review feedback at:
https://www.mercurial-scm.org/pipermail/mercurial-devel/2017-October/106749.html
The implementation spreads between commands.log() and cmdutil module.
In commands.log(), the main loop may now use a "hunksfilter" factory (similar
to "filematcher") that, for a given "rev", produces a filtering function
for diff hunks for a given file context object.
The logic to build revisions from -L/--line-range options lives in
cmdutil.getloglinerangerevs() which produces "revs", "filematcher" and
"hunksfilter" information. Revisions obtained by following files' line range
are filtered if they do not match the revset specified by --rev option. If
regular FILE arguments are passed along with -L options, both filematchers are
combined into a new matcher.
.. feature::
Add an experimental -L/--line-range FILE,FROMLINE-TOLINE option to 'hg log'
command to follow the history of files by line range. In combination with
-p/--patch option, only diff hunks within specified line range will be
displayed. Feedback, especially on UX aspects, is welcome.
Denis Laxalde <denis.laxalde@logilab.fr> [Fri, 06 Oct 2017 14:45:17 +0200] rev 34856
diff: pass a diff hunks filter function from changeset_printer to patch.diff()
We add a 'hunksfilterfn' keyword argument in all functions of the call
stack from changeset_printer.show() to patch.diff(). This is a callable
that will be used to filter out hunks by line range and will be used in
the "-L/--line-range" option of "hg log" command introduced in the
following changesets.
Denis Laxalde <denis.laxalde@logilab.fr> [Thu, 05 Oct 2017 21:20:08 +0200] rev 34855
diff: also yield file context objects in patch.trydiff() (API)
And retrieve them in patch.diffhunks(). We'll use these in forthcoming
changesets to filter diff hunks by line range.
Denis Laxalde <denis.laxalde@logilab.fr> [Wed, 04 Oct 2017 15:27:43 +0200] rev 34854
revset: extract a parsefollowlinespattern helper function
We'll need the same logic in forthcoming changeset to handle --line-range
option in 'hg log' command.
The function lives in scmutil.py (rather than util.py) as it uses match and
pathutil modules.
Boris Feld <boris.feld@octobus.net> [Fri, 06 Oct 2017 17:53:36 +0200] rev 34853
obsfate: add obsfate to default mapfile
Use the verbosity aware template keyword introduced earlier. It has the nice
property of being verbosity dependent but in order to customize the obsfate
part, users will need to replace the lobsfate definition from default mapfile
with the one using template functions (by copying the one from test-obsmarker-
template.t for example).
As it's a more advanced use-case, I'm more inclined to have the same code for
the {obsfate} keyword, in the changeset printer and in the default mapfile for
consistency.
But, the definition in default mapfile could be replaced with one based on
template filter to obsfate output customization if it is a big need for users.
Boris Feld <boris.feld@octobus.net> [Thu, 05 Oct 2017 15:25:18 +0200] rev 34852
log: add obsfate by default in changeset printer
Having an obsfate by default in log will be useful for users to understand why
they have obsolete and unstable changesets. Obsfate will only be shown for
obsolete changesets, which only happens if people opt-in to experimental feature.
But when obsolete changeset are visible, it is very useful to understand where
they are. Having it in log could be sufficient for most people, so they don't
have to learn a new command (like obslog which is itself useful in case of
divergences).
For example, when pulling and working directory parent become obsolete:
$ hg pull
...
working directory parent is obsolete! (
f936c1697205)
This message comes from the Evolve extension.
Obsfate would comes handy:
$ hg log -G
o changeset: 2:
6f91013c5136
| tag: tip
| parent: 0:
4ef7b558f3ec
| user: Boris Feld <boris.feld@octobus.net>
| date: Mon Oct 09 16:00:27 2017 +0200
| summary: A
|
| @ changeset: 1:
f936c1697205
|/ user: Boris Feld <boris.feld@octobus.net>
| date: Mon Oct 09 16:00:27 2017 +0200
| obsfate: rewritten using amend as 2:
6f91013c5136
| summary: -A
|
o changeset: 0:
feb4dd822b8c
user: Boris Feld <boris.feld@octobus.net>
date: Tue Oct 09 16:00:00 2017 +0200
summary: ROOT
And once we update, we don't have an obsolete changeset in the log anymore so
we don't show obsfate anymore, most users won't see obsfate often if they
don't have obsolete changeset often:
@ changeset: 2:
6f91013c5136
| tag: tip
| parent: 0:
4ef7b558f3ec
| user: Boris Feld <boris.feld@octobus.net>
| date: Mon Oct 09 16:00:27 2017 +0200
| summary: A
|
o changeset: 0:
feb4dd822b8c
user: Boris Feld <boris.feld@octobus.net>
date: Tue Oct 09 16:00:00 2017 +0200
summary: ROOT
Boris Feld <boris.feld@octobus.net> [Mon, 09 Oct 2017 15:34:26 +0200] rev 34851
obsfate: only display date in verbose mode
The date is also not that helpful in most cases but we show it in verbose mode.
Boris Feld <boris.feld@octobus.net> [Mon, 09 Oct 2017 15:34:12 +0200] rev 34850
obsfate: filter out current user if not in verbose
Obsolescence is sometimes used only locally so the obs-marker users is always
the same. Showing the user in this case does not bring much values.
In the case where multiple users rewrite the commit, display the full list of
users. Also show all users in verbose mode.
Boris Feld <boris.feld@octobus.net> [Fri, 06 Oct 2017 16:23:47 +0200] rev 34849
ui: add the possibility to returns None as username in ui
In a later patch we want to retrieve the current username or None if it isn't
defined. Add the acceptempty parameter instead of catching Abort.
Boris Feld <boris.feld@octobus.net> [Fri, 06 Oct 2017 17:15:49 +0200] rev 34848
test: test obfate template keyword in test-obsmarker-template.t
These test updates are pretty big by themselves so put it in a separate patch
for easing the review process.
Boris Feld <boris.feld@octobus.net> [Thu, 05 Oct 2017 17:42:56 +0200] rev 34847
templatekw: introduce obsfate keyword
Introduce an obsfate printer that uses all helpers functions defined in
obsutil to get all the obsfate-related data and format a string according to
the current format in test-obsmarker-template.t.
Then, introduce an obsfate templatekw that uses the obsfateprinter to return a
list of strings.
The goal is not to replace existing obsfate template functions but to propose
a default, good-enough and easily usable obsfate definition for end-users that
don't want to customize it. Such output would ultimately get included in the
default log output.
Here are some output examples for a commit amended:
rewritten using amend as 5:
a9b1f8652753 by test (at 1970-01-01 00:00 +0000)
Next patches will make the output dependent on the verbosity.
Exemple of use-cases:
For having the obsfate on a single-line between brackets:
{if(obsfate, " [{join(obsfate, "; ")}]")}
For having the obsfate in several lines:
{if(obsfate, "{obsfate % " Obsfate: {fate}\n"}")}
Pulkit Goyal <7895pulkit@gmail.com> [Tue, 10 Oct 2017 02:25:03 +0530] rev 34846
copies: add a config to limit the number of candidates to check in heuristics
The heuristics algorithm find possible candidates for move/copy and then check
whether they are actually a copy or move. In some cases, there can be lot of
candidates possible which can actually slow down the algorithm.
This patch introduces a config option
`experimental.copytrace.movecandidateslimit` using which one can limit the
candidates to check. The limit defaults to 100.
Thanks to Yuya for suggesting to skip copytracing for that file with a
warning.
Differential Revision: https://phab.mercurial-scm.org/D987
Martin von Zweigbergk <martinvonz@google.com> [Tue, 17 Oct 2017 10:31:44 -0700] rev 34845
extensions: always include traceback when extension setup fails
I have spent a lot of time debugging extensions that failed to load
because we don't include a traceback and I didn't realize I could get
traceback for the extension failure with --traceback. Let's just turn
them on by default, since it should be rare that the user sees these
tracebacks anyway (and if they do, it's not so bad if the extra
traceback pushes them a little harder to report the problem).
Since we already had a test case with --traceback and one without, I
just removed the one with the flag.
Differential Revision: https://phab.mercurial-scm.org/D1164
Martin von Zweigbergk <martinvonz@google.com> [Tue, 17 Oct 2017 10:25:32 -0700] rev 34844
tests: move baduisetup() test out of "#if demandimport"
It no longer depends on demandimport.
Differential Revision: https://phab.mercurial-scm.org/D1163
Martin von Zweigbergk <martinvonz@google.com> [Tue, 17 Oct 2017 09:46:31 -0700] rev 34843
tests: make test-extension.t's baduisetup.py test fail even if bdiff exists
A mercurial.bdiff module has existed at some point and when I have
built at an old version, some .pyc file or something seems to stick
around and test-extension.t fails. Let's remove the reference to bdiff
and simplify the test.
Differential Revision: https://phab.mercurial-scm.org/D1162
Martin von Zweigbergk <martinvonz@google.com> [Tue, 17 Oct 2017 10:33:27 -0700] rev 34842
run-tests: move newline out of colorized message
The leading newline before "ERROR:" led to an incorrect lexing of the
message and the newline got lost.
The fixed formatting can be seen in the test case. The reason we
didn't notice before was that the bad formatting just led to the loss
of a blank line in the test. However, there are other cases where it
would be joined with a line saying "Accept this change? [n]" or
"Reference output has changed (run again to prompt changes)".
Differential Revision: https://phab.mercurial-scm.org/D1159
Saurabh Singh <singhsrb@fb.com> [Tue, 17 Oct 2017 11:07:18 -0700] rev 34841
test-extension: make the test compatible with chg
This test fails when run with chg. This commit just makes the test chg
aware by fixing the output of some of the tests.
Test Plan:
Ran the test 'test-extension.t' with and without '--chg' option.
Differential Revision: https://phab.mercurial-scm.org/D1160
Saurabh Singh <singhsrb@fb.com> [Tue, 17 Oct 2017 11:35:58 -0700] rev 34840
hghave: disable demandimport when chg is running
Chg disables demandimport on purpose for performance wins and
therefore, it probably makes sense to indicate that demandimport is disabled
when chg is running.
Test Plan:
Ran all the tests.
Differential Revision: https://phab.mercurial-scm.org/D1161
Jun Wu <quark@fb.com> [Tue, 17 Oct 2017 10:41:56 -0700] rev 34839
test-show: make it compatible with chg
The show extension reads `commands.show.aliasprefix` config in its
`extsetup` and that causes issues with chg. This patch adds that config item
to chg confighash to solve the issue.
Test Plan:
`run-tests.py -l --chg test-show.t`
Differential Revision: https://phab.mercurial-scm.org/D1158
Augie Fackler <augie@google.com> [Tue, 17 Oct 2017 10:51:43 -0400] rev 34838
templater: use pycompat.sysbytes to bytes-ify some __name__ attrs
Spotted by yuya in review of
e87e62b7fc0b.
Differential Revision: https://phab.mercurial-scm.org/D1145
Augie Fackler <augie@google.com> [Mon, 16 Oct 2017 22:44:43 -0400] rev 34837
templatefilters: defend against evil unicode strs in json filter
We only want to do I/O in terms of bytes, so lets explode early
instead of recursing forever.
Differential Revision: https://phab.mercurial-scm.org/D1136
Boris Feld <boris.feld@octobus.net> [Wed, 20 Sep 2017 19:38:06 +0200] rev 34836
phase: use a binary phase part to push through bundle2 (BC)
The part we are using for pull is now used for push too. As we no longer use
pushkey, pushkey hooks are no longer triggered. This is an obvious backward
incompatible change. We could artificially trigger the pushkey hook within the
bundle2 part, but this seemed too hacky to me.
An option would be to disable by default this new mechanism for a couple of
versions to help people migrate to `txnclose-phase`. I took the liberal and
optimistic path to just turn it on by default directly.
.. bc::
Push no longer triggers a pushkey hook when updating phases. Use the new
`txnclose-phase` and `txnclose-phase` hooks instead.
(Applies when both server and client use version 4.4 or above).
Phil Cohen <phillco@fb.com> [Tue, 17 Oct 2017 12:41:24 -0700] rev 34835
arbitraryfilecontext: skip the cmp fast path if any side is a symlink
`filecmp` follows symlinks by default, which a `filectx.cmp()` call should not
be doing as it should only compare the requested entry. After this patch, only
the contexts' data are compared, which is the correct contract.
This is a corrected version of D1122.
Differential Revision: https://phab.mercurial-scm.org/D1165
Augie Fackler <augie@google.com> [Mon, 14 Sep 2015 14:17:27 -0400] rev 34834
test-clang-format: new test to verify that files stay clang-formatted
For now all .c and .h files are blacklisted. As they become
clang-formatted, we'll remove them from the blacklist,and then this
test will produce output if there are diffs.
Differential Revision: https://phab.mercurial-scm.org/D1133
Mark Thomas <mbthomas@fb.com> [Tue, 17 Oct 2017 08:11:13 -0700] rev 34833
context: audit paths before clearing unknown files and dirs
Fix regression introduced in D785.
In some circumstances, context.clearunknown can be called before the path is
audited. Audit the path before deleting any conflicting files.
Differential Revision: https://phab.mercurial-scm.org/D1157
Mark Thomas <mbthomas@fb.com> [Tue, 17 Oct 2017 08:07:43 -0700] rev 34832
tests: add test demonstrating regression in path audit
D785 regressed behavior in path auditing: files can be deleted if they have a
path that conflicts with a filename from a malicious remote or bundle.
This test demonstrates the problem - the file should not have been deleted.
Differential Revision: https://phab.mercurial-scm.org/D1156
Boris Feld <boris.feld@octobus.net> [Fri, 13 Oct 2017 23:00:31 +0200] rev 34831
configitems: move rebase config into core
The shelve extensions import and call rebase content without loading the
extension. This is problematic as the config items rebase uses are not
declared and the default value are not set, etc...
The shelve extension should be using core utilities only and the necessary bit
should be moved from rebase into core. In the meantime, I'm taking a small
step to get config registration completed with minimal overhead. The rebase
extension is shipped with core so registering its config option within core is
not a big issue.
This is the last step needed before we can install a warning that enforces all
config to be registered.
Boris Feld <boris.feld@octobus.net> [Sat, 14 Oct 2017 01:09:46 +0200] rev 34830
eol: ensure the eol extensions is loaded when hooks run
Similar to the change we did to the 'acl' extensions, we want to make sure the
config items are registered before we run the hooks.
Boris Feld <boris.feld@octobus.net> [Sat, 14 Oct 2017 01:16:03 +0200] rev 34829
acl: make sure the extensions is enabled when the acl-hooks run
The acl extension is usually setup through hooks and never directly activated.
This means the config item declared in the extension are not loaded.
We add the necessary logic to make sure the extensions are loaded before the hook
run.
Boris Feld <boris.feld@octobus.net> [Mon, 16 Oct 2017 18:16:29 +0200] rev 34828
configitems: register the 'web.archivesubrepos' config
Boris Feld <boris.feld@octobus.net> [Sun, 08 Oct 2017 22:22:27 +0200] rev 34827
configitems: register the 'experimental.effect-flags' config
Boris Feld <boris.feld@octobus.net> [Sun, 08 Oct 2017 20:37:13 +0200] rev 34826
configitems: register the full 'merge-tools' config and sub-options
We register the merge-tools config section (which has an arbitrary base config
value) and the possible sub-attribute. The sub-attribute has to be registered
first or at the same time otherwise the '.*' item would shadow them.
Merge tools could include "." in their name so we can't constrain any more
than just ".*".
Paul Morelle <paul.morelle@octobus.net> [Sat, 14 Oct 2017 17:05:41 +0200] rev 34825
revlog-sparse-read: add a lower-threshold for read block size
The option experimental.sparse-read.min-block-size specifies the minimal size
of a deltachain span, under which it won't be split by _slicechunk.
Paul Morelle <paul.morelle@octobus.net> [Tue, 10 Oct 2017 17:50:27 +0200] rev 34824
revlog: introduce an experimental flag to slice chunks reads when too sparse
Delta chains can become quite sparse if there is a lot of unrelated data between
relevant pieces. Right now, revlog always reads all the necessary data for the
delta chain in one single read. This can lead to a lot of unrelated data to be
read (see
issue5482 for more details).
One can use the `experimental.maxdeltachainspan` option with a large value
(or -1) to easily produce a very sparse delta chain.
This change introduces the ability to slice the chunks retrieval into multiple
reads, skipping large sections of unrelated data. Preliminary testing shows
interesting results. For example the peak memory consumption to read a manifest
on a large repository is reduced from 600MB to 250MB (200MB without
maxdeltachainspan). However, the slicing itself and the multiple reads can have
an negative impact on performance. This is why the new feature is hidden behind
an experimental flag.
Future changesets will add various parameters to control the slicing heuristics.
We hope to experiment a wide variety of repositories during 4.4 and hopefully
turn the feature on by default in 4.5.
As a first try, the algorithm itself is prone to deep changes. However, we wish
to define APIs and have a baseline to work on.
Paul Morelle <paul.morelle@octobus.net> [Mon, 09 Oct 2017 15:13:41 +0200] rev 34823
revlog: ignore empty trailing chunks when reading segments
When a merge commit creates an empty diff in the revlog, its offset may still
be quite far from the end of the previous chunk.
Skipping these empty chunks may reduce read size significantly.
In most cases, there is no gain, and in some cases, little gain.
On my clone of pypy, `hg manifest` reads 65% less bytes (96140 i/o 275943) for
revision 4260 by ignoring the only empty trailing diff.
For revision 2229, 35% (34557 i/o 53435)
Sadly, this is difficult to reproduce, as hg clone can make its own different
structure every time.
Boris Feld <boris.feld@octobus.net> [Wed, 20 Sep 2017 19:17:37 +0200] rev 34822
phase: isolate logic to update remote phrase through bundle2 pushkey
Move the logic to build bundle2 pushkey part into its dedicated function. It
will help to keep the logic clear when adding support for sending phases change
using 'phase-heads' part.
Boris Feld <boris.feld@octobus.net> [Wed, 11 Oct 2017 07:40:00 +0200] rev 34821
phase: generate a push-race detection part on push
We are about to switch phase pushing from using pushkey to using a the new
dedicated binary part. We introduce the push race detection on its own to help
detect potential impact.
Boris Feld <boris.feld@octobus.net> [Wed, 11 Oct 2017 07:13:02 +0200] rev 34820
phase: introduce a new 'check:phases' part
This part checks if revisions are still in the same phase as when the
bundle was generated. This is similar to what 'check:heads' or
'check:updated-heads' bundle2 part achieves for changesets.
We needs seems before we can move away from pushkey usage from phase since
pushkey has it own built-in push-race detection.
Boris Feld <boris.feld@octobus.net> [Wed, 11 Oct 2017 18:39:04 +0200] rev 34819
phase: gather remote phase information in a summary object
We keep useful phase information around. The data will be reused with detecting
push-race in later changesets.
Boris Feld <boris.feld@octobus.net> [Wed, 11 Oct 2017 18:39:34 +0200] rev 34818
phase: simplify the check for
issue3781 shortcut in discovery
We'll rework the code around this check. Limiting the entanglement will help
with later changesets
Boris Feld <boris.feld@octobus.net> [Mon, 16 Oct 2017 12:36:42 +0200] rev 34817
exchange: fix
issue3781 reference in the comment
This comment is about:
issue3781: Courtesy Phases synchronisation to publishing server prevent
subrepo push
Not about:
issue3871: Slow hg log when template contains {file_adds}, {file_mods} and
{file_dels}
Boris Feld <boris.feld@octobus.net> [Wed, 11 Oct 2017 20:08:02 +0200] rev 34816
phase: filter out non-draft item in "draft root"
The on-disk file can contain draft root that are descendants of secret root.
The resulting phase computation is correct, but the phases root content is
not. I will send another series to introduce code that remove some of the
cases where this can happens, but we first need to damage control the existing
case.
After this changeset, we can no longer advertise secret changeset as draft
root.
Matt Harbison <matt_harbison@yahoo.com> [Sun, 15 Oct 2017 22:48:02 -0400] rev 34815
subrepo: share instead of clone if the parent repo is shared (
issue5675) (BC)
Previously, only the top level repo was shared, and then any subrepos were
cloned on demand. This is problematic because commits to the parent repo would
write an updated .hgsubstate to the share source, but the corresponding subrepo
commit would be stuck in the local subrepo. That would prevent an update in the
source repo. We already go to great lengths to avoid having inconsistent repos
(e.g., `hg push -r rev` will push _everything_ in a subrepo, even if it isn't
referenced in one of the parent's outgoing commits). Therefore, this seems like
a bug fix, and there's no option to get the old behavior. I can't imagine the
previous behavior was useful to anybody.
There shouldn't be an issue with svn, since it is centralized. Maybe --git-dir
can be used for git subrepos, but I'll leave that to someone more familiar with
git.
An integer was previously being implicitly returned from commands.share(), which
caused dispatch() to start crashing when changing over to returning the shared
repo. All error paths appear to raise, so this can be hardcoded to success.
The clone command checks for 'is None' in a similar pattern, but since
hg.clone() always returns a tuple, that seems wrong?
.. fix:: Issue 5675
Creating a share of a repository with a Mercurial subrepository will now
share the subrepository.
and
.. bc::
Mercurial subrepositories are now shared instead of cloned when the parent
repository is shared. This prevents dangling subrepository references in the
share source. Previously shared repositories with cloned subrepositories
will continue to function unchanged.
Matt Harbison <matt_harbison@yahoo.com> [Sun, 15 Oct 2017 16:57:34 -0400] rev 34814
tests: update output for no-symlink platforms
This goes with
eb586ed5d8ce.
Pulkit Goyal <7895pulkit@gmail.com> [Mon, 16 Oct 2017 22:46:37 +0530] rev 34813
releasenotes: show a warning if fuzzywuzzy is not present
Differential Revision: https://phab.mercurial-scm.org/D1121
Pulkit Goyal <7895pulkit@gmail.com> [Mon, 16 Oct 2017 22:46:11 +0530] rev 34812
releasenotes: move import of fuzzywuzzy to import level
This will help us in determining easily that whether fuzzywuzzy is loaded or not
loaded in any of the function.
Differential Revision: https://phab.mercurial-scm.org/D1120
Pulkit Goyal <7895pulkit@gmail.com> [Sun, 15 Oct 2017 20:31:44 +0530] rev 34811
releasenotes: don't abort is there is a bad formatted entry for releasenotes
While producing releasenotes for (4.3::), releasenotes aborts with error because
of some bad formatting of releasenotes in some commits. Instead of aborting,
this adds warning message which will help us in skipping them and telling user
about it.
Differential Revision: https://phab.mercurial-scm.org/D1097
Pulkit Goyal <7895pulkit@gmail.com> [Sun, 15 Oct 2017 20:29:16 +0530] rev 34810
releasenotes: make the import of fuzzywuzzy optional
If fuzzywuzzy is note present, we will not be having the capability to merge
existing releasenotes with the new releasenotes on the similarity basis.
The merging will still work good for exact same releasenotes entries.
Differential Revision: https://phab.mercurial-scm.org/D1096
Augie Fackler <augie@google.com> [Mon, 16 Oct 2017 22:51:58 -0400] rev 34809
webcommands: replace str(ctx) etc with pycompat.bytestr(ctx) etc
hgweb can now serve the graph view in Python 3.
Differential Revision: https://phab.mercurial-scm.org/D1138
Augie Fackler <augie@google.com> [Mon, 16 Oct 2017 22:50:39 -0400] rev 34808
templater: don't blow up when trying to build an abort message
__name__ is unicode, but we need bytes. For now, we'll make the
(mostly-safe) assumption that template filter names will be ascii.
Differential Revision: https://phab.mercurial-scm.org/D1137
Augie Fackler <augie@google.com> [Mon, 16 Oct 2017 22:44:06 -0400] rev 34807
webutil: use pycompat.bytestr() instead of str()
Stops us from choking the templater on Python 3. With this patch
applied, much of hgweb works correctly in Python 3. The notable
exception is the graph page, which chokes because it gets node IDs as
str instead of bytes.
Differential Revision: https://phab.mercurial-scm.org/D1135
Augie Fackler <augie@google.com> [Mon, 16 Oct 2017 22:43:19 -0400] rev 34806
hgweb: correct an earlier error of mine - `start` should be bytes
Gets hgweb very close to working with Python 3.
Differential Revision: https://phab.mercurial-scm.org/D1134
Boris Feld <boris.feld@octobus.net> [Mon, 16 Oct 2017 18:58:16 +0200] rev 34805
config: simplify aliasing commands.update.check
experimental.updatecheck was renamed into commands.update.check, use the
config system to provides the fallback on the old config name instead of
adding more code.
Differential Revision: https://phab.mercurial-scm.org/D1117
Jun Wu <quark@fb.com> [Wed, 04 Oct 2017 18:51:21 -0700] rev 34804
run-tests: set HGPLAIN=1 when bisecting
Otherwise a customized template may break the regex matching the bisect
output.
Differential Revision: https://phab.mercurial-scm.org/D949
Jun Wu <quark@fb.com> [Wed, 04 Oct 2017 18:50:18 -0700] rev 34803
run-tests: extract Popen logic to a single method
This removes 3 lines in total LOC and makes the upcoming changes easier.
Differential Revision: https://phab.mercurial-scm.org/D948
Jun Wu <quark@fb.com> [Wed, 04 Oct 2017 18:42:24 -0700] rev 34802
run-tests: move bisect logic to a separate method
This removes 8 space indentation and makes upcoming changes easier.
Differential Revision: https://phab.mercurial-scm.org/D947
Augie Fackler <augie@google.com> [Wed, 04 Oct 2017 11:00:04 -0400] rev 34801
mpatch: switch alignment of wrapped line from tab to spaces with clang-format
I may be a weird person for liking this style, but our C style is
historically nominally the Linux Kernel style, and when you configure
clang-format to be kernel-ish, this is what you get. If we want to
change it, we can do so by tweaking the formatter rules in the future.
Differential Revision: https://phab.mercurial-scm.org/D1132
Augie Fackler <augie@google.com> [Wed, 04 Oct 2017 10:56:33 -0400] rev 34800
mpatch: reformat function prototypes with clang-format
Differential Revision: https://phab.mercurial-scm.org/D1131
Augie Fackler <augie@google.com> [Mon, 16 Oct 2017 11:43:41 -0400] rev 34799
contrib: remove check-code rule about indentation
We're moving towards a clang-format world, and clang-format is able to
wrap argument lists with spaces reliably, while still enforcing tabs
globally. Let's let clang-format do its job, and not do as much
C-style enforcement with regular expressions.
Differential Revision: https://phab.mercurial-scm.org/D1130
Augie Fackler <raf@durin42.com> [Sat, 24 Jan 2015 17:04:25 -0500] rev 34798
clang-format: configuration for the clang-format source formatter
Differential Revision: https://phab.mercurial-scm.org/D1129
Ryan McElroy <rmcelroy@fb.com> [Fri, 06 Oct 2017 06:48:43 -0700] rev 34797
merge: allow user to halt merge on merge-tool failures
Depends on D932.
Call the new _onfilemergefailure function when a merge tool reports failure
via a return code.
Differential Revision: https://phab.mercurial-scm.org/D951
Ryan McElroy <rmcelroy@fb.com> [Fri, 06 Oct 2017 06:48:43 -0700] rev 34796
filemerge: introduce functions to halt merge flow
Depends on D931.
This patch introduces functions and a config option that will allow a user
to halt the merge if there are failures during a file merge. These functions
will be used in the next patch.
Differential Revision: https://phab.mercurial-scm.org/D932
Pulkit Goyal <7895pulkit@gmail.com> [Sun, 15 Oct 2017 19:29:56 +0530] rev 34795
amend: add a flag `-n/--note` to store note with amend
This patch utilises the functionality added in previous patches and adds a flag
to amend command in hgext/amend to add a note to the amend. Since the note is
stored in the obsmarker metadata, this will only be useful when obsmarker
creation is enabled, otherwise this is no-op.
Not adding releasenotes part as we yet don't have a functionality in core to
show the note.
Differential Revision: https://phab.mercurial-scm.org/D1095
Pulkit Goyal <7895pulkit@gmail.com> [Sun, 15 Oct 2017 15:32:03 +0530] rev 34794
cmdutil: pass metadata from amend() to cleanupnodes
`commit --amend` and amend command in core and extensions rely on
cmdutil.amend() for amending a commit. So the logic to add a note to amend must
reside here. This patch assumes that note will be passed in opts dictionary to
the function and it will be passed to cleanupnodes and then createmarkers to
store the note in the obsmarker metadata.
After this patch, note can be stored on an amend changeset by passing notes as a
part of opts to cmdutil.amend().
Differential Revision: https://phab.mercurial-scm.org/D1094
Pulkit Goyal <7895pulkit@gmail.com> [Sun, 15 Oct 2017 14:34:24 +0530] rev 34793
scmutil: add capability to cleanupnodes to take obsmarker metadata
This patch adds a metadata argument to cleanupnodes() which will be dict and can
be passed to obsmarker.createmarkers() and can be stored on the obsmarker.
In cases when obsolescence is not enabled, the metadata argument is useless.
This is a step towards storing a note in amend.
Differential Revision: https://phab.mercurial-scm.org/D1093
Saurabh Singh <singhsrb@fb.com> [Mon, 16 Oct 2017 13:06:33 -0700] rev 34792
test-hgweb-annotate-whitespace: make test compatible with chg
D946 fixed a bunch of tests which had the same root cause. Please see
that for details. This seems to be one of the newer tests which fails because
of the same reason.
Test Plan:
Ran the test 'test-hgweb-annotate-whitespace.t' with and without the
'--chg' option.
Differential Revision: https://phab.mercurial-scm.org/D1124
Saurabh Singh <singhsrb@fb.com> [Mon, 16 Oct 2017 17:41:37 -0700] rev 34791
test-pager: make the test compatible with chg
D911 tried to make this test compatible with chg but instead resulted
in the test being flaky for chg. For now, disabling this test for chg because
it seems difficult to fix the test. This will allow for the continuous build
setup for chg.
Test Plan:
Ran the test 'test-pager.t' with and without the '--chg' option.
Differential Revision: https://phab.mercurial-scm.org/D1128
Saurabh Singh <singhsrb@fb.com> [Mon, 16 Oct 2017 17:06:32 -0700] rev 34790
test-obsolete-bounds-checking: make the test compatible with chg
This test fails when run with chg because the error message starts
with "ProgrammingError" instead of "mercurial.error.ProgrammingError".
Therefore, globing the "mercurial.error." to ensure that the test is compatible
with chg.
Test Plan:
Ran the test 'test-obsolete-bounds-checking.t' with and without the
'--chg' option.
Differential Revision: https://phab.mercurial-scm.org/D1127
Saurabh Singh <singhsrb@fb.com> [Mon, 16 Oct 2017 17:14:21 -0700] rev 34789
test-dispatch: make the test compatible with chg
The test is broken when run with chg because it prints a different
error message when chg is running. This commit fixes the test by special casing
for chg.
Test Plan:
Ran the test 'test-dispatch.t' with and without '--chg' option.
Differential Revision: https://phab.mercurial-scm.org/D1126
Saurabh Singh <singhsrb@fb.com> [Mon, 16 Oct 2017 12:15:00 -0700] rev 34788
histedit: remove the nonexistant config 'histeditng'
D942 removed the experimental config 'histeditng'. This is a leftover
which should have been removed in that commit. Therefore, this commit completes
the cleanup.
Test Plan:
Ran all the tests.
Differential Revision: https://phab.mercurial-scm.org/D1123
Phil Cohen <phillco@fb.com> [Sun, 15 Oct 2017 20:36:29 -0700] rev 34787
context: add workingfilectx.markcopied
With in-memory merge, copy information needs to be stored in-memory, not in the
dirstate.
To make this transition easy, move the existing dirstate-based approach to
workingfilectx; that way, other implementations can choose to store it
somewhere else.
Differential Revision: https://phab.mercurial-scm.org/D1106
Phil Cohen <phillco@fb.com> [Sun, 15 Oct 2017 20:36:29 -0700] rev 34786
merge: don't use workers in in-memory mode
The worker processes can't share memory, so workers should not be used.
Differential Revision: https://phab.mercurial-scm.org/D1105
Phil Cohen <phillco@fb.com> [Sun, 15 Oct 2017 20:36:29 -0700] rev 34785
filemerge: add a missing flushall()
Differential Revision: https://phab.mercurial-scm.org/D1060
Phil Cohen <phillco@fb.com> [Fri, 13 Oct 2017 12:34:22 -0700] rev 34784
filemerge: store backups in the overlayworkingctx if using imm
Differential Revision: https://phab.mercurial-scm.org/D1059
Phil Cohen <phillco@fb.com> [Fri, 13 Oct 2017 12:34:22 -0700] rev 34783
context: add overlayfilectx.cmp()
Differential Revision: https://phab.mercurial-scm.org/D1058
Phil Cohen <phillco@fb.com> [Mon, 16 Oct 2017 13:10:55 -0700] rev 34782
filemerge: use arbitraryfilectx for backups
With in-memory merge, backup files might be overlayworkingfilectxs stored
in memory. But they could also be real files if the user's backup directory is
outside the working dir.
Rather than have two code paths everywhere, let's use arbitraryfilectx so they
can be consistent.
Differential Revision: https://phab.mercurial-scm.org/D1057
Pulkit Goyal <7895pulkit@gmail.com> [Wed, 20 Sep 2017 04:47:43 +0530] rev 34781
registrar: add support for storing the type of command in func object
This patch adds support for storing the type of command which is going to run in
the func object. For this it does the following:
1) Add three possible values as attributes to the registrar.command class
2) Add a new argument to registrar.command._doregister function
3) Add a new attribute cmdtype to the func object
The type of command will be helpful in deciding what level of access on hidden
commits it can has.
Differential Revision: https://phab.mercurial-scm.org/D736
Pulkit Goyal <7895pulkit@gmail.com> [Mon, 16 Oct 2017 22:19:02 +0530] rev 34780
releasenotes: fix documentation of similaritycheck()
The function document says that it returns true when the fragment can be merged,
but if you see the function just above it which is similar(), it writes already
exists thing if return value from similaritycheck() is False which is just
opposite of the doc. This patch fixes that.
Differential Revision: https://phab.mercurial-scm.org/D1119
Boris Feld <boris.feld@octobus.net> [Sat, 14 Oct 2017 01:15:01 +0200] rev 34779
configitems: register acl config section
Boris Feld <boris.feld@octobus.net> [Sat, 14 Oct 2017 00:34:46 +0200] rev 34778
configitems: register the 'extdata.*.diffargs' config
Boris Feld <boris.feld@octobus.net> [Sat, 14 Oct 2017 00:33:57 +0200] rev 34777
configitems: register the 'exdiff.opts.*' config
Boris Feld <boris.feld@octobus.net> [Sat, 14 Oct 2017 00:30:14 +0200] rev 34776
configitems: register the 'hostsecurity.*:verifycertsfile' config
Boris Feld <boris.feld@octobus.net> [Sat, 14 Oct 2017 00:29:31 +0200] rev 34775
configitems: register the 'hostsecurity.*:fingerprints' config
Boris Feld <boris.feld@octobus.net> [Sat, 14 Oct 2017 00:28:48 +0200] rev 34774
configitems: register the 'hostsecurity.*:ciphers' config
Boris Feld <boris.feld@octobus.net> [Sat, 14 Oct 2017 00:28:13 +0200] rev 34773
configitems: register the 'hostsecurity.*:minimumprotocol' config
Boris Feld <boris.feld@octobus.net> [Sat, 14 Oct 2017 00:16:12 +0200] rev 34772
configitems: register the test 'fakepatchtime.fakenow' config
Boris Feld <boris.feld@octobus.net> [Sat, 14 Oct 2017 00:15:37 +0200] rev 34771
configitems: register the test 'fakedirstatewritetime.fakenow' config
Boris Feld <boris.feld@octobus.net> [Fri, 13 Oct 2017 23:26:16 +0200] rev 34770
configitems: register the 'gpg' arbitraty key section
Boris Feld <boris.feld@octobus.net> [Fri, 13 Oct 2017 23:23:48 +0200] rev 34769
configitems: register the 'extdata' section
Boris Feld <boris.feld@octobus.net> [Fri, 13 Oct 2017 23:33:31 +0200] rev 34768
configitems: fix registration of extensions config
The new 'itemregister' class should be used when loading the extension config.
This was and oversight when itemregister was introduced.
Boris Feld <boris.feld@octobus.net> [Wed, 11 Oct 2017 23:33:59 +0200] rev 34767
configitems: register the test config in 'test-push-race.t'
Boris Feld <boris.feld@octobus.net> [Wed, 11 Oct 2017 04:33:00 +0200] rev 34766
configitems: register the test 'ui.ioerrors' config
Boris Feld <boris.feld@octobus.net> [Fri, 13 Oct 2017 23:53:06 +0200] rev 34765
configitems: register the test 'failafterfinalize.fail' config
Boris Feld <boris.feld@octobus.net> [Fri, 13 Oct 2017 23:46:37 +0200] rev 34764
configitems: register the test 'logtoprocess.foo' config
Boris Feld <boris.feld@octobus.net> [Fri, 13 Oct 2017 23:10:49 +0200] rev 34763
configitems: register the test 'failpush.reason' config
Boris Feld <boris.feld@octobus.net> [Fri, 13 Oct 2017 23:07:12 +0200] rev 34762
configitems: register the 'patchbomb.reply-to' config
Boris Feld <boris.feld@octobus.net> [Fri, 13 Oct 2017 23:07:01 +0200] rev 34761
configitems: register the 'patchbomb.cc' config
Boris Feld <boris.feld@octobus.net> [Fri, 13 Oct 2017 23:06:40 +0200] rev 34760
configitems: register the 'patchbomb.bcc' config
Boris Feld <boris.feld@octobus.net> [Fri, 13 Oct 2017 23:03:46 +0200] rev 34759
configitems: register the 'web.staticurl' config
Boris Feld <boris.feld@octobus.net> [Thu, 12 Oct 2017 00:38:18 +0200] rev 34758
configitems: register the 'experimental.uncommitondirtywdir' config
Boris Feld <boris.feld@octobus.net> [Fri, 13 Oct 2017 22:28:03 +0200] rev 34757
configitems: register the 'largefiles.usercache' config
Boris Feld <boris.feld@octobus.net> [Fri, 13 Oct 2017 22:26:58 +0200] rev 34756
configitems: register the 'largefiles.patterns' config
Boris Feld <boris.feld@octobus.net> [Fri, 13 Oct 2017 22:26:03 +0200] rev 34755
configitems: register the 'largefiles.minsize' config
Boris Feld <boris.feld@octobus.net> [Fri, 13 Oct 2017 21:50:43 +0200] rev 34754
configitem: register the 'notify.changegroup' config
Boris Feld <boris.feld@octobus.net> [Fri, 13 Oct 2017 21:50:32 +0200] rev 34753
configitem: register the 'notify.outgoing' config
Boris Feld <boris.feld@octobus.net> [Thu, 12 Oct 2017 00:57:49 +0200] rev 34752
configitem: register the 'notify.incoming' config
Boris Feld <boris.feld@octobus.net> [Thu, 12 Oct 2017 00:44:45 +0200] rev 34751
configitems: register the 'hgweb-paths' section
Boris Feld <boris.feld@octobus.net> [Fri, 13 Oct 2017 21:32:29 +0200] rev 34750
contrib-perf: register the 'parentscount' config item
Boris Feld <boris.feld@octobus.net> [Fri, 13 Oct 2017 21:31:24 +0200] rev 34749
contrib-perf: update the config registration
There are various issue with the previous code, all hidden by the try-except
clause. These are fixed now.
Boris Feld <boris.feld@octobus.net> [Thu, 12 Oct 2017 00:20:41 +0200] rev 34748
configitems: register the 'hostfingerprints' section
Boris Feld <boris.feld@octobus.net> [Thu, 12 Oct 2017 00:19:12 +0200] rev 34747
configitems: register the 'hostsecurity.minimumprotocol' config
Boris Feld <boris.feld@octobus.net> [Wed, 11 Oct 2017 22:53:17 +0200] rev 34746
configitems: register the 'progress.format' config
Boris Feld <boris.feld@octobus.net> [Wed, 11 Oct 2017 22:51:23 +0200] rev 34745
configitems: register the 'blackbox.maxfiles' config
Augie Fackler <augie@google.com> [Sun, 15 Oct 2017 00:43:01 -0400] rev 34744
hgweb: fix decodevaluefromheaders to always return a bytes value
That's more in line with what we want, and we know it's ASCII data
since that's all HTTP technically allows in headers anyway.
Differential Revision: https://phab.mercurial-scm.org/D1112
Augie Fackler <augie@google.com> [Sun, 15 Oct 2017 00:42:25 -0400] rev 34743
hgweb: more "headers are native strs" cleanup
I'll fix the decodevaluefromheaders function in an upcoming change.
Differential Revision: https://phab.mercurial-scm.org/D1111
Augie Fackler <augie@google.com> [Sun, 15 Oct 2017 00:41:34 -0400] rev 34742
hgweb: when unpacking args from request form, convert to bytes
We assume http-originated values are ASCII, which should be safe based
on the RFC.
Differential Revision: https://phab.mercurial-scm.org/D1110
Augie Fackler <augie@google.com> [Sun, 15 Oct 2017 00:39:53 -0400] rev 34741
wireproto: more strkwargs cleanup
Differential Revision: https://phab.mercurial-scm.org/D1109