Commit Graph

46203 Commits

Author SHA1 Message Date
Aida Getoeva
56b69cd493 selectivepull: test clone and push
Summary: added test cases for clone and push to show how they interfere with selectivepull feature

Reviewed By: mitrandir77

Differential Revision: D16084217

fbshipit-source-id: 38774f8badfacfb9a8b2a911d2e4ae6a5cde7470
2019-07-02 11:30:55 -07:00
Aida Getoeva
dac9448582 selectivepull: always pull accessed + default books
Summary:
always pull only accessed bookmarks and default, do not take remote books from `remotenames` file

also adding handling of `CorruptedState` error to delete `selectivepullaccessedbookmarks` file in that case. it will help mercurial not to crash in case the file was corrupted and self-fix next time.

Reviewed By: mitrandir77

Differential Revision: D16079548

fbshipit-source-id: a2983ee63fb17d2922f3c230c3d6e36aa6591b62
2019-07-02 11:30:55 -07:00
Aida Getoeva
1bc6ecf8fe atomicetempfile: add filesync before closing
Summary:
Adding `filesync(fd)` (applies `flush()` and `os.fsync()` on fd) to make writes to the file more durable.

Before I ecountered the issue with on of the atomicfiles to have only zeros in it. markbt suggested that it could happend because of the system crashes, when the file size is still remembered but the content can be lost.
I first thought apply `filesync` only to that particular case, but decided to add into the `atomictempfile` implementation.

Reviewed By: mitrandir77

Differential Revision: D16078908

fbshipit-source-id: 5606b49aca766bf5f03fe4e763aa2c66c48ccac5
2019-07-02 11:30:55 -07:00
Aida Getoeva
c08bd8af0e selectivepull: small refactoring of selectivepullenabled file
Reviewed By: mitrandir77

Differential Revision: D16078909

fbshipit-source-id: 9dfd3b0849598b43853810223b3e8c0d3990aaf4
2019-07-02 11:30:54 -07:00
Shu-Ting Tseng
f4a2f2875f stop hg svn rebuildmeta/updatemeta from talking to svn server
Summary:
# RFC, not sure if I know what I am doing but I know my goal as follow

In case of the entire `.hg/svn` missing, in order to get the subdir and uuid information,
hgsubversion needs to talk to svn server. In our cases, it's polluting our logging and
it's hard to know who is really using svn server.

In this diff I want to disable this by writing these 2 information directly in config
and hgsubversion will just read from there.

Reviewed By: mitrandir77

Differential Revision: D15989449

fbshipit-source-id: fd9cead094245b3c0baf6e7e1099cc302899668f
2019-07-02 09:36:52 -07:00
Sagie Gur-Ari
97cff8167d commitcloudsubscriber: upgrade to Rust 2018
Summary: upgrading crate to 2018 edition.

Reviewed By: markbt

Differential Revision: D16068107

fbshipit-source-id: 15a76dd67ffae166e6ac923cc57c0874e2c62e8f
2019-07-01 21:43:48 -07:00
Arun Kulshreshtha
2bd15eca26 remotefilelog: move edenapi error logging into dedicated function
Summary: We need to log (and in debug mode print out) Eden API exceptions in several places in the code. Let's factor out this logic into a function in the edenapi module.

Reviewed By: xavierd

Differential Revision: D16027147

fbshipit-source-id: 76c8e97dcaaa114e0c22448d117caae948fb60f4
2019-06-28 15:06:18 -07:00
Mark Thomas
367a4a7cea commitcloud: fix misplaced notice arg
Summary:
The `notice` arg should be provided to `ui.warn`, not the translation `_`
function.

Reviewed By: xavierd

Differential Revision: D16055534

fbshipit-source-id: bb1e0213147fc591671c2ef4c79aab3f9e4a2987
2019-06-28 13:16:35 -07:00
Aida Getoeva
664550d95f commitcloud: fixed creating References with remotebookmarks
Summary: I added remotebookmarks field to the References object earlier, but forgot to change object constructions in couple of places

Reviewed By: markbt

Differential Revision: D16052722

fbshipit-source-id: b0b46739a89c911541eababd35b5f43812e66c4a
2019-06-28 11:52:03 -07:00
Kostia Balytskyi
35ccda9c02 tests-shelve.t: stop expecting exact numbers of spaces
Summary:
I don't think that testing the presence of parenthesis is also terribly
important, so let's just glob it all out

Reviewed By: farnz

Differential Revision: D16048857

fbshipit-source-id: d3691fe6460f2fc759c9dee2f929cc55c04c541c
2019-06-28 05:56:45 -07:00
Jun Wu
5f6726ffe6 tests: stablize test-fb-hgext-treemanifest-treeonly.t
Summary:
It seems possible to have both outputs:

  --- test-fb-hgext-treemanifest-treeonly.t
  +++ test-fb-hgext-treemanifest-treeonly.t.err
  @@ -477,7 +477,7 @@
     $ hg log -r 'last(public())' --stat
     fetching tree '' 85b359fdb09e9b8d7ac4a74551612b277345e8fd
     2 trees fetched over * (glob)
  -  fetching tree '' d9920715ba88cbc7962c4dac9f20004aafd94ac8, based on 85b359fdb09e9b8d7ac4a74551612b277345e8fd
  +  fetching tree '' d9920715ba88cbc7962c4dac9f20004aafd94ac8, based on 85b359fdb09e9b8d7ac4a74551612b277345e8fd, found via 2937cde31c19
     2 trees fetched over * (glob)
     changeset:   4:2937cde31c19
     parent:      0:2278cc8c6ce6
  @@ -598,7 +598,7 @@
     $ hg log -r tip -T '{desc}\n' --stat
     fetching tree '' 83b03df1c9d62b8a2dedf46629e3262423af655c, based on d9920715ba88cbc7962c4dac9f20004aafd94ac8, found via 4f84204095e0
     1 trees fetched over * (glob)
  -  fetching tree '' bd5ff58fa887770ff0ea29dde0b91f5804cdeff0, based on 83b03df1c9d62b8a2dedf46629e3262423af655c, found via 4f84204095e0
  +  fetching tree '' bd5ff58fa887770ff0ea29dde0b91f5804cdeff0, based on 83b03df1c9d62b8a2dedf46629e3262423af655c, found via 5b1ec8639460
     2 trees fetched over * (glob)

Just mask out the changes to stabilize it.

Reviewed By: xavierd

Differential Revision: D16044382

fbshipit-source-id: c22cb28512f270bb2b5bed264988b6939afeed65
2019-06-27 19:59:54 -07:00
Jun Wu
d0c4922a72 tests: fix test-help.t
Summary: This gets changed with the simplecache change.

Reviewed By: xavierd

Differential Revision: D16044381

fbshipit-source-id: 53b3870a21cd9225ec305bc2122fe3069a1aef60
2019-06-27 19:59:53 -07:00
Jun Wu
c5d1eadcb7 tests: stabilize test-blackbox.t
Summary:
The test was flaky because there are errors about time selection. Extending the
"end time" by 1 second to fix it.

Reviewed By: xavierd

Differential Revision: D16044383

fbshipit-source-id: ab929f5f212cec88aa9e9254dd58e696b20d75f8
2019-06-27 19:59:53 -07:00
Jun Wu
5cbcabd230 tests: fix test-sparse-profiles.t
Summary:
With simplecache disabled globally, simplecache needs to be explicitly enabled
for this test to work.

Reviewed By: xavierd

Differential Revision: D16044111

fbshipit-source-id: 47e913787804a485012ffa3ddade54909c5de229
2019-06-27 19:59:53 -07:00
Jun Wu
df81aa9464 simplecache: fix check-code
Summary: As the title.

Reviewed By: xavierd

Differential Revision: D16039564

fbshipit-source-id: e4388347b4e93f30cf1e21de90b4c8756fe0e6d5
2019-06-27 18:07:41 -07:00
Arun Kulshreshtha
bb4fc0d064 edenapi: add special error kind for proxy server errors
Reviewed By: xavierd

Differential Revision: D16024750

fbshipit-source-id: dd98fc344d2518a302edae780810c62f39caedd4
2019-06-27 14:26:36 -07:00
Arun Kulshreshtha
12c92d0c14 edenapi: use http::StatusCode in ApiErrorKind::Http
Summary: Use the `StatusCode` type from the `http` crate to represent HTTP status codes rather than using a plain `u32`. This has the advantage of including the canonical description of the error in the `Display` output of the type, so the user doesn't need to look up the meaning of the particular HTTP status code.

Reviewed By: xavierd

Differential Revision: D16024749

fbshipit-source-id: f2325111d5ca647b193fe8c5fa4a270f890fdbee
2019-06-27 14:26:35 -07:00
Jun Wu
aa70eee9cf tests: update test-help.t
Summary: When addressing comments on D15640718, I forget to update the test.

Reviewed By: DurhamG, xavierd

Differential Revision: D16036450

fbshipit-source-id: 7eaba2f5a0c11ef87c6b03d1ecf0016ea5e8a937
2019-06-27 13:10:21 -07:00
Jun Wu
1f2ef7617b extensions: disable simplecache by default
Summary:
simplecache was already disabled via configuration. This diff disables it in
code. It affects caches.

Reviewed By: xavierd

Differential Revision: D16036295

fbshipit-source-id: 50df791e5c18fe19ad4c8b63da97f6862f150942
2019-06-27 13:10:21 -07:00
Jun Wu
5003daafa0 simplecache: respect TESTTMP
Summary:
By default, simplecache puts its local cache in a global location that persists
across test runs. That can cause surprises. Change the location to be inside
$TESTTMP under tests.

Reviewed By: xavierd

Differential Revision: D16036296

fbshipit-source-id: c73b573b87d49798f4ad146a1c0a559f5d94caf1
2019-06-27 13:10:20 -07:00
Jun Wu
64e06423c5 packfile: do not rely on fp.tell()
Summary:
On Windows, fp.tell() might return unreliable data for files with mixed reads
and writes.

Reviewed By: xavierd

Differential Revision: D16035564

fbshipit-source-id: d6cbb018e2664dd1e4323c52e7b0c73df07d7796
2019-06-27 13:10:20 -07:00
Jun Wu
6ad31bbf6a codemod: replace os.fdopen with util.fdopen
Summary:
`util.fdopen` now adds workarounds for read+write+seek files on Windows.
This should solve issues we have seen on Windows behaviors.

See https://www.mercurial-scm.org/repo/hg/rev/3686fa2b8eee for the Windows weirdness.

Here is a minimal program to reproduce the weirdness:

```
import os

f = open("a.txt", "wb+")

# Write 12 bytes
f.write(b"b" * 12)

# Read byte slice 2..5
f.seek(2, os.SEEK_SET)
data = f.read(3)

# Try SEEK_END
f.seek(0, os.SEEK_END)
print("%d (expect 12)" % f.tell())  # got 5 using some python.exe
```

Reviewed By: xavierd

Differential Revision: D16033678

fbshipit-source-id: 4f17c463d9bfcc0cdd38d1b15f2a9e38e5b4c132
2019-06-27 13:10:20 -07:00
Jun Wu
4f9d7edffa util: add fdopen
Summary:
`os.fdopen` lacks of fixes in https://www.mercurial-scm.org/repo/hg/rev/3686fa2b8eee.

Add a patched version of `fdopen` to solve it.

Reviewed By: xavierd

Differential Revision: D16033679

fbshipit-source-id: 99053c05fd062feb21711aa5d6dad56014535fc1
2019-06-27 13:10:19 -07:00
Jun Wu
e4ce4c6416 debugshell: define more modules
Summary:
Add more shortcuts to common modules.
This make it easier to test changed code paths.

Reviewed By: markbt

Differential Revision: D15952263

fbshipit-source-id: c0eca6a61902d36a26a99f85e29dc70f431eca59
2019-06-27 12:24:23 -07:00
Jun Wu
3aa38649ec setup: upgrade prompt_toolkit
Summary:
This includes https://github.com/prompt-toolkit/python-prompt-toolkit/pull/930,
making IPython work on Windows.

Reviewed By: markbt

Differential Revision: D15948898

fbshipit-source-id: 7669df7e2d7e0eb12502fdfa0da15922b9e7745d
2019-06-27 12:24:23 -07:00
Arun Kulshreshtha
6cea11189e edenapi: rename BadCreds to BadCertificate
Summary: Rename `ApiErrorKind::BadCreds` to `ApiErrorKind::BadCertificate`. This makes it clearer to users who see the error name in log output that the problem is with a TLS client certificate, since "credentials" is otherwise pretty broad.

Reviewed By: xavierd

Differential Revision: D16024751

fbshipit-source-id: 1dea342036519a33dc48abaa41ab891be1a3637d
2019-06-27 11:28:32 -07:00
Kostia Balytskyi
45a372b238 run-tests: replace try-finally block with a context manager
Summary:
Can do os as per
https://docs.python.org/2/library/threading.html#using-locks-conditions-and-semaphores-in-the-with-statement

Reviewed By: xavierd

Differential Revision: D16028590

fbshipit-source-id: 70c37b65fc497ff87a09deb155d719ceb2bbcfb2
2019-06-27 10:16:31 -07:00
Aida Getoeva
7b16c3f851 commitcloud: update remote bookmarks
Summary: Turned on synchronization, fixed couple of bugs, made test-cases pass.

Reviewed By: markbt

Differential Revision: D16006689

fbshipit-source-id: f9481bf71d9d07c04f38ff9ac3a7c30c846cb8c8
2019-06-27 08:10:59 -07:00
Aida Getoeva
5623ad5573 commitcloud: add test remote bookmarks cloud sync
Summary: Added several simple cases for remote bookmarks cloud sync.

Reviewed By: markbt

Differential Revision: D16006688

fbshipit-source-id: 8045d9cd1266198f343e9e5bc3f85afc4892e58b
2019-06-27 08:10:59 -07:00
Aida Getoeva
b55f9db1f0 remotenames: applychanges for remotebookmark store
Summary:
The changes from commit cloud sync are supposed to be applied in-memory and committed with cloudsync-transaction to the disk. For example, for bookmarks the changes first are applied to the existing dict of bookmarks and with the transaction are being written to the disk into the `bookmarks` file.

Ideally I need to have similar thing for remote bookmarks. However, the current implementation provides of remotenames only read-only store with only possibilty to change something on the disk (`remotenames` file) and upload it to memory.

We're planning to rewrite the whole extension at some point, but currently to move forward I added a new method to the store, which will apply changes to the `remotenames` file and reload the remotenames store.
It's not transactional and uses existing function `saveremotenames`, which I refactored a little bit, so it could apply changes for multiple remotes at the same time. I also removed deletion of `remotedistance` file as it is deprecated and not used a long time.

Reviewed By: markbt

Differential Revision: D15921983

fbshipit-source-id: d6b2638db689c0c1b66a6291fc9f0f2c9dac978c
2019-06-27 08:10:58 -07:00
Aida Getoeva
df1e2fd288 commitcloud: merging remote bookmarks
Summary:
Added implementation of the remote bookmarks merging.

1. If remote books changed in cloud since the last sync and local didn't, then local remote books will be updated with the cloud changes.

2. If otherwise, cloud remote books are the same and local are different from the last sync, then the local changes will be submitted to the cloud.

3. If both local and cloud remote books changed from the last sync, the merging becomes more difficult. There are several cases for what particular changes could be. The current implementation is the first and simpliest, so some of the decisions I made here may be improved later.

  3.1. If both changed and not deleted, then the local remote book will be updated to the newest node between local and cloud's.
  This is not always a correct state. For example, the local remote bookmark's commit is newer (further in the stack), but the bookmark was moved back in the stack on the server and the cloud now has this bookmark on the older commit. After syncing the local book will be kept as it was before and it's node will be submitted to the cloud.
  However it's not that bad, as after `hg pull` it will point back to the right revision.

  3.2. If one changed and another was deleted. There are two case when it could happen: (a) the bookmark was deleted on the server, (b) the client unsubscribed from the remote bookmark (functionality is not implemented yet). The current implmentation will just keep local remote bookmark as it is if it was deleted in the cloud and submit changes back to cloud.

Reviewed By: markbt

Differential Revision: D15899944

fbshipit-source-id: b17ca4d01fd1a1230d74588e2b9ca5c6d58df751
2019-06-27 08:10:58 -07:00
Aida Getoeva
5d7f245f80 commitcloud: support remote bookmarks sync
Summary:
Made changes to the commit cloud sync to support remote bookmarks. Here I only declared steps of future remote bookmarks sync and will add the implementation further in the stack.

Processing a merge state between cloud remote bookmarks state, last sync and local state is done earlier in the workflow, than, for example, for local bookmarks, because to update remote bookmarks we may need to fetch new public heads from the server and so need to get them first.

Reviewed By: mitrandir77

Differential Revision: D15898740

fbshipit-source-id: ca77f66b0f1244a811b4b549e5b189c5f1772708
2019-06-27 08:10:58 -07:00
Aida Getoeva
2bb6071bd8 commitcloud: add remote bookmarks to the get/update references
Summary: Adding support of remote bookmarks to the get/set references of Commit Cloud client service.

Reviewed By: mitrandir77

Differential Revision: D15852515

fbshipit-source-id: 9d5331955f5fc95ecb4bfe8e060d3b1d67952a41
2019-06-27 08:10:58 -07:00
Kostia Balytskyi
8d68e40dd2 run-tests: do not rely on PYTHONPATH for heredoctest
Summary:
PYTHONPATH is no longer a thing on Windows. Let's not rely on it
for our `heredoctest.py`-based tests

Reviewed By: mitrandir77

Differential Revision: D16028830

fbshipit-source-id: ae66d9cf194c7e3c15e44a81a18dfeeb4b68e281
2019-06-27 06:42:45 -07:00
Arun Kulshreshtha
802dbcd5a1 remotefilelog: log exception type on ssh fallback
Summary: When Eden API falls back to SSH, log the exception type and message (in addition to the traceback) to the `hg_errors` table. Note that previously, we were attempting to log the error message but failing because we were using the wrong column name. (`msg` instead of `exception_msg`).

Reviewed By: xavierd

Differential Revision: D16014833

fbshipit-source-id: 06460574f66999b1293ea31b43b5c7ec89737144
2019-06-26 20:17:11 -07:00
Brian Strauch
93780344d2 debugedenimporthelper get file size
Summary: `hg debugedenimporthelper --get-file-size PATH:REV` will print the size of the given file

Reviewed By: chadaustin, xavierd

Differential Revision: D16009279

fbshipit-source-id: 6edb01dd154a467cdd26c0ced1d4ae82411088f1
2019-06-26 17:09:14 -07:00
Arun Kulshreshtha
5b17733c4d remotefilelog: catch all exceptions during Eden API client setup
Summary: Now that Eden API returns specific exception types rather than always raising a `RuntimeError` when things go wrong, the fallback path needs to be updated to catch all exception types, not just `RuntimeError`.

Reviewed By: xavierd

Differential Revision: D16013115

fbshipit-source-id: d5c2d88acede7e70519eda8915401bb8ee394038
2019-06-26 14:40:47 -07:00
Kostia Balytskyi
85e0a72826 run-tests: do not set PYTHONUSERBASE on Windows
Summary: This was causing `Popen` to crash, since `env` had non-strings (`NoneType`)

Reviewed By: mitrandir77

Differential Revision: D16009578

fbshipit-source-id: cbed384b7d773e3de23f9a8920d85296c5deec85
2019-06-26 12:40:29 -07:00
Kostia Balytskyi
9125f0d9e8 run-tests: avoid dead lock when calling a child process
Summary: If `subprocess.Popen` crashes, the lock is never released.

Reviewed By: mitrandir77

Differential Revision: D16009579

fbshipit-source-id: e27137826ffb29aa1f497a3c4c85160b183f2a51
2019-06-26 12:40:29 -07:00
Jun Wu
282fb28151 amend: show deprecation warnings about --fixup
Summary:
`--fixup` is not really a great flag name and it came from a legacy
implementation.  Suggest `restack` instead.

Reviewed By: kulshrax

Differential Revision: D15978952

fbshipit-source-id: 4e8c2e79be01f6d8f13628409a446d42ae22c0af
2019-06-26 11:24:15 -07:00
Jun Wu
164b3ff4da amend: do not rebase unrelated commits
Summary:
See the test change for what this change is about.

The new code has side effect on linearizing things for `<rebase_src>::`. This
is reflected on the second last test change. The new behavior is arguably more
desiable - The new code can fail if rebasing D onto C2 causes conflicts. If
that happens, and rebasing C+C2+D onto the new B does not cause conflicts, then
the old behavior is better. We can add fallback code to the old behavior if
there are conflicts later, by calling a plain `rebase` instead of `restack`.

Reviewed By: kulshrax

Differential Revision: D15978953

fbshipit-source-id: 20b9d62c6125ce2faf8e21bd86f6aad31ac38a0c
2019-06-26 11:24:14 -07:00
Jun Wu
86e119ea37 restack: allow the callsite to override rebaseopts["rev"]
Summary: This allows the callsite to control what revs to rebase.

Reviewed By: kulshrax

Differential Revision: D15978954

fbshipit-source-id: 73174475411c3986f3a8e93a1a61ce5b857f454b
2019-06-26 11:24:14 -07:00
Jun Wu
37ad2345e6 amend: add a test about suboptimal UX
Summary:
I run into this frequently and it's pretty annoying. Basically, amending X
tries to rebase things that are outside `X::`, which is unexpected.

Also, rebasing commits outside `X::` can easily fail due to conflicts. That
rollbacks the *entire* transaction. It'd be better if it only rolls back
the transaction rebasing a single branch.

I have a stack like:

  o  86685181  79 minutes ago  quark  D15755281
  |  [hg] logging: log ui.write blocked time
  |
  o  218029b5  79 minutes ago  quark  D15755284
  |  [hg] logging: log ui.prompt blocked time
  |
  o  da4d16a3  79 minutes ago  quark  D15755283
  |  [hg] logging: migrate crecord "blocked" logging to new API
  |
  o  6d0574e1  Today at 15:17  quark  D15710672
  |  [hg] logging: migrate fsmonitor to new blackbox API
  |
  o
  .
  .
  o  388aabb8  Today at 11:41  quark  D15685475
  |  [hg] blackbox: add pattern matching for filtering events
  |
  | o  e7d08fbd  Today at 11:41  quark  D15710677
  | |  wip
  | |
  | x  55895cb8 [Rewritten into 6d0574e15334]  Today at 11:41  quark  D15710672
  | |  [hg] logging: migrate fsmonitor to new blackbox API
  | |
  | | o  de3b561f  Today at 11:41  quark
  | | |  wip
  | | |
  | | o  5898b7a0  Today at 11:41  quark
  | | |  wip
  | | |
  | | x  478da1be [Rewritten into 55895cb88484]  Today at 11:41  quark  D15710672
  | | |  [hg] logging: migrate fsmonitor to new blackbox API
  | | |
  | | x  e7c5c7d3 [Rewritten into e7d08fbdb3e0]  Today at 11:41  quark  D15710677
  | | |  [hg] blackbox: add more event types
  | | |
  | | x  7d715385 [Rewritten into 55895cb88484]  Today at 11:41  quark
  | |/   [hg] blackbox: add fsmonitor event
  | |
  | x  c9a01966 [Rewritten into 00c67719c09d]  Today at 11:41  quark
  | .  [hg] blackbox: change session id to u64
  | .
  | x  b4a0a8ab [Rewritten into 388aabb8f9f6]  Today at 11:41  quark  D15685475
  |/   [hg] blackbox: add pattern matching for filtering events
  |
  o  708540a9  Today at 11:41  quark  D15685471
     [hg] blackbox: add Event::to_value

The current behavior rebases the wip commits when amending commits on the top
like 6d0574e1. It always causes conflicts and rolls back the entire rebase.

Reviewed By: kulshrax

Differential Revision: D15978955

fbshipit-source-id: 1573407958fec647fca4ca261f6807cd8eae9803
2019-06-26 11:24:14 -07:00
Arun Kulshreshtha
693deae060 remotefilelog: add configurable warning for bad TLS certificates
Summary: When the Eden API Rust client raises a CredsError exception, print out a configurable error message to the user (defined by the `edenapi.badcertmessage` config option). This allows us to provide specific instructions on how the user should renew their certificate.

Reviewed By: xavierd

Differential Revision: D15992903

fbshipit-source-id: 8316e33c3a5d86da272deea6402271d4a65548f4
2019-06-26 11:16:40 -07:00
Xavier Deguillard
c60abedfc6 tests: remove use of fastdatapack in test-fb-hgext-revisionstore-datastore.py
Summary: The future is the Rust stores, not C ones.

Reviewed By: kulshrax

Differential Revision: D15993202

fbshipit-source-id: fbdb796eafcfdaccd1f98177e83a5c0a851bee5a
2019-06-26 11:10:55 -07:00
Xavier Deguillard
1b69ae4751 tests: remove use of remotefilelog.{use,}fastdatapack
Summary: These 2 options simply do not exist anymore.

Reviewed By: kulshrax

Differential Revision: D15993203

fbshipit-source-id: e845c060b5c96a78659556488da620a92f63e121
2019-06-26 11:10:55 -07:00
Xavier Deguillard
9d18031708 remotefilelog: hardcode using Rust {data,hist}pack implementation
Summary:
We've had these 2 options turned on for a while now. Let's stop pretending
we'll switch them off, and just hardcode them over the codebase.

Some places are still using either the C code, or the Python one explicitely,
future changes will switch them to the Rust code.

Reviewed By: kulshrax

Differential Revision: D15981631

fbshipit-source-id: c23e474a84e887a2b92c9a304d63ef8d680cdf2d
2019-06-26 11:10:54 -07:00
Jun Wu
d172be76bf logging: stop logging requirements
Summary:
The requirements field is only interesting for non-remotefilelog or
generaldelta repos. Nowadays it's probably safe to assume clients are
remotefilelog and "requirements" is less useful.

Reviewed By: xavierd

Differential Revision: D15710676

fbshipit-source-id: 65f04b64760c652432471c4a8dda7acc4cf45466
2019-06-26 11:03:28 -07:00
Jun Wu
c754e0147b commands: provide in-core blackbox command
Summary:
The in-core blackbox command displays blackbox entries in the given time range.

The `blackbox` command provided by the blackbox extension was removed. They
can still be accessed via `.hg/blackbox.log`, though.

Tests are updated. Most `| grep` patterns were changed to use structured pattern
matching `--pattern` instead. Tests that are not interesting (ex. bundlebackup,
since we are moving away from bundle files slowly) are just removed.

Reviewed By: markbt

Differential Revision: D15640718

fbshipit-source-id: 7e5da60ca2b15ae9495d0242b340a066979d5a4f
2019-06-26 11:03:27 -07:00
Jun Wu
8640eccbeb blackbox: initial integrate with mercurial Python code
Summary:
Add a `mercurial.blackbox` module which just delegates to the Rust
binding. This means blackbox is no longer optional.

Change `ui.log` to log to the native blackbox as `LegacyLog` event.
The plan is to slowly migrate users from `ui.log` to `blackbox.log`,
which supports well-defined event types (instead of `LegacyLog`).

This does not change the `blackbox` command, which still uses the
legacy blackbox implementation. That will be changed in a later diff.

Reviewed By: markbt

Differential Revision: D15640720

fbshipit-source-id: de171f46e1430060083c9b7aee0a96dde315d021
2019-06-26 11:03:27 -07:00