Commit Graph

34554 Commits

Author SHA1 Message Date
Pulkit Goyal
1bfd3143f8 releasenotes: show a warning if fuzzywuzzy is not present
Differential Revision: https://phab.mercurial-scm.org/D1121
2017-10-16 22:46:37 +05:30
Pulkit Goyal
d81e686da1 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
2017-10-16 22:46:11 +05:30
Pulkit Goyal
3a436dc987 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
2017-10-15 20:31:44 +05:30
Pulkit Goyal
4e63354533 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
2017-10-15 20:29:16 +05:30
Augie Fackler
bcaad82b20 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
2017-10-16 22:51:58 -04:00
Augie Fackler
4c963a0721 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
2017-10-16 22:50:39 -04:00
Augie Fackler
45c9441c0e 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
2017-10-16 22:44:06 -04:00
Augie Fackler
c6a33e23e1 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
2017-10-16 22:43:19 -04:00
Boris Feld
902027adea 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
2017-10-16 18:58:16 +02:00
Jun Wu
b7de3d0f60 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
2017-10-04 18:51:21 -07:00
Jun Wu
e6abc27d80 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
2017-10-04 18:50:18 -07:00
Jun Wu
e0d88f4bc5 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
2017-10-04 18:42:24 -07:00
Augie Fackler
44f638de23 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
2017-10-04 11:00:04 -04:00
Augie Fackler
210a208635 mpatch: reformat function prototypes with clang-format
Differential Revision: https://phab.mercurial-scm.org/D1131
2017-10-04 10:56:33 -04:00
Augie Fackler
81fb7bb488 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
2017-10-16 11:43:41 -04:00
Augie Fackler
8616945a99 clang-format: configuration for the clang-format source formatter
Differential Revision: https://phab.mercurial-scm.org/D1129
2015-01-24 17:04:25 -05:00
Ryan McElroy
97fa443439 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
2017-10-06 06:48:43 -07:00
Ryan McElroy
cc72ebf3bc 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
2017-10-06 06:48:43 -07:00
Pulkit Goyal
2c4d52e8d4 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
2017-10-15 19:29:56 +05:30
Pulkit Goyal
8fe8ec1089 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
2017-10-15 15:32:03 +05:30
Pulkit Goyal
66d216220e 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
2017-10-15 14:34:24 +05:30
Saurabh Singh
918a1a0df7 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
2017-10-16 13:06:33 -07:00
Saurabh Singh
9b1ec80f9b 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
2017-10-16 17:41:37 -07:00
Saurabh Singh
96035ad997 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
2017-10-16 17:06:32 -07:00
Saurabh Singh
246c9d85ba 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
2017-10-16 17:14:21 -07:00
Saurabh Singh
9332c7664f 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
2017-10-16 12:15:00 -07:00
Phil Cohen
a04280b2f9 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
2017-10-15 20:36:29 -07:00
Phil Cohen
fac2e07a2a 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
2017-10-15 20:36:29 -07:00
Phil Cohen
a76f841e4e filemerge: add a missing flushall()
Differential Revision: https://phab.mercurial-scm.org/D1060
2017-10-15 20:36:29 -07:00
Phil Cohen
a93f277c4b filemerge: store backups in the overlayworkingctx if using imm
Differential Revision: https://phab.mercurial-scm.org/D1059
2017-10-13 12:34:22 -07:00
Phil Cohen
220e45c6d6 context: add overlayfilectx.cmp()
Differential Revision: https://phab.mercurial-scm.org/D1058
2017-10-13 12:34:22 -07:00
Phil Cohen
e16963ee65 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
2017-10-16 13:10:55 -07:00
Pulkit Goyal
aaa435b086 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
2017-09-20 04:47:43 +05:30
Pulkit Goyal
5cbb2943df 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
2017-10-16 22:19:02 +05:30
Boris Feld
735d42ba8c configitems: register acl config section 2017-10-14 01:15:01 +02:00
Boris Feld
b786ab022d configitems: register the 'extdata.*.diffargs' config 2017-10-14 00:34:46 +02:00
Boris Feld
21070510ed configitems: register the 'exdiff.opts.*' config 2017-10-14 00:33:57 +02:00
Boris Feld
9d80c5624f configitems: register the 'hostsecurity.*:verifycertsfile' config 2017-10-14 00:30:14 +02:00
Boris Feld
2c9df67473 configitems: register the 'hostsecurity.*:fingerprints' config 2017-10-14 00:29:31 +02:00
Boris Feld
3411c59c2f configitems: register the 'hostsecurity.*:ciphers' config 2017-10-14 00:28:48 +02:00
Boris Feld
a087914d79 configitems: register the 'hostsecurity.*:minimumprotocol' config 2017-10-14 00:28:13 +02:00
Boris Feld
d3073bb8e8 configitems: register the test 'fakepatchtime.fakenow' config 2017-10-14 00:16:12 +02:00
Boris Feld
3def11be1e configitems: register the test 'fakedirstatewritetime.fakenow' config 2017-10-14 00:15:37 +02:00
Boris Feld
61d4226f12 configitems: register the 'gpg' arbitraty key section 2017-10-13 23:26:16 +02:00
Boris Feld
c8ced9d060 configitems: register the 'extdata' section 2017-10-13 23:23:48 +02:00
Boris Feld
967247e8ec 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.
2017-10-13 23:33:31 +02:00
Boris Feld
9c0d9e0f57 configitems: register the test config in 'test-push-race.t' 2017-10-11 23:33:59 +02:00
Boris Feld
2451d10295 configitems: register the test 'ui.ioerrors' config 2017-10-11 04:33:00 +02:00
Boris Feld
d0602bdacc configitems: register the test 'failafterfinalize.fail' config 2017-10-13 23:53:06 +02:00
Boris Feld
a8b4456e5c configitems: register the test 'logtoprocess.foo' config 2017-10-13 23:46:37 +02:00