Commit Graph

6669 Commits

Author SHA1 Message Date
Durham Goode
3ae4bd8cf5 ctreemanifest: move to hgext/extlib/
Summary:
Moves ctreemanifest into hgext/extlib/. It will be built in a later
step when we add cstore to the build.

Test Plan: make local && cd tests && ./run-tests.py

Reviewers: #mercurial

Differential Revision: https://phabricator.intern.facebook.com/D6678844
2018-01-08 17:55:53 -08:00
Jun Wu
0e18bfbbfa absorb: move to hgext
Summary: Move absorb to hgext.

Test Plan: `run-tests.py -l` with empty `PYTHONPATH`.

Reviewers: durham, #mercurial

Reviewed By: durham

Differential Revision: https://phabricator.intern.facebook.com/D6678562

Signature: 6678562:1515455701:8778bc0ce54ec017483f6826a9792bebcb9464d7
2018-01-08 13:57:01 -08:00
Mark Thomas
2e81565606 fb-hgext: integrate rust libraries and extensions with setup.py
Summary:
Move the rust libraries and extensions to their new locations, and integrate
them with the hg-crew setup.py.

Test Plan: Run `python setup.py build` and verify rust extensions are built.

Reviewers: durham, #mercurial

Reviewed By: durham

Subscribers: fried, jsgf, mitrandir

Differential Revision: https://phabricator.intern.facebook.com/D6677251

Tasks: T24908724

Signature: 6677251:1515450235:920faf40babbce9b09e3283ff9ca328d1c5c51e6
2018-01-08 15:26:24 -08:00
Mark Thomas
742cd624f7 hgsql: integrate with hg-crew
Summary:
Move hgsql into the hgext directory, and the tests to tests/test-hgsql-*.

Update the tests to refer to the new places for things.

Test Plan: Run the hgsql tests and make sure they pass.

Reviewers: #sourcecontrol

Differential Revision: https://phabricator.intern.facebook.com/D6660499

Tasks: T24908724
2018-01-04 07:22:19 -08:00
Ryan McElroy
c86a557cb1 lz4revlog: internalize extension and test 2018-01-03 07:15:33 -08:00
Stanislau Hlebik
95a1b2464e remotenames: move extension into hgext 2018-01-03 06:15:47 -08:00
Phil Cohen
a7e9f6521d rebase: turn off IMM if any rebased paths match a config
Differential Revision: https://phab.mercurial-scm.org/D1787
2018-01-03 05:35:56 -08:00
Phil Cohen
cf148d3eae rebase: extract _shoulddisableimm for clarity
Differential Revision: https://phab.mercurial-scm.org/D1786
2018-01-03 05:35:56 -08:00
Phil Cohen
e7ec8549b1 rebase: log why we didn't use IMM
In preparation for adding more conditions that will disable IMM, let's make
this framework more extensible and log the reason IMM wasn't used.

The `whynotimm` variable name matches the `why_not_eden` name in
`hg/eden/__init__.py`.

Differential Revision: https://phab.mercurial-scm.org/D1785
2018-01-03 05:35:56 -08:00
Phil Cohen
770a1c2093 rebase: include the exception message when restarting IMM
This makes the underlying condition, like merge driver vs. merge tool, easier
to understand.
2018-01-03 05:35:56 -08:00
Phil Cohen
a9f9b3b3db rebase: don't take out a dirstate guard for in-memory rebase
Since IMM doesn't affect the dirstate, it's not needed, and might be faster.

Differential Revision: https://phab.mercurial-scm.org/D1745
2018-01-03 05:35:56 -08:00
Phil Cohen
f52575e3db rebase: don't run IMM if running rebase in a transaction
Some callers to rebase.rebase(), like `_moverelative` in `fbamend/movement.py`,
wrap the entire rebase call in a transaction. This raises havoc when IMM tries
to retry the rebase when it hits merge conflicts, because the abort will fail
the whole transaction, not the subset. It also fails at the end, losing any
conflict resolution, as @sid0 noticed.

The right long-term fix that @quark and I have discussed is to change the
restarting logic such that it doesn't abort at all, but simply switches between
IMM and non-IMM fluidly for each commit, which has other nice properties. In
the meantime this will do for now.

Differential Revision: https://phab.mercurial-scm.org/D1782
2018-01-03 05:35:56 -08:00
Phil Cohen
6a6ee9a8bd rebase: add trailing newline to experimental.inmemorywarning 2018-01-03 05:35:56 -08:00
Phil Cohen
acc8749802 histedit: add ui.log for action count
Differential Revision: https://phab.mercurial-scm.org/D1751
2018-01-03 05:35:56 -08:00
Phil Cohen
e2d69b3598 rebase: print experimental.inmemorywarning when rebasing IMM
Also add a metrics log that I missed.

Differential Revision: https://phab.mercurial-scm.org/D1744
2018-01-03 05:35:56 -08:00
Jun Wu
ffd3befda7 journal: use pager
journal output is long and should use a pager.

Differential Revision: https://phab.mercurial-scm.org/D1740
2018-01-03 05:35:56 -08:00
Phil Cohen
4dae6fcb4e rebase: switch ui.log calls to common style
The old style was incompatibe with the sampling extension, I think.
2018-01-03 05:35:56 -08:00
Jun Wu
25d57c4aa8 unamend: backout the core version
We need hash-preserving unamend. Therefore remove the core version.
(grafted from 86e055fbb0c974e041dbd72cd95df6e3b37a0f6b)
(grafted from 129f15c3acd81d4390212430ea6b500412bc74ab)
(grafted from fbb42eb996d5bcddac4ba4e86a915a3bc62b3e16)
2018-01-03 05:35:56 -08:00
Jun Wu
bf8f10f537 lfs: fix committing deleted files caused by 02c30db0443d
02c30db0443d (lfs: add a repo requirement for this extension once an lfs
file is committed) introduced a regression that prevents committing file
deletion.  This patch fixes that.

Differential Revision: https://phab.mercurial-scm.org/D1717
2017-12-18 14:37:00 -08:00
Matt Harbison
7164edcf32 lfs: add an experimental config to override User-Agent for the blob transfer
This will allow developers to test against various server implementations.  I
didn't put it under [devel] because it's possible that some user needs to use it
in the field.
2017-12-12 15:16:02 -05:00
Matt Harbison
43bc9eefb2 lfs: add git to the User-Agent header for blob transfers
As we were trying to transition off of the non production lfs-test-server for
further experimenting, one of the problems we ran into was interoperability.  A
coworker setup gitbucket[1] to act as the blob server, tested with git, and
passed it off to me.  But push failed with a message saying "abort: LFS server
returns invalid JSON:", and then proceeded to dump a huge HTML page to the
screen.  It turns out that it is assuming that git is the only thing that wants
to do a blob transfer, and everything else is a web browser wanting HTML.

It's only a single data point, but I suspect other things may be doing this too.
RFC7231 gives an example [2] of listing multiple products in decreasing order of
significance.  Since the standard provides for this, and since it works with the
one problematic server I found, I'm just enabling this by default for a better
UX.

There's nothing significant about the version of git chosen, other than it is
the current version.

[1] https://github.com/gitbucket/gitbucket/
[2] https://tools.ietf.org/html/rfc7231#page-46
2017-12-14 13:04:08 -05:00
Martin von Zweigbergk
0c2857a328 unamend: allow unamending if allowunstable is set
I don't see why unamend should be disallowed when allowunstable is
set. By switching to rewriteutil.precheck() we fix that and get more
consistent error messages (and some additional ones).

Differential Revision: https://phab.mercurial-scm.org/D1682
2017-12-13 17:03:39 -08:00
Phil Cohen
9531767fab rebase: add ui.log calls for whether IMM used, whether rebasing WCP
Make it a bit easy to get metrics from these.

Differential Revision: https://phab.mercurial-scm.org/D1681
2017-12-13 10:29:22 -08:00
Wojciech Lis
f2ebe55279 lfs: using workers in lfs prefetch
This significantly speeds up lfs prefetch. With fast network we are
seeing ~50% improvement of overall prefetch times
Because of worker's API in posix we do lose finegrained progress update and only
see progress when a file finished downloading.

Test Plan:
Run tests:
./run-tests.py -l test-lfs*
....
# Ran 4 tests, 0 skipped, 0 failed.
Run commands resulting in lfs prefetch e.g. hg sparse --enable-profile

Differential Revision: https://phab.mercurial-scm.org/D1568
2017-12-11 17:02:02 -08:00
Augie Fackler
96c1d16249 merge with stable 2017-12-14 16:01:28 -05:00
Boris Feld
18540b6753 histedit: preserve active branch while histediting
The branch information was properly preserved in the changeset, but the
"active" branch of the working copy could be lost (the branch of the base
being used).

Histedit used to behave properly in this regard but the case was not tested
and regressed 4 years ago in c038baa4b6f0.
2017-12-12 18:22:11 +01:00
Matt Harbison
ffc3cccdf4 convert: restore the ability to use bzr < 2.6.0 (issue5733)
This effectively conditionalizes 7ac081713920.  Some Linux distributions (like
CentOS 7) use really old versions, and the change referenced was causing
exceptions to be thrown.

Even though the deprecation warning says 'since 2.5.0', it wasn't marked as such
in 2.5.1, but is by 2.6.0.  This was tested with 2.4.2 and 2.6.0 with
PYTHONWARNINGS=::DeprecationWarning, and both paths were exercized.
2017-12-01 23:27:08 -05:00
Matt Harbison
c1ef7c5a7a largefiles: pay attention to dropped standin files when updating largefiles
Previously, the largefile for a dropped standin would be deleted here, and then
restored from the cache.  This had the effect of clobbering uncommitted changes
if a revert caused the file to be forgotten, which is not what happens with a
normal file.  Now the removal and update is skipped for dropped largefiles, and
the corresponding standin is deleted from disk.

This was noticed when working on issue5738 because the forgotten standin files
were left behind, and that changes the behavior of the next rename to that
directory.  My first attempt was to cleanup the standins before calling this.
That failed, because this function deletes the largefile if the corresponding
standin is missing.

This function is called by the revert command, merge (and therefore update), and
patch, via the scmutil.marktouched() override.  So it should be pretty narrow in
scope.

I didn't mark issue5738 as fixed because the move related issues can still
happen if the main tree and the .hglf subtree get out of sync somehow.  I don't
see an easy fix for that, but that should be an edge case.  If whoever queues
this thinks it is good enough to close out the bug and can cram it into the
summary, go for it.
2017-11-12 23:45:14 -05:00
Matt Harbison
40cf71ae24 convert: avoid wrong lfconvert defaults by moving configitems to core
The `hg lfconvert --to-normal` command uses the convert extension internally to
work its magic, but that produced devel-warn messages if the convert extension
wasn't loaded by the user.  The test in 658e7a6d93e0 (modified here) wasn't
showing the warnings because the convert extension was loaded via $HGRCPATH.
Most of the config options default to None/False, but 'hg.usebranchnames' and
'hg.tagsbranch' are supposed to default to True and 'default' respectively.

The first iteration of this was to ui.setconfig() inside lfconvert, to force the
convert extension to load.  But there really is no precedent for doing this, and
check-config complained that 'extensions.convert' isn't documented.  Yuya
suggested this alternative.

This partially backs out 448e09d8859d.
2017-11-28 23:20:08 -05:00
Gregory Szorc
53801830bd share: move config item declarations into core
These config items control share behavior that is implemented in core.
Since the functionality is implemented in core, extensions may
leverage it.

Mozilla has one such extension. And, it needs to access share.pool.
Before this patch, a devel warning regarding accessing an unregistered
config option would be issued unless the share extension were loaded.
Moving the registration of the config options to core fixes this.
2017-11-06 10:33:40 -08:00
Matt Harbison
ba66d4513f help: minor copy editing for grammar 2017-10-31 23:09:29 -04:00
Pulkit Goyal
023a6862fc children: fix the log expansion of hg children in doc
`hg log -r children()` returns `hg: parse error: missing argument`.

Differential Revision: https://phab.mercurial-scm.org/D1269
2017-10-31 06:39:38 +05:30
Yuya Nishihara
feaa3f8a8c 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.
2017-10-21 13:42:43 +09:00
Yuya Nishihara
9e02f75b4c registrar: host "dynamicdefault" constant by configitem object
This is the common pattern seen in the other registrar classes.
2017-10-21 13:13:20 +09:00
Phil Cohen
c2c53b73a1 rebase: fix for hgsubversion
5c25fe7fb1e broke something in the hgsubversion test path, causing it raise an
abort (Abort: nothing to merge) during a perfectly good rebase. I tracked it
down to this change. It's probably not hgsubversion related.

I suspect that using the same `wctx` from before the initial update causes
problems with the wctx's cached manifest property. I noticed we also sometimes
stick random gunk on the wctx object in other places (like in `copies.py`) so
it's probably best to reset it for now.

The line I added before was actually useless since we don't pass wctx to the
initial `merge.update`, so it defaults to `repo[None]`. So I just removed it.

Differential Revision: https://phab.mercurial-scm.org/D1679
2017-12-12 22:05:21 -08:00
Pulkit Goyal
431feb4f20 py3: handle keyword arguments correctly in hgext/record.py
Differential Revision: https://phab.mercurial-scm.org/D1673
2017-12-10 06:36:48 +05:30
Martin von Zweigbergk
14dfe2a25c memfilectx: make changectx argument mandatory in constructor (API)
committablefilectx has three subclasses: workingfilectx, memfilectx,
and overlayfilectx. committablefilectx takes an optional (change) ctx
instance to its constructor. If it's provided, it's set on the
instance as self._changectx. If not, that property is supposed to be
defined by the class. However, only workingfilectx does that. The
other two will have the property undefined if it's not passed in the
constructor. That seems bad to me. This patch makes the changectx
argument to the memfilectx constructor mandatory because that fixes
the failure I ran into. It seems like we should also fix the
overlayfilectx case.

Differential Revision: https://phab.mercurial-scm.org/D1658
2017-12-11 09:27:40 -08:00
Matt Harbison
241446a76e lfs: use 'ui' provided to upgrade for output, instead of stealing srcrepo's
Also spotted by Yuya.
2017-12-12 20:28:38 -05:00
Matt Harbison
207273d40a lfs: correct the directory list value returned by lfsvfs.walk()
Spotted by Yuya.
2017-12-12 20:22:38 -05:00
Phil Cohen
27591b2ae0 rebase: replace --inmemory flag with rebase.experimental.inmemory config
Differential Revision: https://phab.mercurial-scm.org/D1666
2017-12-11 22:16:13 -08:00
Phil Cohen
10f9b7c52d tests: add a simple test for in-memory rebase
This is just a very simple start, but verifies some of the basic cases of an
in-memory rebase.

Differential Revision: https://phab.mercurial-scm.org/D1652
2017-12-10 22:39:46 -08:00
Matt Harbison
3e757c482b lfs: restore the local blob store after a repo upgrade
This also ends up testing the local extension wrapping for dstrepo during
upgrade, which was fixed in f0a28956f345.
2017-12-08 00:18:30 -05:00
Matt Harbison
de1f4a0c73 lfs: override walk() in lfsvfs
In order to fix the missing lfs store after an upgrade, I attempted to walk the
store vfs to hardlink to the upgraded repo's store.  But the custom join()
clashes with the default walk() implementation.  First, 'path=None' blew up in
the regex matcher, because it wanted a string.  But even if that is fixed, the
join to walk the root of the vfs wouldn't match the required xx/xx...xx pattern.

The first cut of this was a copy/paste/tweak of the base implementation, but
this version of walk() hides the internal directories, and treats the vfs as a
flat store.  I think this makes sense because most vfs methods call join() on
input paths, which wants the simple oid format.  It also relieves the caller
from having to deal with bogus files/directories in the store.
2017-12-07 23:44:06 -05:00
Pulkit Goyal
625bb105d9 py3: handle keyword arguments correctly in hgext/largefiles/
Keys of keyword arguments must be str(unicode) on Python 3. The transformer
which we use on Python 3, appends b'' in front of each string literal, so this
may lead in KeyError or None return even when the key is present by we are using
bytes value and it's stored in unicodes. This patch and all the similar patches
handle this by either converting the keys of kwargs to bytes using
'pycompat.byteskwargs()' or adding r'' so that the transformer won't append
b''.

This next 23 patches follows the above mentioned way to handle keyword
arguments.

Differential Revision: https://phab.mercurial-scm.org/D1624
2017-12-10 02:52:48 +05:30
Boris Feld
f5e5b27971 lfs: allow to run 'debugupgraderepo' on repo with largefiles
The extensions wrap the necessary function to ensure the 'lfs' requirements
won't be dropped.

It is now possible to run `hg debugupgraderepo` on a repository with lfs.
2017-12-07 21:56:18 +01:00
Phil Cohen
c223c40a1c rebase: extract _assignworkingcopy
Slightly cleaner, and makes it easier to hook this in an extension.

Differential Revision: https://phab.mercurial-scm.org/D1617
2017-12-08 12:44:27 -08:00
Phil Cohen
56b0205ed4 rebase: disable inmemory if the rebaseset contains the working copy
As described in the comment, rebasing the working copy parent with in-memory
merge, and then updating to the new commit, isn't much faster because of the
extra overhead of uppdating. Best to leave it off in that case.

This commit makes deploying in-memory merge via an extension easier, because
you can just set `inmemory=True` based on some config or probability, and this
will turn off the cases where it's not desired.

Differential Revision: https://phab.mercurial-scm.org/D1616
2017-12-08 15:27:58 -08:00
Augie Fackler
b909a40cda highlight: eagerly discover plugin lexers while demandimport is off
Since highlight is only relevant for servers, it seems worthwhile to
just trigger this eagerly, which avoids really weird traceback
problems caused by demandimport messing with some of the lexer plugins.

Differential Revision: https://phab.mercurial-scm.org/D1619
2017-12-08 16:14:19 -05:00
Phil Cohen
13c1452d62 rebase: rerun a rebase on-disk if IMM merge conflicts arise
Differential Revision: https://phab.mercurial-scm.org/D1249
2017-12-08 12:14:38 -08:00
Phil Cohen
993b6df471 rebase: add concludememorynode(), and call it when rebasing in-memory
Differential Revision: https://phab.mercurial-scm.org/D1248
2017-12-07 22:35:43 -08:00
Phil Cohen
32f682c3c2 rebase: pass the wctx object (IMM or on-disk) to merge.update
Differential Revision: https://phab.mercurial-scm.org/D1247
2017-12-07 16:07:06 -08:00
Phil Cohen
bfa6af20ae rebase: do not update if IMM; instead, set the overlaywctx's parents
Differential Revision: https://phab.mercurial-scm.org/D1246
2017-12-07 16:07:06 -08:00
Phil Cohen
52e3fa5c0f rebase: pass wctx to rebasenode()
Differential Revision: https://phab.mercurial-scm.org/D1245
2017-12-07 16:07:06 -08:00
Eamonn Kent
9d6491620e fsmonitor: fsmonitor should send wlock notifications to watchman
The fsmonitor extension should send state-enter and state-leave
notifications to watchman when the wlock is acquired/release, respectively.
This will allow watchman and watchman subscribers to customize behavior based
on whether source control operations are occurring.

Test Plan:
Tested checkout, update and working copy changes with extension enabled.

Differential Revision: https://phab.mercurial-scm.org/D1612
2017-12-06 18:37:49 -08:00
Eamonn Kent
329a529959 fsmonitor: remove watchman transaction and working copy change notifications
Remove working copy change and transaction notifications. We were relying
upon callbacks on transaction function. This caused issues with lock ordering.
A different approach will be adopted in a subsequent commit.

Differential Revision: https://phab.mercurial-scm.org/D1611
2017-12-06 18:37:49 -08:00
Boris Feld
d36b88cc11 largefiles: allow to run 'debugupgraderepo' on repo with largefiles
The extensions wrap the necessary function to ensure the 'largefiles'
requirements won't be dropped.

It is now possible to run `hg debugupgraderepo` on a repository with largefiles.
2017-12-07 01:53:14 +01:00
Yuya Nishihara
6e8c1d0f1a configitems: register 'email.to' and 'patchbomb.to' 2017-10-20 22:25:09 +09:00
Jun Wu
b46e073ee5 fsmonitor: use nonnormalset from dirstatemap
`dirstate._nonnormalset` has been moved to `dirstate._map.nonnormalset` by
822ff2522caf (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
2017-10-18 15:42:44 -07:00
Augie Fackler
f528e201d0 convert: register missed subversion config items
Should fix the build failures on the Solaris builders.

Differential Revision: https://phab.mercurial-scm.org/D1180
2017-10-18 18:11:50 -04:00
Pulkit Goyal
b9bca507ff 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
2017-10-19 03:20:47 +05:30
Jun Wu
c0323e0c94 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
2017-10-18 15:05:03 -07:00
Gregory Szorc
9906bb3d53 fsmonitor: declare missing config options
These were added in 24a87d506bbd. 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
2017-10-18 22:54:50 +02:00
Gregory Szorc
35538a441a 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
2017-10-18 22:57:15 +02:00
Pulkit Goyal
58f03d7898 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
2017-10-18 04:31:46 +05:30
Matt Harbison
ae7841b944 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.
2017-10-17 21:48:56 -04:00
Boris Feld
4b2916f625 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
2017-10-17 16:54:31 +02:00
Phil Cohen
69f2e46a16 rebaseruntime: raise InMemoryMergeConflictsError on merge conflicts
Differential Revision: https://phab.mercurial-scm.org/D1234
2017-12-07 13:20:47 -08:00
Phil Cohen
074da72360 rebase: do not bail on uncomitted changes if rebasing in-memory
Differential Revision: https://phab.mercurial-scm.org/D1233
2017-12-07 13:20:47 -08:00
Phil Cohen
81066c4093 rebase: add the --inmemory option flag; assign a wctx object for the rebase
In the future, the --inmemory flag might be deprecated in favor of something more
intelligent (for example, always rebasing in-memory if the working copy parent
isn't in the rebaseset). But we might keep it as a way to explicitly force IMM
on or off.

Differential Revision: https://phab.mercurial-scm.org/D1232
2017-12-07 13:25:23 -08:00
Jun Wu
e7d2ff6ac8 rebase: enable multidest by default
This was intended to be done by D470. But there was a minor documentation
issue. The feature is quite usable now so it gets formally documented and
enabled.

There is no behavior change for people not using the `SRC` or `ALLSRC` in
rebase destination revset.

.. feature:: Rebase with different destination per source revision

  Previously, rebase only supports one unique destination. Now ``SRC`` and
  ``ALLSRC`` can be used in rebase destination revset to precisely define
  destination per each individual source revision.

  For example, the following command could move some orphaned changesets to
  reasonable new places so they become no longer orphaned::

    hg rebase
      -r 'orphan()-obsolete()'
      -d 'max((successors(max(roots(ALLSRC) & ::SRC)^)-obsolete())::)'

Differential Revision: https://phab.mercurial-scm.org/D1063
2017-10-13 14:08:14 -07:00
Matt Harbison
1eac95a707 lfs: introduce a user level cache for lfs files
This is the same mechanism in place for largefiles, and solves several problems
working with multiple local repositories.  The existing largefiles method is
reused in place, because I suspect that there are other functions that can be
shared.  If we wait a bit to identify more before `hg cp lfutil.py ...`, the
history will be easier to trace.

The push between repo14 and repo15 in test-lfs.t arguably shouldn't be uploading
any files with a local push.  Maybe we can revisit that when `hg push` without
'lfs.url' can upload files to the push destination.  Then it would be consistent
for blobs in a local push to be linked to the local destination's cache.

The cache property is added to run-tests.py, the same as the largefiles
property, so that test generated files don't pollute the real location.  Having
files available locally broke a couple existing lfs-test-server tests, so the
cache is cleared in a few places to force file download.
2017-12-06 22:56:15 -05:00
Matt Harbison
bb9f48ac9d largefiles: refactor _usercachedir() to allow reuse with lfs
Largefiles puts everything into a flat directory, while lfs divides files up by
creating subdirectories consisting of the first two characters of the hash.
Therefore, pointing at the largefiles cache won't work.
2017-12-05 23:08:59 -05:00
Pulkit Goyal
a0250b29d4 rewriteutil: use precheck() in uncommit and amend commands
Differential Revision: https://phab.mercurial-scm.org/D1526
2017-11-28 05:50:45 +05:30
Matt Harbison
ed55294406 lfs: enable the extension locally after converting to an 'lfs' repo
This is consistent with clone and share in the previous commits.
2017-11-26 21:14:48 -05:00
Matt Harbison
fa06b74028 lfs: enable the extension locally after sharing a repo with 'lfs' requirement
This is consistent with clone in the previous commit.
2017-11-16 21:01:21 -05:00
Matt Harbison
26786fa7df lfs: enable the extension locally after cloning a repo with 'lfs' requirement
We do the same thing on clone for the largefiles extension, as a convenience.
Similar to largefiles, it's probably safer to only enable this extension on a
per repo basis because it is trivial to add an lfs file.  And that gives the
repository some centralized VCS characteristics.
2017-11-16 20:23:20 -05:00
Augie Fackler
bfcc4b085d merge with stable 2017-12-04 11:28:29 -05:00
Boris Feld
ce5945f52a lock: use configint for 'ui.timeout' config
The ui object can do the conversion itself.
2017-11-29 21:00:02 -05:00
Pulkit Goyal
0456ca2613 unamend: drop unused vars, query after taking lock, use ctx.hex() for extras
This is the followup of review on D821.

Differential Revision: https://phab.mercurial-scm.org/D1579
2017-12-03 00:29:51 +05:30
Pulkit Goyal
6d1ddd1aef py3: use bytes in place of basestring
All strings in mercurial must be bytes so we can easily replace basestring with
bytes.

Differential Revision: https://phab.mercurial-scm.org/D1555
2017-12-01 16:53:55 +05:30
Gregory Szorc
58c39c1c8d py3: use byteskwargs in sparse.py
This removes several dozen failures in Python 3.

Differential Revision: https://phab.mercurial-scm.org/D1482
2017-11-20 23:23:10 -08:00
Kevin Bullock
c86342f882 merge with stable 2017-12-01 15:21:05 -06:00
Pulkit Goyal
c4428f695a uncommit: unify functions _uncommitdirstate and _unamenddirstate to one
The _unamenddirstate() function was inspired by _uncommitdirstate() function as
the logic was same but we were unable to use the latter function directly. So
previous patch introduced the _unamenddirstate() function and now this patch
unifies both the function and we have a _fixdirstate() function.

Adding function in previous patch and unifying in a later patch makes the
reasoning easier and also leaves the last patch dedicated to what it is meant to
be.

Differential Revision: https://phab.mercurial-scm.org/D971
2017-10-06 04:17:36 +05:30
Pulkit Goyal
9e302c97ba unamend: move fb extension unamend to core
unamend extension adds an unamend command which undoes the effect of the amend
command. This patch moves the unamend command from that extension to uncommit
extension and this one does not completely undoes the effect of amend command as
it creates a new commit, rather than reviving the old one back.

This also adds tests for the same.

.. feature::

   A new unamend command in uncommit extension which undoes the effect of the
   amend command by creating a new changeset which was there before amend and
   moving the changes that were amended to the working directory.

Differential Revision: https://phab.mercurial-scm.org/D821
2017-09-24 00:56:52 +05:30
Matt Harbison
aa082f0ff7 largefiles: explicitly set the source and sink types to 'hg' for lfconvert
I stumbled into this prior to adding the type indicator on the source and sink,
but there's no reason to try to infer the types for this conversion.
2017-11-23 01:21:10 -05:00
Matt Harbison
0a5e6b5a69 lfs: add a repo requirement for this extension when converting to lfs
This covers both the vanilla repo -> lfs repo and largefiles -> lfs conversions.
The largefiles extension adds the requirement directly, because it has a
dedicated command to convert.  Using the convert extension is better, because it
supports more features.

I'd like ideas about how to ensure that converting away from lfs works on all
files.  (See comments in test-lfs.t)
2017-11-22 22:38:50 -05:00
Matt Harbison
2583a8e324 convert: allow the sink object to be wrapped when the extension isn't loaded
The next patch will wrap the conversion code, in order to write out a
requirement for 'lfs' when appropriate.  Wrapping convcmd.convertsink() in an
afterloaded callback works fine when the convert extension is enabled by the
user.  The problem here is that lfconvert uses the convert extension, whether or
not it was formally enabled by the user.

My first attempt was to have lfs install an afterloaded callback that would wrap
the convert sink if convert was loaded, or wrap lfconvert if it wasn't.  Then
the lfconvert override could install an afterloaded callback to try wrapping the
convert sink again, before calling the original lfconvert.  But that breaks down
if largefiles can't load the convert extension on the fly. [1]  Further, some
tests were failing with an error indicating that the size of the afterloaded
list changed while iterating it.

Yuya mentioned that maybe some bits of convert could be moved into core, but I'm
not sure where to draw that line.  The convertsink() method depends on the list
of sinks, which in turn depends on the sink classes.

[1] https://www.mercurial-scm.org/pipermail/mercurial-devel/2017-November/108038.html
2017-11-26 14:59:39 -05:00
Matt Harbison
f73ca1dafd convert: save an indicator of the repo type for sources and sinks
This seems like basic info to have, and will be used shortly when deciding
whether or not to wrap the class for lfs conversions.

The other option is to just add a function to each class.  But this seems better
in that the strings aren't duplicated, and the constructor for most of these
will run even if the VCS isn't installed, so it's easier to catch errors.
2017-11-22 20:49:01 -05:00
Matt Harbison
ed0e86ccdb lfs: add a repo requirement for this extension once an lfs file is committed
Largefiles does the same thing (also delayed until the first largefile commit),
to prevent access to the repo without the extension.  In the case of this
extension, not having the extension loaded while accessing an lfs file results
in cryptic errors about "missing processor for flag '0x2000'".  If enabled
locally but not remotely, the cryptic error message is about no common
changegroup version.  (It wants '03', which is currently experimental.)

The largefiles extension looks for any tracked file that starts with '.hglf/'.
Unfortunately, that doesn't work here.  I didn't see any way to get the files
that were just committed, without doing a full status.  But since there's no
secondary check on adding an lfs file once the extension is loaded and a
threshold set, the best practice is to only enable this locally on a repo that
needs it.  That should minimize the unnecessary overhead for repos without an
lfs file.
2017-11-15 23:43:15 -05:00
Augie Fackler
da28f5be4e merge with stable 2017-11-30 15:48:42 -05:00
Pulkit Goyal
ad73ed1dae py3: make sure the first argument of time.strftime() is str
time.strftime() does not accepts bytes as its first argument on py3.

Differential Revision: https://phab.mercurial-scm.org/D1559
2017-11-29 08:44:06 +05:30
Boris Feld
fe39de3207 fsmonitor: issue debug messages when we fall back to core status
Having more information about when and why fsmonitor bails out help when
looking into status performance.
2017-11-28 11:00:54 -05:00
Pulkit Goyal
134a289843 py3: add b'' to regular expressions which are raw strings
Differential Revision: https://phab.mercurial-scm.org/D1538
2017-11-29 04:47:27 +05:30
Pulkit Goyal
0b80228ebd histedit: add support to output nodechanges using formatter
The JSON output of nodechanges will help in automation and to improve editor
integrations such as for Nuclide.

Differential Revision: https://phab.mercurial-scm.org/D1348
2017-10-28 19:03:23 +05:30
Pulkit Goyal
04f1e48a0d rebase: use fm.formatlist() and fm.formatdict() to support user template
Thanks to Yuya for suggesting this in D1173.

Differential Revision: https://phab.mercurial-scm.org/D1293
2017-10-28 17:50:25 +05:30
Matt Harbison
37ca95c067 lfs: register config options
I'm not sure at what point we can get rid of the deprecated options, but for the
sake of making progress, they are registered too.
2017-11-14 01:03:22 -05:00
Matt Harbison
79bbdb4ae3 lfs: quiesce check-module-import warnings
Specifically, 'symbol import follows non-symbol import: mercurial.i18n'
2017-11-14 00:14:52 -05:00
Matt Harbison
85811b33f9 lfs: import the Facebook git-lfs client extension
The purpose of this is the same as the built-in largefiles extension- to handle
huge files outside of the normal storage system, generally to keep the amount of
data cloned to a lower amount.  There are several benefits of implementing the
git-lfs protocol, instead of using the largefiles extension:

  - Bitbucket and Github support (and probably wider support in 3rd party
    hosting sites in general). [1][2]

  - The number of hg internals monkey patched are several orders of magnitude
    lower, so it will be easier to reason about and maintain.  Future commands
    will likely just work, without requiring various wrappers.

  - The "standin" files are only written to the filelog, not the disk.  That
    should avoid weird edge cases where the largefile and standin files get out
    of sync. [3]  It also avoids the occasional printing of the "hidden" standin
    file in various messages.

  - Filesets like size() will work, even if the file isn't present.  (It always
    says 41 bytes for largefiles, whether present or not.)

The only place that I see where largefiles comes out on top is that it works
with `hg serve` for simple sharing, without external infrastructure.  Getting
lfs-test-server working was a hassle, and took awhile to figure out.  Maybe we
can do something to make it work in the future.

Long term, I expect that this will be highly preferred over largefiles.  But if
we are to recommend this to largefile users, there are some UI issues to
bikeshed.  Until they are resolved, I've marked this experimental, and am not
putting a pointer to this in the largefiles help.  The (non exhaustive) list of
issues I've seen so far are:

  - It isn't sufficient to just enable the largefiles extension- you have to
    explicitly add a file with --large before it will pay attention to the
    configured sizes and patterns on future adds.  The justification being that
    once you use it, you're stuck with it.  I've seen people confused by this,
    and haven't liked it myself.  But it's also saved me a few times.  Should we
    do something like have a specific enabling config setting that must be set
    in the local repo config, so that enabling this extension in the user or
    system hgrc doesn't silently start storing lfs files?

  - The largefiles extension adds a repo requirement when the first largefile is
    committed, so that the extension must always be enabled in the future.  This
    extension is not doing that, and since I only enabled it locally to avoid
    infecting other repos, I got a cryptic error about missing flag processors
    when I cloned.  Is there no repo requirement due to shallow/narrow clone
    considerations (or other future advanced things)?

  - In the (small amount of) reading I've done about the git implementation, it
    seems that the files and sizes are stored in a tracked .gitattributes file.
    I think a tracked file for this would be extremely useful for consistency
    across developers, but this kind of touches on the tracked hgrc file
    proposal a few months back.

  - The git client can specify file patterns, not just sizes.

  - The largefiles extension has a cache directory in the local repo, but also a
    system wide one.  We should probably implement a system wide cache too, so
    that multiple clones don't have to refetch the files from the server.

  - Jun mentioned other missing features, like SSH authentication, gc, etc.

The code corresponds to c0492b73c7ef in hg-experimental. [4]  The only tweaks
are to load the extension in the tests with 'lfs=' instead of
'lfs=$TESTDIR/../hgext3rd/lfs', change the import in the *.py test to hgext
(from hgext3rd), add the 'testedwith' declaration, and mark it experimental for
now.  The infinite-push, p4fastimport, and remotefilelog tests were left behind.

The devel-warnings for unregistered config options are not corrected yet, nor
are the import check warnings.

[1] https://www.mercurial-scm.org/pipermail/mercurial/2017-November/050699.html
[2] https://bitbucket.org/site/master/issues/3843/largefiles-support-bb-3903
[3] https://bz.mercurial-scm.org/show_bug.cgi?id=5738
[4] https://bitbucket.org/facebook/hg-experimental
2017-11-14 00:06:23 -05:00
Mark Thomas
286eb36174 fsmonitor: only access inner dirstate map if it is available
As part of the dirstate refactor, fsmonitor was updated to directly access the
inner map of the dirstatemap object.

Dirstatemap reimplementations may not use a map like this, so only access it if
it is there.

Differential Revision: https://phab.mercurial-scm.org/D1346
2017-11-15 01:07:42 -08:00
Mark Thomas
c35820b286 dirstate: add explicit methods for querying directories (API)
The set-like object returned by dirstate.dirs may be difficult for other
implementations of the dirstate to provide, and is unnecessary as it is
only ever used for __contains__.  Instead, provide an explicit method for
testing for a directory.

.. api::

   dirstate no longer provides a `dirs()` method.  To test for the existence of
   a directory in the dirstate, use `dirstate.hasdir(dirname)`.

Differential Revision: https://phab.mercurial-scm.org/D1345
2017-11-15 01:07:42 -08:00
Boris Feld
0d556fd8d6 logtoprocess: clean-up old comment
The comment was likely to be for runshellcommand code.

Differential Revision: https://phab.mercurial-scm.org/D1425
2017-11-03 21:01:20 +01:00
Denis Laxalde
be2630530f rebase: exclude descendants of obsoletes w/o a successor in dest (issue5300)
.. feature::

   Let 'hg rebase' avoid content-divergence by skipping obsolete
   changesets (and their descendants) when they are present in the rebase
   set along with one of their successors but none of their successors is
   in destination.

In the following example, when trying to rebase 3:: onto 2, the rebase
will abort with "this rebase will cause divergence from: 4":

    o  7 f
    |
    | o  6 e
    | |
    | o  5 d'
    | |
    x |  4 d (rewritten as 5)
    |/
    o  3 c
    |
    | o  2 x
    | |
    o |  1 b
    |/
    o  0 a

By excluding obsolete changesets without a successor in destination (4
in the example above) and their descendants, we make rebase work in this
case, thus giving:

    o  11 e
    |
    o  10 d'
    |
    o  9 c
    |
    o  8 b
    |
    | o  7 f
    | |
    | | x  6 e (rewritten using rebase as 11)
    | | |
    | | x  5 d' (rewritten using rebase as 10)
    | | |
    | x |  4 d
    | |/
    | x  3 c (rewritten using rebase as 9)
    | |
    o |  2 x
    | |
    | x  1 b (rewritten using rebase as 8)
    |/
    o  0 a

where branch 4:: is left behind while branch 5:: is rebased as expected.

The rationale is that users may not be interested in rebasing orphan
changesets when specifying a rebase set that include them but would
still want "stable" ones to be rebased. Currently, the user is suggested
to allow divergence (but probably does not want it) or they must specify
a rebase set excluding problematic changesets (which might be a bit
cumbersome). The approach proposed here corresponds to "Option 2" in
https://www.mercurial-scm.org/wiki/CEDRebase.


We extend _computeobsoletenotrebased() so that it also return a set of
obsolete changesets in rebase set without a successor in destination but
with at least one successor in rebase set. This
'obsoletewithoutsuccessorindestination' is then stored as an attribute
of rebaseruntime and used in _performrebasesubset() to:

* filter out descendants of these changesets from the revisions to
  rebase;
* issue a message about these revisions being skipped.

This only occurs if 'evolution.allowdivergence' option is off and
'rebaseskipobsolete' is on.
2017-11-14 22:46:10 +01:00
Pulkit Goyal
a4ac6fb7f7 py3: handle keyword arguments correctly in hgext/patchbomb.py
The keys of keyword arguments must be str on Python 3 which is unicode. This
patch make sure we pass keyword arguments with keys are str everywhere in this
file and access the keys depending on whether they are bytes or str.

This patch uses pycompat.{byteskwargs|strkwargs} and somewhere it also added r''
to prevent transformer from adding a b'' over there.

Differential Revision: https://phab.mercurial-scm.org/D974
2017-10-06 05:47:56 +05:30
Pulkit Goyal
6f6b384e3b py3: handle keyword arguments in hgext/shelve.py
Differential Revision: https://phab.mercurial-scm.org/D1324
2017-10-23 00:06:49 +05:30
Pulkit Goyal
5fe15c38d8 py3: handle keyword arguments in hgext/uncommit.py
Differential Revision: https://phab.mercurial-scm.org/D1323
2017-10-23 00:06:23 +05:30
Pulkit Goyal
e280703a0a py3: handle keyword arguments in hgext/releasenotes.py
Differential Revision: https://phab.mercurial-scm.org/D1322
2017-10-23 00:05:04 +05:30
Pulkit Goyal
08c0fc04ca py3: handle keyword arguments in hgext/rebase.py
Differential Revision: https://phab.mercurial-scm.org/D1321
2017-10-23 00:04:47 +05:30
Pulkit Goyal
f0a43ec691 py3: handle keyword arguments in hgext/keyword.py
Differential Revision: https://phab.mercurial-scm.org/D1320
2017-10-23 00:04:30 +05:30
Pulkit Goyal
31603eadc3 py3: handle keyword arguments in hgext/journal.py
Differential Revision: https://phab.mercurial-scm.org/D1319
2017-10-23 00:04:12 +05:30
Pulkit Goyal
efe36fbe83 py3: handle keyword arguments in hgext/histedit.py
Differential Revision: https://phab.mercurial-scm.org/D1318
2017-10-23 00:03:54 +05:30
Pulkit Goyal
fd754ab7dc py3: handle keyword arguments in hgext/hgk.py
Differential Revision: https://phab.mercurial-scm.org/D1317
2017-10-23 00:03:27 +05:30
Pulkit Goyal
845caba95e py3: handle keyword arguments in hgext/graphlog.py
Differential Revision: https://phab.mercurial-scm.org/D1316
2017-10-23 00:03:08 +05:30
Augie Fackler
7ed032e935 merge with stable 2017-11-07 13:18:49 -05:00
Pulkit Goyal
9fb4bb6283 py3: handle keyword arguments in hgext/gpg.py
Differential Revision: https://phab.mercurial-scm.org/D1303
2017-10-23 00:02:46 +05:30
Pulkit Goyal
f646cb1b70 py3: handle keyword arguments in hgext/fetch.py
Differential Revision: https://phab.mercurial-scm.org/D1302
2017-10-23 00:02:28 +05:30
Pulkit Goyal
be6fd0b74f py3: handle keyword arguments in hgext/extdiff.py
Differential Revision: https://phab.mercurial-scm.org/D1301
2017-10-23 00:02:07 +05:30
Pulkit Goyal
16be3e241c py3: handle keyword arguments in hgext/commitextras.py
Differential Revision: https://phab.mercurial-scm.org/D1300
2017-10-23 00:01:45 +05:30
Pulkit Goyal
dedd37591e py3: handle keyword arguments in hgext/churn.py
Differential Revision: https://phab.mercurial-scm.org/D1299
2017-10-23 00:01:16 +05:30
Pulkit Goyal
b73fb45eb6 py3: handle keyword arguments in hgext/children.py
Differential Revision: https://phab.mercurial-scm.org/D1298
2017-10-22 23:53:10 +05:30
Pulkit Goyal
d9d265019d py3: handle keyword arguments in hgext/blackbox.py
Differential Revision: https://phab.mercurial-scm.org/D1297
2017-10-22 23:52:47 +05:30
Pulkit Goyal
6b74a599aa py3: handle keyword arguments in hgext/automv.py
Differential Revision: https://phab.mercurial-scm.org/D1296
2017-10-22 23:52:22 +05:30
Pulkit Goyal
d47e0831af py3: handle keyword arguments in hgext/amend.py
Differential Revision: https://phab.mercurial-scm.org/D1295
2017-10-22 23:51:57 +05:30
Yuya Nishihara
bfa2981528 rebase: drop --style option
It existed from the very start, but I don't think the rebase command does
support log-like templates.
2017-10-21 17:01:20 +09:00
Boris Feld
ad5f3bc109 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.
2017-10-13 23:00:31 +02:00
Boris Feld
0e5c2b08a6 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.
2017-10-14 01:09:46 +02:00
Boris Feld
b0d5f7ccc5 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.
2017-10-14 01:16:03 +02:00
Matt Harbison
408a3898be 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.
2017-10-15 22:48:02 -04:00
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
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
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
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
61d4226f12 configitems: register the 'gpg' arbitraty key section 2017-10-13 23:26:16 +02:00
Boris Feld
d38259843c configitems: register the 'patchbomb.reply-to' config 2017-10-13 23:07:12 +02:00
Boris Feld
489752f86a configitems: register the 'patchbomb.cc' config 2017-10-13 23:07:01 +02:00
Boris Feld
7234c65233 configitems: register the 'patchbomb.bcc' config 2017-10-13 23:06:40 +02:00
Boris Feld
25a39ffc75 configitems: register the 'experimental.uncommitondirtywdir' config 2017-10-12 00:38:18 +02:00
Boris Feld
d847182da0 configitems: register the 'largefiles.usercache' config 2017-10-13 22:28:03 +02:00
Boris Feld
d27c61d243 configitems: register the 'largefiles.patterns' config 2017-10-13 22:26:58 +02:00
Boris Feld
db9ee41794 configitems: register the 'largefiles.minsize' config 2017-10-13 22:26:03 +02:00
Boris Feld
c15cf4e6bc configitem: register the 'notify.changegroup' config 2017-10-13 21:50:43 +02:00
Boris Feld
780b696856 configitem: register the 'notify.outgoing' config 2017-10-13 21:50:32 +02:00
Boris Feld
b51ae612da configitem: register the 'notify.incoming' config 2017-10-12 00:57:49 +02:00
Boris Feld
a6e5ad0857 configitems: register the 'blackbox.maxfiles' config 2017-10-11 22:51:23 +02:00