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