Commit Graph

2960 Commits

Author SHA1 Message Date
Jun Wu
2dc367dac3 inhibitwarn: nuke the extension
Summary:
We are going to remove evolve and inhibit. So the warning is no longer
useful.

Test Plan: arc unit

Reviewers: #mercurial, ikostia

Reviewed By: ikostia

Subscribers: ikostia, mjpieters, medson

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

Signature: t1:5254984:1497518474:80649544fef3aee90bf9a407d45ddeb9f6d85dba
2017-06-16 14:40:31 -07:00
Jun Wu
d06133e837 fbamend: backport prune
Summary:
Backport the prune command and its strip wrapper from mutable-history changeset
cb0d62ed5e2a using GPL2 license.

There are some adjustments to make the ported code work well with existing
code better, namely:

  - Add a `safestrip` option to control whether `strip` is replaced to `prune`
    or not.


Test Plan: arc unit

Reviewers: #mercurial, ikostia

Reviewed By: ikostia

Subscribers: mjpieters, medson

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

Signature: t1:5254961:1497518704:91b200bf791297ff797cc0ff28ab31d7eb294963
2017-06-16 14:39:04 -07:00
Jun Wu
2852dabbc8 fbamend: merge fbmetaedit
Summary:
Merge fbmetaedit which uses a fast path to change commit messages.

Make fbmetaedit a no-op.

Test Plan: arc unit

Reviewers: #mercurial, mitrandir

Reviewed By: mitrandir

Subscribers: mjpieters, medson

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

Signature: t1:5254867:1497524975:c7cc3ad9d1162332fbdd665eb5a2f6d7ce87a585
2017-06-16 14:12:32 -07:00
Jun Wu
87b248dd27 fbamend: backport metaedit command
Summary:
Backport the metaedit command and its test from mutable-history changeset
cb0d62ed5e2a using GPL2 license.

There are some adjustments to make the ported code work well with existing
code better, namely:

  - Removed allowunstable check to simplify the code.
  - Make "nothing changed" return 1.
  - Minor i18n and check code fixes.

Note: this backport does not include fbmetaedit changes.

Test Plan: arc unit

Reviewers: #mercurial, mitrandir

Reviewed By: mitrandir

Subscribers: mjpieters, medson

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

Signature: t1:5254807:1497524996:abf856dc9bb8225316ca6c17f41ffa2c9d8d9964
2017-06-16 14:11:43 -07:00
Jun Wu
04579ab177 fbmetaedit: do not assume evolve provides metaedit
Summary: This is temporary as fbmetaedit will be merged into fbamend.

Test Plan: arc unit

Reviewers: #mercurial, ikostia

Reviewed By: ikostia

Subscribers: mjpieters, medson

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

Signature: t1:5254803:1497520047:2c6eb22ce8cb80e4c785fd0b82311706487f6c7e
2017-06-16 14:07:02 -07:00
Jun Wu
c7c3280b44 fbamend: backport fold command
Summary:
Backport the fold command and its dependencies (`rewrite`) from mutable-history
changeset cb0d62ed5e2a using GPL2 license.

There are some adjustments to make the ported code work well with existing
code better, namely:

 - The `--norebase` flag was renamed as `--no-rebase` and moved to the
   backported command so we no longer wrap the split command.
 - Rebase now runs inside a same transaction.
 - `bookmarksupdater` now accepts multiple revs so bookmarks on all changesets
   being folded will be updated correctly. It is a bugfix to the ported code.

Test Plan:
`arc unit`.
Some tests are changed. It seems the new behavior looks better.

Reviewers: #mercurial, ikostia

Reviewed By: ikostia

Subscribers: ikostia, mjpieters, medson

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

Signature: t1:5254681:1497520003:f7ec3622286804fead059ab9a8021bb8f3067e64
2017-06-16 14:06:24 -07:00
Jun Wu
020ff84b79 fbamend: backport split command
Summary:
Backport the split command and its dependencies (namely, `bookmarksupdater`)
from mutable-history changeset cb0d62ed5e2a using GPL2 license.

There are some adjustments to make the ported code work well with existing
code, namely:

 - The `--norebase` flag was renamed as `--no-rebase` and moved to the
   backported command so we no longer wrap the split command.
 - Rebase now runs inside a same transaction.

The glob change in tests is because `(tip)` shows up.


Test Plan: arc unit

Reviewers: #mercurial, ikostia

Reviewed By: ikostia

Subscribers: ikostia, mjpieters, medson

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

Signature: t1:5254544:1497519470:fe8a7308b35b578fd4f1257cebba15062e752c2f
2017-06-16 13:59:12 -07:00
Jun Wu
08e9bc0bbf fbamend: make restack take inhibithack
Summary:
This hack is needed to make split + rebase work well inside a same transaction.

inhibit does special things at the end of a transaction which may override deinhibit.
Sometimes we want deinhibit to override the transaction close handler.

The hack will be removed once inhibit gets removed.

Test Plan: arc unit

Reviewers: #mercurial, ikostia

Reviewed By: ikostia

Subscribers: ikostia, mjpieters, medson

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

Signature: t1:5254517:1497519294:89b6de077514252c42fb128760cf9f9241180242
2017-06-16 13:55:29 -07:00
Jun Wu
30b417ea27 allowunstable: do not assume evolve provides split and fold
Summary:
split and fold will be backported and removed from evolve. So do not assume
evolve provides them.

Test Plan: Not breaking existing tests

Reviewers: #mercurial, ikostia

Reviewed By: ikostia

Subscribers: mjpieters, medson

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

Signature: t1:5254455:1497519005:aca0373cc61ca5438cee1c9d85f2df77f33d8455
2017-06-16 13:54:03 -07:00
Jun Wu
edf220db3a inhibit: allow _deinhibitmarkers inside a transaction
Summary:
inhibit hacks transactioncallback so _deinhibitmarkers might be ineffective
inside a transaction. This diff adds a flag to allow _deinhibitmarkers
effective inside a transaction. It will be used by the split backport.

Test Plan: No new test being added since inhibit is a hack and is going to be removed.

Reviewers: #mercurial, ikostia

Reviewed By: ikostia

Subscribers: mjpieters, medson

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

Signature: t1:5254416:1497519161:b01f3fa59004ded5beaf5dcfc7d18eb2b5227130
2017-06-16 13:52:29 -07:00
Jun Wu
200a9b16fb fbamend: implement successors and precursors revsets
Summary:
We are depending on `allprecursors` and `allsuccessors` revsets in multiple
places. Re-implement them in fbamend.

Also reimplement `successors` and `precursors` since they are used by some
other code.

Test Plan: arc unit

Reviewers: #mercurial, ikostia

Reviewed By: ikostia

Subscribers: mjpieters, medson

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

Signature: t1:5254403:1497519041:8c6f001a6acf8056b5f795575b42922a476ac34b
2017-06-16 13:48:14 -07:00
Jun Wu
fef5e81c64 test-check: do not trust system hg
Summary:
This diff removes "unset HGRCPATH" to try to run tests in a more
controlled environment. And skip the test if system HG looks broken.

Test Plan: arc unit

Reviewers: simpkins, #mercurial, stash

Reviewed By: stash

Subscribers: net-systems-diffs@fb.com, mjpieters, medson

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

Signature: t1:5263484:1497604378:28ec94c33ba77680c8d2325a8fa36457e0eb8c91
2017-06-16 10:57:52 -07:00
Jun Wu
7e8b62aef6 lfs: add retry logic for transferring a single object
Summary:
We got TCP RESETs frequently. It's hard to pinpoint the root cause so let's
just add retry for now.

Test Plan: eyes

Reviewers: #mercurial, #ovrsource_warroom, steaphan

Reviewed By: steaphan

Subscribers: steaphan, mjpieters, medson

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

Tasks: 19419154

Signature: t1:5265928:1497635499:17cf5d5cb69b406330326d693a9eceb1d22861f8
2017-06-16 10:54:07 -07:00
Jun Wu
e271251a2b setup: fix linelog build on Windows
A wrong change was mistakenly committed.
2017-06-16 10:25:28 -07:00
Jun Wu
9e364a3220 cython: check-in generated c/cpp code from cython
Summary:
This removes Cython as a build dependency as requested by our users.

Added a test to prevent check-in files with `/home/`.

Modified check-code to skip checking Cython generated files.

Test Plan:
Run `make clean local` with Cython installed and uninstalled.

Also run `make clean local` with `USECYTHON=1` and `0`.

Reviewers: #mercurial, mitrandir

Reviewed By: mitrandir

Subscribers: mjpieters, medson

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

Signature: t1:5252935:1497525190:402798077d44e39e24fcb037535ec7ffd1af9c4b
2017-06-15 12:55:17 -07:00
Jun Wu
3556ad01c5 fbamend: rename conflicted evolve commands instead of removing them
Summary: This unbreaks `experimental.evolutioncommands`.

Test Plan: arc unit

Reviewers: #mercurial, durham

Reviewed By: durham

Subscribers: mjpieters, medson

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

Signature: t1:5256903:1497547902:9af6930776fc272db0c7d1bbfca2f4e76342255a
2017-06-15 10:35:28 -07:00
Felix Merk
88a744be9e smartlog: let smartlog revset take recentday argument
Summary: Add an optional `recentdays` parameter to smartlog revset.

Test Plan: Added test to test-smartlog.t

Reviewers: #mercurial, durham, quark

Reviewed By: quark

Subscribers: durham, stash, mjpieters, medson

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

Tasks: 19179819

Signature: t1:5211513:1497487196:f7d59ec32c09680ed769977890f3031369f7652e
2017-06-15 10:06:09 -07:00
Stanislau Hlebik
0d9f759213 infinitepush: add debugfillinfinitepushmetadata method
Summary:
Special command that fills optional metadata about infinitepush nodes. For now
it's info about changed files + info about how many lines were
added/removed. Since information is saved in json format it's easily
extensible.

It's a separate command so that we will be able to run it asynchronously:
during infinitepush push separate `hg debugfillinfinitepushmetadata` process
will be started. Push process won't wait for `debugfillinfinitepushmetadata`
process.

sqlindexapi will be implemented in the next diffs.

Test Plan: arc unit

Reviewers: #mercurial, quark

Reviewed By: quark

Subscribers: quark, mjpieters, medson, azich, #sourcecontrol

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

Tasks: 19103180

Signature: t1:5237547:1497397211:569d1ffe3be37c8d14fb7e07e42cd085ad5686d4
2017-06-15 05:19:37 -07:00
Stanislau Hlebik
6c09d4ce19 rage: add a hack to make rage work on osx
Summary: Add a config option to specify rpm binary

Test Plan: arc unit

Reviewers: #mercurial, quark, ikostia, luk

Reviewed By: ikostia, luk

Subscribers: luk, mjpieters, medson, #sourcecontrol

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

Tasks: 19361425

Signature: t1:5255174:1497518216:d78a66e27a1073921f06d9dd0e7036bab3e4010a
2017-06-15 04:20:52 -07:00
Stanislau Hlebik
31e9c3d80b copytrace: fix logging
ctx.node() is None, so it's bettter to use ctx.hex()
2017-06-15 04:08:49 -07:00
Stanislau Hlebik
39c7c58e93 infinitepush: make sure infinitepush works well with gitlookup
Summary:
Previously infinitepush lookup function didn't call original lookup function.
It made it impossible to work with extension like gitlookup that also
overwrite lookup. This diff fixes it.

Test Plan: arc unit

Reviewers: #mercurial

Subscribers: #sourcecontrol

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

Tasks: 17733144
2017-06-15 02:44:27 -07:00
Stanislau Hlebik
55969ebfa3 infinitepush: update schema
Summary:
Let's add a special field that would store arbitrary metadata in json format.
It can be used to store, for example, lists of changes files, file diffs etc.

Depends on D5236375

Test Plan: arc unit

Reviewers: #mercurial, azich

Subscribers: #sourcecontrol

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

Tasks: 19103180
2017-06-15 02:36:40 -07:00
Felix Merk
5c4ff4f39f tweakdefaults: add --inactive flag to update command
Summary:
People want update to optionally not activate a bookmark.
This diff adds an `--inactive` flag to do that.

Test Plan: Added test-update-i.t

Reviewers: durham, #mercurial, quark

Reviewed By: quark

Subscribers: mitrandir, mjpieters, medson, durham, akushner, quark

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

Tasks: 8097957

Signature: t1:5228552:1497396566:16322e1a2dfdab30a213ddc37cbde4fc71bffcc0
2017-06-14 16:42:39 -07:00
Olivier Trempe
7b57890313 pushrebase: make pretxnchangegroup and changegroup hook arguments consistent with mercurial hook documentation
Before this patch, the pretxnchangegroup 'node' argument would be the last
added node whereas mercurial documention specifies that it should be the first
new changeset. The 'node_last' argument has also been added to both
pretxnchangegroup and changegroup hooks as per mercurial documentation.
2017-06-14 16:29:16 -07:00
Olivier Trempe
e08fcc30c1 test-pushrebase: Enhance test to bring out hook arguments inconsistency in pretxnchangegroup hook
The 'node' argument points to the last new changeset. Mercurial documentation
state that it should be the first new changeset.

This will be fixed with the following changeset
2017-06-14 16:29:16 -07:00
Olivier Trempe
602a765fe6 pushrebase: bring variable initialization closer to first usage 2017-06-14 16:29:16 -07:00
Durham Goode
69a5078ba6 treemanifest: enable minimal downloading for on demand downloads
Summary:
Previously, if a tree needed to be downloaded on demand (like during hg
show), it would download the entire tree. With this patch, we look backwards in
the changelog for a tree we already have and then download only the new parts of
the tree.

Test Plan:
The existing demanddownload test changed because of this. I've added
more output to the test to show that only new items are downloaded (to be
specific subdir/ is not downloaded again since it did not change).

Reviewers: #mercurial, quark

Reviewed By: quark

Subscribers: quark, mjpieters, medson

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

Signature: t1:5210268:1497299426:195517184d53396849d0ba8c75216d07741e5863
2017-06-13 17:31:47 -07:00
Jun Wu
8d58d00052 fbamend: move restack to a separate file
Summary: This makes `__init__.py` smaller.

Test Plan: arc unit

Reviewers: #mercurial, durham

Reviewed By: durham

Subscribers: mjpieters, medson

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

Signature: t1:5223421:1497387183:9ce70419c3c63ca55f1a225192ae7a6556316ea3
2017-06-13 17:09:34 -07:00
Jun Wu
3ab3ee018a fbamend: move next, previous to a movement.py
Summary:
Move movement commands (next, previous) to `movement.py`. Some common utilities
were moved to `common.py`. I did some minor cleanups on the help output.

Test Plan: arc unit

Reviewers: #mercurial, ikostia

Reviewed By: ikostia

Subscribers: mjpieters, medson

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

Signature: t1:5222981:1497265815:5dbba53fe7a16dbf924898331496a5c50b54b9f2
2017-06-13 17:09:16 -07:00
Jun Wu
e1f58d87e3 fbamend: move unamend to a separate file
Summary:
Going to split fbamend into individual files by commands. `unamend` seems
self-contained to be moved out.

Test Plan: arc unit

Reviewers: #mercurial, ikostia

Reviewed By: ikostia

Subscribers: mjpieters, medson

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

Signature: t1:5221159:1497261013:d371bcf4406277228fc4f3f6c6aaa4600dab4823
2017-06-13 17:08:50 -07:00
Jun Wu
f1b6191c18 fbamend: move to a package
Summary: `fbamend.py` is already long. It will become more complex so let's move it.

Test Plan: arc unit

Reviewers: #mercurial, ikostia

Reviewed By: ikostia

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

Signature: t1:5209475:1497260957:e84aec4a2f90c8dd1d247b2b0caef48cfbb59c55
2017-06-13 17:08:20 -07:00
Olivier Trempe
0e2e9efbc7 pushrebase: add node_onto argument to prepushrebase hook
This helps doing some validation before accepting a pushrebase.
For example, if you want to prevent users to accidentally pushrebase
changesets to the wrong branch by checking if all pushed changesets are
on the same branch as the destination (--to)
2017-06-13 16:32:25 -07:00
Durham Goode
87bcf32bed remotefilelog: fix exponential dfs
Creating a remotefilelog blob does a walk of the ancestors, but the walk had
poor checking for if a node was already queued (instead it checked if it had
already been processed, which it may not have been processed yet, despite being
queued). This resulted in extremely long wait times for files with lots of
merges in history because it became exponential.

This fixes that.
2017-06-13 10:21:30 -07:00
Stanislau Hlebik
defa69c1d8 extorder: fix test
Summary:
There was a change in core mercurial b319e3173a9534a2b7750b69ef446a803c3145ff
that catches all exception from uisetup and extsetup. Let's throw subclass of
BaseException in this case.

Test Plan: arc unit

Reviewers: #mercurial, mjpieters

Reviewed By: mjpieters

Subscribers: mjpieters, medson, #sourcecontrol

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

Signature: t1:5236650:1497363414:9bbde3cabb696bb77a7ffddcb576923e5743c993
2017-06-13 09:13:41 -07:00
Stanislau Hlebik
300bc72abd absorb: fix test
Upstream e0fc50267c46 removed makememctx() function and requires filectxfn to
be an instance of patch.filestore.
2017-06-13 07:17:36 -07:00
Stanislau Hlebik
6ba65159c6 slqdirstate: fix test
Summary:
In 800bf9b727017002bcfcb8b558344403cc9ca938 _identity() method was added.
If `_identity()` property is not set in read() function then we get and endless
recursion P57511905.

Test Plan: Run test-sqldirstate-shelve.t

Reviewers: #mercurial, mitrandir

Reviewed By: mitrandir

Subscribers: mjpieters, medson, #sourcecontrol

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

Signature: t1:5236514:1497362573:0418ece747c2d44f386242e82c99cefdb45be10d
2017-06-13 07:17:03 -07:00
Stanislau Hlebik
db25e443da pushrebase: fix test
Logged message was changed in f0652919303c1e090e6c26517ec3b8a116cb7142
upstream.
2017-06-13 07:16:35 -07:00
Stanislau Hlebik
b82acd87f7 conflictinfo: fix test
There was a bug that was introduced upstream in 469914605447 and fixed in
758d59a5f3515b18c767af69f4ed28060f8af56c. This diff reflects the changes.

Also filestat was changed in 4091c920ac07e27ee8536715297127e56d536dab.
2017-06-13 07:15:54 -07:00
Stanislau Hlebik
5a69e3d88a tweakdefaults: dump per file diff statistic in json
Summary:
Upstream mercurial --stat option shows only aggregated statistics for all
files. This diff make it possible to get diff statistics per file.
It can be used by automation.

Test Plan: arc unit

Reviewers: #mercurial, quark

Reviewed By: quark

Subscribers: quark, mjpieters, medson, #sourcecontrol

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

Tasks: 18508761

Signature: t1:5203835:1496981602:c8a649158892d05442d8d0aa717589974b92ff6b
2017-06-13 03:38:54 -07:00
Stanislau Hlebik
0077886854 copytrace: do not log if file contexts were the same
Summary:
One one more improvement to logging to better measure the impact. Do not log if
file contents are the same as it is explained in the comment.

Depends on D5217007

Test Plan: arc unit

Reviewers: #mercurial, quark

Reviewed By: quark

Subscribers: quark, mjpieters, medson, #sourcecontrol

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

Tasks: 18508761

Signature: t1:5218112:1497317521:e73e8ebe01a4a8ca73ad9fc87b5608d4c9f5484c
2017-06-13 01:57:07 -07:00
Stanislau Hlebik
cb9f3c9a22 copytrace: log file paths and hashes
Test Plan: arc unit

Reviewers: #mercurial, quark

Reviewed By: quark

Subscribers: mjpieters, medson

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

Tasks: 18508761

Signature: t1:5217007:1497020693:a42d44bf26ca991e3143f41b77148e3803c0267d
2017-06-12 02:49:20 -07:00
Stanislau Hlebik
f7fdb06f79 copytrace: remove unnecessary test that was failing 2017-06-09 09:23:06 -07:00
Durham Goode
355498c9c9 infinitepush: handle invalid remotenames
Summary:
Remotenames can return a name that has no nodes (it may exist in the remotename
store, but when we go to resolve the node the node doesn't exist). So we need to
check for existence after fetching the nodes.

Test Plan: This was crashing for a user. After the fix they no longer crash.

Reviewers: #mercurial, stash

Reviewed By: stash

Subscribers: mjpieters, medson

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

Signature: t1:5194317:1496847686:ab05335284b83a2060c2bfea4beec6bf0453905c
2017-06-07 12:55:29 -07:00
Durham Goode
dcc33315d5 remotefilelog: prevent exponential ancestor walk
Summary:
The remotefilectx ancestor walk did not check if it had already walked a node,
and therefore very mergey history would cause this to be exponential runtime.
Let's add a visited check.

Test Plan: hg log on a file with very mergey history

Reviewers: #mercurial, quark

Reviewed By: quark

Subscribers: quark, mjpieters, medson

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

Tasks: 19121837

Signature: t1:5191981:1496865201:66b58b6831e9ae1707f834965456d95ec339cc86
2017-06-07 12:55:29 -07:00
Stanislau Hlebik
8917054b74 infinitepush: fix test 2017-06-07 07:06:24 -07:00
Stanislau Hlebik
96be9a5870 infinitepush: add config option to set a hostname
Summary:
There is a problem with socket.gethostname() because it can return
inconsistent names. See attached task for details.

Instead this diff lets us specify any hostname.

Depends on D5180633

Test Plan: arc unit

Reviewers: #mercurial, simpkins, tja

Subscribers: #sourcecontrol

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

Tasks: 18528165
2017-06-07 05:26:29 -07:00
Stanislau Hlebik
cfcb6fc5c9 infinitepush: refactoring to add BackupBookmarkNamingManager
Summary:
Previously there were many small functions that were used to create backup
bookmark name. Changing the logic was quite onerous because one would need to
change function signature in a few places.

This diff introduces special class that incapsulates this behaviour.
With this class making changes to naming scheme would be less problematic.


Depends on D5180390

Test Plan: arc unit

Reviewers: #mercurial

Subscribers: #sourcecontrol

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

Tasks: 18528165
2017-06-07 05:26:29 -07:00
Stanislau Hlebik
d3a3074811 infinitepush: add option to trigger re-backups
Summary:
Let's add an option that can be used to trigger full clean backup.
It can be useful in many situations, for example, in case of bug in
infinitepush backup or if the naming scheme of backup bookmarks were changed.

Test Plan: arc unit

Reviewers: #mercurial

Subscribers: #sourcecontrol

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

Tasks: 15389402
2017-06-07 05:26:29 -07:00
Stanislau Hlebik
84ab17a89a copytrace: exlude added files
Summary:
Previously if file was added in source then it would be considered missing in
destination. This behaviour won't add incorrect copies, but it would do
additional work of checking move candidates for the added file. This diff fixes
it.

Test Plan: arc unit

Reviewers: #mercurial

Subscribers: #sourcecontrol

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

Tasks: 18508761
2017-06-07 03:40:54 -07:00
David Soria Parra
b0d59e858a p4fastimport: implement transaction.find and .replace
Summary:
revlog uses transaction.find and transaction.replace in cases where a
datafile is separated from an index (>= revlog._maxinline). In these cases the
importer broke as we did not implement find and replace in filetransaction.

We implement the two methods. However we ned a save way to store the data
portion which find must correclty return. We cannot store json as some
serializations aren't bidirecitonal. We can't store pickle as \n is a common
separator in pickle, and we use that to separate our entries. So we use pickle
and then base64 encode it. This is cumbersome but works.

The fix is aimed to make things "work" and I want to explore options to better
implement find and replace.

Test Plan:
- Working on a test that correclty triggers inline -> separation.
- Deployed it to our test system with test data and see commits comming in.

Reviewers: #idi, #ovrsource_warroom, #mercurial

Differential Revision: https://phabricator.intern.facebook.com/D5189308
2017-06-06 19:54:29 -07:00