Commit Graph

33924 Commits

Author SHA1 Message Date
Boris Feld
470745da2b configitems: register the 'mq.plain' config 2017-06-30 03:43:16 +02:00
Boris Feld
c931b71704 configitems: register the 'mq.keepchanges' config 2017-06-30 03:43:15 +02:00
Boris Feld
96e05f8397 configitems: register the 'mq.git' config 2017-06-30 03:43:14 +02:00
Boris Feld
6c523b26e1 configitems: register the 'win32mbcs.encoding' config 2017-06-30 03:45:54 +02:00
Pulkit Goyal
a5baff1381 copytrace: move fast heuristic copytracing algorithm to core
copytrace extension in fb-hgext has a heuristic implementation of copy tracing
which is faster than the current copy tracing. The heuristic limits the search
of copies to just files that are either:

1) Renames in the same directory
2) Moved to other directory with same name

The default copytrace implementation is very slow as it finds all the new files
that were added from merge base up to the head commit and for each file it
checks whether it this was copied or moved version of a different file.

Stash@fb did analysis for the above heuristics on the fb repo and found that
among 2,443,768 moves/copies there are only 32,234 moves/copies which does not
fall under the above heuristics which is approx. 0.013 of total copies.

This patch moves the heuristics algorithm under config
`experimental.copytrace=heuristics`.

While moving fbext to core, this patch removes couple of less useful config
options named `sourcecommitlimit` and `maxmovescandidatestocheck`.

Tests are also added for the heuristics algorithm, which are basically copied
from fbext/tests/test-copytrace.t. The tests follow a pattern creating a server
repo and then cloning to a local repo to create public and draft changesets, the
distinction which will be useful in upcoming patches.

After this patch `experimental.copytrace` has the following behaviour:

1) `off`: turns off copytracing
2) `heuristics`: use the heuristic algorithm added in this patch.
3) everything else: use the full copytracing algorithm

.. feature::

   A new fast heuristic algorithm for copytracing which assumes that the files
   moves are either::
   1) Renames in the same directory
   2) Moves in other directories with same names
   You can use this algorithm by setting `experimental.copytrace=heuristics`.

Differential Revision: https://phab.mercurial-scm.org/D623
2017-09-03 03:49:15 +05:30
Boris Feld
f1a318b57c configitems: register the 'convert.svn.startrev' config 2017-06-30 03:36:46 +02:00
Boris Feld
65dddb9921 configitems: register the 'convert.svn.debugsvnlog' config 2017-06-30 03:36:36 +02:00
Boris Feld
bfd6a094b8 configitems: register the 'convert.skiptags' config 2017-06-30 03:36:28 +02:00
Boris Feld
167f67866c configitems: register the 'convert.p4.startrev' config 2017-06-30 03:36:20 +02:00
Boris Feld
84900c1583 configitems: register the 'convert.localtimezone' config 2017-06-30 03:36:00 +02:00
Boris Feld
cb1096bc89 configitems: register the 'convert.ignoreancestorcheck' config 2017-06-30 03:35:55 +02:00
Boris Feld
1f2741adc0 configitems: register the 'convert.hg.usebranchnames' config 2017-06-30 03:35:48 +02:00
Boris Feld
4b94346048 configitems: register the 'convert.hg.tagsbranch' config 2017-06-30 03:35:38 +02:00
Boris Feld
fc4e98f098 configitems: register the 'convert.hg.startrev' config 2017-06-30 03:35:29 +02:00
Boris Feld
8185f63ed5 configitems: register the 'convert.hg.sourcename' config 2017-06-30 03:35:22 +02:00
Boris Feld
0e74ab2663 configitems: register the 'convert.hg.saverev' config 2017-06-30 03:35:12 +02:00
Boris Feld
4285533e9f configitems: register the 'convert.hg.revs' config 2017-06-30 03:34:58 +02:00
Boris Feld
796bce4006 configitems: register the 'convert.hg.ignoreerrors' config 2017-06-30 03:34:49 +02:00
Boris Feld
5222300c2f configitems: register the 'convert.hg.clonebranches' config 2017-06-30 03:34:45 +02:00
Boris Feld
16cc412230 configitems: register the 'convert.git.skipsubmodules' config 2017-06-30 03:34:32 +02:00
Boris Feld
1d68ca2454 configitems: register the 'convert.git.similarity' config 2017-06-30 03:34:23 +02:00
Boris Feld
66b082d31c configitems: register the 'convert.git.saverev' config 2017-06-30 03:34:14 +02:00
Boris Feld
1f1b9ffd32 configitems: register the 'convert.git.renamelimit' config 2017-06-30 03:34:06 +02:00
Boris Feld
928c7aa1bb configitems: register the 'convert.git.remoteprefix' config 2017-06-30 03:34:00 +02:00
Boris Feld
6621aa529f configitems: register the 'convert.git.findcopiesharder' config 2017-06-30 03:33:51 +02:00
Boris Feld
6186c0bccf configitems: register the 'convert.git.extrakeys' config 2017-06-30 03:33:41 +02:00
Boris Feld
7c75720e99 configitems: register the 'convert.git.committeractions' config 2017-06-30 03:33:29 +02:00
Boris Feld
c19e6a920f configitems: register the 'convert.cvsps.mergeto' config 2017-06-30 03:33:25 +02:00
Boris Feld
ad979210fc configitems: register the 'convert.cvsps.mergefrom' config 2017-06-30 03:33:15 +02:00
Boris Feld
f6e4ab41d9 configitems: register the 'convert.cvsps.fuzz' config 2017-06-30 03:33:06 +02:00
Boris Feld
fc15e4e927 configitems: register the 'convert.cvsps.cache' config
The convert extensions has code a bit all around, but it seems simpler to use a
central declaration of options at the root first.
2017-06-30 03:32:53 +02:00
Durham Goode
f57a683d4b bundle2: move exception handling into part iterator
As part of separating the part iteration logic from the part handling logic,
let's move the exception handling to the part iterator class.

Differential Revision: https://phab.mercurial-scm.org/D705
2017-09-13 20:39:01 -07:00
Durham Goode
a46fac03a2 bundle2: move part counter to partiterator
As part of moving the part iterator logic to a separate class, let's move the
part counting logic and the output for it.

Differential Revision: https://phab.mercurial-scm.org/D704
2017-09-13 17:16:50 -07:00
Durham Goode
577e9d1779 bundle2: move part iterator a separate class
Currently, the part iterator logic is tightly coupled with the part handling
logic, which means it's hard to replace the part handling logic without
duplicating the part iterator bits.

In a future diff we'll want to be able to replace all part handling, so let's
begin refactoring the part iterator logic to it's own class.

Differential Revision: https://phab.mercurial-scm.org/D703
2017-09-13 17:16:45 -07:00
Durham Goode
b8aaeea8b3 changegroup: add source parameter to generatemanifests
Extensions, like remotefilelog, will want to look at the source of a pull when
determining what manifests to add to a changegroup. For instance, on push they
will include everything, while on pull they won't.

Differential Revision: https://phab.mercurial-scm.org/D686
2017-09-11 13:39:22 -07:00
Durham Goode
c94bd0e75c changegroup: remove changegroup dependency from revlog.addgroup
Previously revlog.addgroup would accept a changegroup and a linkmapper and use
it to iterate of the deltas. As part of untangling the revlog-changegroup
interdependency, let's move the changegroup delta iteration logic to it's own
function and pass the simple iterator to the revlog instead.

This will make it easier to introduce non-revlogs stores in the future, without
reinventing any changegroup specific logic.

Differential Revision: https://phab.mercurial-scm.org/D688
2017-09-13 10:43:44 -07:00
Durham Goode
d27ceccf8a revlog: refactor chain variable
Previously the addgroup loop would set chain to be the result of
self._addrevision(node,...). Since _addrevision now always returns the passed in
node, we can drop that behavior and just always set chain = node in the loop.

This will be useful in a future patch where we refactor the cg.deltachunk logic
to another function and therefore chain disappears entirely from this function.

Differential Revision: https://phab.mercurial-scm.org/D699
2017-09-13 10:43:16 -07:00
Mark Thomas
3dfe8fba1c scmutil: don't append .orig to backups in origbackuppath (BC)
When ui.origbackuppath is set, .orig files are stored outside of the working
copy, however they still have a .orig suffix appended to them.  This can cause
unexpected conflicts, particularly when tracked files or directories have .orig
at the end.

This change removes the .orig suffix from files stored in an out-of-tree
origbackuppath.

Test Plan:
Update and run unit tests.

Differential Revision: https://phab.mercurial-scm.org/D679
2017-09-11 17:49:49 +00:00
Phil Cohen
be35a1685b merge: move cwd-missing detection to helper functions
This will exist in two places with defered writes, so we want to avoid
duplication.

Differential Revision: https://phab.mercurial-scm.org/D626
2017-09-12 19:27:01 -07:00
Yuya Nishihara
53d5208ef2 doctest: enable tests by default on Python 3
Still several tests fail mostly because of the string issues, sigh. I'll
fix them one by one.
2017-09-03 15:09:04 +09:00
Yuya Nishihara
b2d9e161ed doctest: normalize b'', u'' and exception output on Python 3
The idea is described in the following page.

https://dirkjan.ochtman.nl/writing/2014/07/06/single-source-python-23-doctests.html

# no-check-commit
2017-08-24 22:33:28 +09:00
Yuya Nishihara
69001a6da3 doctest: coerce dict.keys() to list
Otherwise it would be printed as odict_keys([...]) on Python 3.
2017-09-03 17:33:10 +09:00
Yuya Nishihara
6de6cb029d doctest: upgrade old-style "except" clause 2017-09-03 15:16:01 +09:00
Yuya Nishihara
dcc07e5503 doctest: use print_function and convert bytes to unicode where needed 2017-09-03 14:56:31 +09:00
Yuya Nishihara
21687d1395 doctest: do not embed non-ascii characters in docstring
Since the outer docstring is parsed as a unicode on Python 3, we have to
either double-escape or construct non-ascii string from ascii string.
2017-09-03 15:47:17 +09:00
Yuya Nishihara
c7d6fe4d91 doctest: pass encoding name as system string 2017-09-03 15:42:27 +09:00
Yuya Nishihara
a20b4175e2 doctest: replace str() with bytes() 2017-09-03 14:38:58 +09:00
Yuya Nishihara
0435ef1b07 doctest: replace chr() with pycompat.bytechr() 2017-09-03 14:37:25 +09:00
Yuya Nishihara
b8768dba29 doctest: replace .iteritems() with .items() 2017-09-03 14:35:37 +09:00
Yuya Nishihara
a71f259bd2 doctest: bulk-replace string literals with b'' for Python 3
Our code transformer can't rewrite string literals in docstrings, and I
don't want to make the transformer more complex.
2017-09-03 14:32:11 +09:00