Commit Graph

45003 Commits

Author SHA1 Message Date
Saurabh Singh
b02696d961 remotefilelog: fix the test broken by defaulting file blobs to version 1
Summary: This test was broken by D13980892 and needs to be updated.

Reviewed By: DurhamG

Differential Revision: D14001840

fbshipit-source-id: 6487159445f8aa049996a35e1bb70dad5af614ac
2019-02-08 10:52:16 -08:00
Liubov Dmitrieva
ca7f631006 lazy connection open for memcache has an issue with SIGPIPE
Summary: My earlier diff broke master, this is the fix.

Reviewed By: markbt

Differential Revision: D14005894

fbshipit-source-id: 6ce43913fb501791592512f2f12cd67ef27f0457
2019-02-08 09:44:06 -08:00
Liubov Dmitrieva
261da2a786 fix remotenames for infinitepush
Summary:
Currently if default path and infinitepush both point to the remote path
from the repo, the activepath function returns 'infinitepush' rather than
'default' because of the logic I have fixed.

It makes your smartlog looks like.

```
o  037dddb5  62 minutes ago  infinitepush/fbobjc/stable remote/fbobjc/stable
.
o  66e0e00c  Today at 05:58  infinitepush/fbandroid/stable
remote/fbandroid/stable
.
@  28c3b5b0  Today at 05:40  mlesyk  D14003881  T27597699
.  [fbar][prod_role] fix region detection part
.
o  407504d6  Today at 04:58  infinitepush/fbsource/stable
remote/fbsource/stable
```

When you pull it updates infinitepush/master, etc instead of remote/master,
etc.

This only happens if they both point to the same url.

This is not desirable for infinitepush.

I also introduced infinitepush-other that we will use for the secondary commit cloud backend.

It would have the same issue if it matches the url of the default path.

Reviewed By: markbt

Differential Revision: D14005639

fbshipit-source-id: f3ea8098e1c418e2efd43b5430bb4252f6ad6b2c
2019-02-08 09:24:20 -08:00
Liubov Dmitrieva
3cc2093659 fix tests
Summary: Size is not always the same, let just use number of files.

Reviewed By: rlangst

Differential Revision: D14004261

fbshipit-source-id: 13e21d8fd95ee09fc54c750ceecc48bcd484bc9e
2019-02-08 08:30:11 -08:00
Wez Furlong
35e2b7c6ff hg: fix lfs and journal extension postshare wrapping
Summary:
this fixes `hg-new-workdir` by matching the function signature
and propagating the arguments.

Reviewed By: singhsrb

Differential Revision: D13992348

fbshipit-source-id: 582025affe2e0511f239e82bc880b2fecea84ac7
2019-02-07 18:58:40 -08:00
Wez Furlong
45a59ef1d4 hg: run-tests: treat a parse error as return code 1
Summary:
previously, unexpected output would cause the harness to
stack trace and not show the actual test failure.

This catches the error and treats it as a failed run, which causes
the test output to be displayed.

No more `ValueError: invalid literal for int() with base 10: '0\xe2\x90\x8a'`

Reviewed By: DurhamG

Differential Revision: D13995000

fbshipit-source-id: 5c1a9e8d6f8e81a924cdbf760fa75cdc0d33b74d
2019-02-07 18:58:40 -08:00
Jun Wu
9efa79ce5c test-commit-multiple: rewrite parts related to named branch
Summary:
Change the test to avoid creating branches so it could still work
once `hg branch` gets removed.

Differential Revision: D13954467

fbshipit-source-id: ec6ee3430cecd4ee4daa23b303f0a36be9198659
2019-02-07 18:17:19 -08:00
Jun Wu
5dfbe25ca2 test-mv-cp-st-diff: rewrite parts related to named branch
Summary:
Change the test to not create branches, so it could still work
once `hg branch` gets removed.

Differential Revision: D13954465

fbshipit-source-id: 10ff86b2a765cb8bd57d1589a4e3624d553b4d07
2019-02-07 18:17:18 -08:00
Jun Wu
512dba0175 test-rollback: remove the test
Summary:
The test relies on named branches. Since the "hg rollback" command will also be
removed in the future, just delete the test for now.

There are a couple of other tests relying on the "hg rollback" command, which
makes the "rollback" command itself harder to delete.

Differential Revision: D13954464

fbshipit-source-id: 6a56ca15de96258c79deb90114438b42d802d8b0
2019-02-07 18:17:18 -08:00
Jun Wu
c2ef481658 logexchange: delete the experimental component
Summary:
logexchange was a subset of remotenames, added by:

  changeset:   5a62910948d2d4bac5defe305d0ddb22f0fda549  D1547
  user:        Pulkit Goyal <7895pulkit@gmail.com>
  date:        Wed, 04 Oct 2017 10:32:02 -0800
  summary:     remotenames: move function to pull remotenames from the remoterepo to core

Since we use the full remotenames instead, remove logexchange and its test,
which depends on named branch.

Differential Revision: D13954458

fbshipit-source-id: d565c131100ef90f3cf69e9051643ac8e5846f0d
2019-02-07 18:17:18 -08:00
Jun Wu
141c848e2f test-encoding-align: remove part related to named branch or tags
Summary: Make it future-proof.

Differential Revision: D13954468

fbshipit-source-id: ee0f856c6d424b99f6b7406d12cd1f96012775d5
2019-02-07 18:17:18 -08:00
Jun Wu
146bb6e868 test-static-http: remove the test
Summary:
We probably won't be able to maintain the static http interface. Therefore
remove it. This also solves the headache of dealing with named branches and
tags.

Reviewed By: singhsrb

Differential Revision: D13934436

fbshipit-source-id: 246d695b4d08142d0f4363e143b459ac4952d599
2019-02-07 18:17:18 -08:00
Jun Wu
aed2c0ea67 test-commandserver: remove part related to named branch
Summary: This makes the test future-proof.

Differential Revision: D13934442

fbshipit-source-id: 69a4ea31adbcf6d60a7ec8f0bc284926b31803df
2019-02-07 18:17:18 -08:00
Jun Wu
480d9e1a97 test-fb-hgext-scm-prompt-hg: rewrite part related to named branch
Summary: This makes the test future-proof.

Differential Revision: D13934446

fbshipit-source-id: 650644afb17f2301979f8720771a276800d03a52
2019-02-07 18:17:18 -08:00
Jun Wu
8802644f60 test-perftweaks: remove part related to named branch
Summary: Remove "hg branch" invocation to make the test future-proof.

Differential Revision: D13934440

fbshipit-source-id: cb410abc86d6e23c952ba5562b7918e2dc281ac3
2019-02-07 18:17:18 -08:00
Jun Wu
63c85060aa test-clone-r: remove part related to named branch
Summary: Remove "hg branch" invocation to make the test future-proof.

Differential Revision: D13934437

fbshipit-source-id: a82497e7dfc589b363bf140fef8b8ab727ff461a
2019-02-07 18:17:18 -08:00
Jun Wu
5b0508c6a5 test-share: remove part related to named branch
Summary: Remove "hg branch" invocation to make the test future-proof.

Differential Revision: D13934443

fbshipit-source-id: 3629e7bb27257c7cca7b7aab319d2cd1be99155a
2019-02-07 18:17:18 -08:00
Jun Wu
1708e3f653 test-import: remove part related to named branch
Summary: Remove "hg branch" invocation to make the test future-proof.

Differential Revision: D13934433

fbshipit-source-id: 3184f8355de7409579cbee4d3c8bfd56ce762cc3
2019-02-07 18:17:18 -08:00
Jun Wu
5c7d607917 test-bookmarks: avoid using branches
Summary: Branches will be disabled. Remove usage of them.

Differential Revision: D13909731

fbshipit-source-id: 5d1ea6c54393d9e6c8c8bdb7a1a21a38fc5ce873
2019-02-07 18:11:16 -08:00
Jun Wu
4bbba50302 test-backout: switch branches to bookmarks
Summary: Branches will be disabled. Use bookmarks instead.

Differential Revision: D13909729

fbshipit-source-id: 849fa9614aa92f0b7a709c2e36214b6211988d68
2019-02-07 18:11:16 -08:00
Durham Goode
20f9ac38f6 remotefilelog: handle corrupt loose files more gracefully
Summary:
If the history portion of a loose file was corrupt, users would often
get errors like "ValueError: substring not found" when trying to split on the
null separators. Let's catch that and handle it where appropriate. For cache
stores, we move it out of the way and return a KeyError, so the union store will
move on to try to fetch it from the server again. For local stores, we return a
ValueError and surface it to the user since their local data may be corrupt.

Reviewed By: quark-zju

Differential Revision: D13976499

fbshipit-source-id: 39e63f19fc752ca0179fbc5b0908a28d46de3a3a
2019-02-07 13:40:42 -08:00
Durham Goode
2def6874f5 remotefilelog: default file blobs to version 1
Summary:
We're seeing cache corruption issues due to mixing and matching loose
file versions. Let's just default to 1.

Reviewed By: quark-zju

Differential Revision: D13980892

fbshipit-source-id: 1e8cc9a53b8b92e05dc08b202505bb8f453a3074
2019-02-07 11:08:01 -08:00
Mark Thomas
d79f73659f perf: import from the edenscm package
Reviewed By: singhsrb

Differential Revision: D13988141

fbshipit-source-id: 1e2a5e9343b3b2c6f10db9597e8c035594c7a2ba
2019-02-07 10:53:53 -08:00
Mark Thomas
045515bbe5 perf: apply auto-formatter
Reviewed By: singhsrb

Differential Revision: D13988166

fbshipit-source-id: 211532d30db5a44536a613e097efc1db51debce2
2019-02-07 09:57:13 -08:00
Liubov Dmitrieva
da5a666d2f use simplecache store on the server side to store remotefilelog cache
Summary:
simplecache can be configured with memcache backend

this will potentially save us a lot of disk space and allow us to have a shared cache between hg hosts.

getting rid of the caches on disks will save 966GB of disk space per machine.
P60876105

Reviewed By: quark-zju

Differential Revision: D13950137

fbshipit-source-id: 015e971f1bfed334edb4fe2381c2c6336b84b161
2019-02-07 05:15:11 -08:00
Liubov Dmitrieva
638959056d simplecache - reuse the connection to memcache
Summary:
reuse the connection for other requests
I made it global

Reviewed By: quark-zju

Differential Revision: D13964705

fbshipit-source-id: ed759e36f15b91a838dc2c20b58384ae54ad5d48
2019-02-07 04:59:48 -08:00
Liubov Dmitrieva
13abfafb8d treemanifest: use simplecache as a cache store
Summary:
simplecache extension support both memcache and local disk as a cache store.

we are going to use memcache on hg servers

getting rid of the caches on disks will save 966GB of disk space per machine.

P60876105

this will also allow hg machines to share the same cached data

Reviewed By: DurhamG

Differential Revision: D13927163

fbshipit-source-id: 3155c61da4a82dd7a790a8ccf8dbc701fe3957e1
2019-02-07 04:59:48 -08:00
Aida Getoeva
baa9bab088 set ui.slash=True if HGPLAIN=1
Summary:
`hg status` should show slashes in filepaths standard for the diff format. Now it shows windows' backslash.

More details:
https://fb.workplace.com/groups/scm/permalink/1933867456662865/

Reviewed By: quark-zju

Differential Revision: D13944478

fbshipit-source-id: d34d2c6bc0b9966e1806e36668c21e8abfc83a02
2019-02-07 04:32:27 -08:00
Adam Simpkins
8d35b90969 fix a crash in remotefilelog prefetch
Summary:
It looks like D13924759 accidentally replace `prog.value` with `prog` in one
location, which is causing crashes of the form:

  TypeError: unsupported operand type(s) for +=: 'nullbar' and 'int'

Reviewed By: quark-zju

Differential Revision: D13984835

fbshipit-source-id: cbf1a52d8048b623beac6048224767f0abb7f5c0
2019-02-06 22:03:19 -08:00
Jun Wu
dbc9a9f3e6 fscap: mark "fuse.ntfs" (ntfs-3g) as not supporting symlinks
Summary: See D13964546 for context.

Reviewed By: DurhamG, ikostia

Differential Revision: D13982878

fbshipit-source-id: abce6f3c005b916cfb2e7a34276b99f9fcaa44b5
2019-02-06 18:34:30 -08:00
Jun Wu
89882201b0 posix: detect fuse.ntfs on Linux
Summary:
On linux, ask /proc/self/mountinfo for the block device information, and then
ask udev for the filesystem type. It works for block devices, and is what
util-linux tools like findmnt, lsblk do.

This detects ntfs-3g mounts of block devices as `fuse.ntfs`.

Reviewed By: DurhamG

Differential Revision: D13982877

fbshipit-source-id: eacea6a949b54d9a6483f2c55c437718eb89c243
2019-02-06 18:34:30 -08:00
Jun Wu
efba35645a osutil: detect fuse on Linux
Summary:
The constant is not exposed in linux/magic.h, perhaps because fuse is an
optional feature. It's unlikely to be changed. Define it so fuse fstype
can be detected.

Reviewed By: DurhamG

Differential Revision: D13969640

fbshipit-source-id: 5084bdacf193261a187a74546a82995f2dd2d7c6
2019-02-06 18:34:30 -08:00
Stefan Filip
162f93f205 Remove argparse from the lib cargo workspace
Summary: `lib/argparse` fails to build with cargo. Removing the crate from the workspace to unblock building with cargo.

Reviewed By: quark-zju

Differential Revision: D13969332

fbshipit-source-id: 0299f74e6aa81632ce64005d91fa2c30a32f5b96
2019-02-06 16:42:23 -08:00
Jun Wu
54d5d24c00 test-convert-svn-branches: rewrite parts related to named branch
Summary:
Change the test to test extras instead of branches so it could still work
once `hg branches` gets removed.

Reviewed By: phillco

Differential Revision: D13934439

fbshipit-source-id: 60860936f60e177e12547345cbbd7591b1161a6f
2019-02-06 14:43:37 -08:00
Jun Wu
8a72b3e097 test-convert-svn-move: rewrite part related to named branch
Summary:
Change the test to test extras instead of branches so it could still work
once `hg branches` gets removed.

Reviewed By: phillco

Differential Revision: D13934445

fbshipit-source-id: e15c5b652481fcf95df851cdda8998764a98660c
2019-02-06 14:43:37 -08:00
Jun Wu
c54158e546 test-convert: remove part related to named branch
Summary: Named branch is going away globally.

Reviewed By: phillco

Differential Revision: D13934441

fbshipit-source-id: 74802d7bc118b8a379a9fde3b7ac74dfc4627cac
2019-02-06 14:43:37 -08:00
Jun Wu
a6a3bea200 test-fb-hgext-tweakdefaults: remove part related to named branch
Summary: Named branch is going away globally.

Reviewed By: phillco

Differential Revision: D13934434

fbshipit-source-id: c66f3370c09967d152524148f5ba403a7cecd928
2019-02-06 14:43:37 -08:00
Jun Wu
d0ec549a08 test-fb-hgext-treemanifest-treeonly-copyamend: stabilize the test
Summary:
Not sure why it's unstable. But the fetch stat gets printed sometimes. Add it
as an optional line.

Reviewed By: phillco

Differential Revision: D13934444

fbshipit-source-id: 3c39737fe95b1572ffcf672a7d8d431218202402
2019-02-06 14:43:37 -08:00
Jun Wu
515d86cdd7 test-issue842: remove the test
Summary:
The test was about warning of "heads". We allow multiple heads and have already
disabled some checkheads code paths (ex. D8148016). With commit cloud multiple
heads are a norm and not something that should be warned.

Reviewed By: phillco, singhsrb

Differential Revision: D13934438

fbshipit-source-id: e2e4971e05c5e0ca3ed4a5160c16d90f4f847e5f
2019-02-06 14:43:37 -08:00
Jun Wu
3febfb99dc test-issue619: remove the test
Summary:
The test was testing "fast-forward" merge, like:

  b
  |
  a (working copy, run "hg merge b && hg ci -m merge")

It's a no-op without branches. But if "a" and "b" have different branches, the
merge would do something and create a merge commit.

Without named branches, fast-forward merge would always be a no-op. Therefore
remove the test.

Reviewed By: phillco, singhsrb

Differential Revision: D13910539

fbshipit-source-id: 9f5a7817a3ff012d429810da3d54ab2174371bd0
2019-02-06 14:43:37 -08:00
Jun Wu
f48c2ace51 test-histedit-outgoing: drop branch related test cases
Summary: Branches will be disabled. Remove usage of them.

Reviewed By: phillco

Differential Revision: D13910540

fbshipit-source-id: 9d9c778afcb585197134adfa173103e81ae9ddcd
2019-02-06 14:43:37 -08:00
Jun Wu
15fd077a20 test-histedit-commute: avoid using branches
Summary: Branches will be disabled. Remove usage of them.

Reviewed By: phillco

Differential Revision: D13909733

fbshipit-source-id: 38c0dd487fa0756413d21de2990e76c5a6d321f7
2019-02-06 14:43:37 -08:00
Jun Wu
82116cc8ef test-verify: avoid using branches
Summary: Branches will be disabled. Remove usage of them.

Reviewed By: phillco

Differential Revision: D13910538

fbshipit-source-id: 971484beb7788d827892da958873f455b1ee34a3
2019-02-06 14:43:37 -08:00
Jun Wu
518db59b95 test-bundle: avoid using branches
Summary: Branches will be disabled. Remove usage of them.

Reviewed By: phillco, singhsrb

Differential Revision: D13909728

fbshipit-source-id: 2a4ae06f012e79979f6bebc285e841a88d5dc3a1
2019-02-06 14:43:37 -08:00
Durham Goode
af61927d32 remotefilelog: add documentation for remotefilelog.getfilesstep
Summary:
This is breaking the tests. It has existed for years, so not sure why
the recent reformatting broke it now.

Reviewed By: quark-zju

Differential Revision: D13976462

fbshipit-source-id: 08f3a9f08ec54449b4554017ea9806f3ee51afcb
2019-02-06 13:02:59 -08:00
Jun Wu
ac67645de2 ignore: stop using "{}" patterns
Summary:
Those are treated differently in eden or git vs ripgrep's ignore crate.
Tracking issue: https://github.com/BurntSushi/ripgrep/issues/1183

Change the gitignore rule to ignore `{}` patterns to solve the issue.

Reviewed By: sfilipco

Differential Revision: D13924426

fbshipit-source-id: 910bfff159509f2840ddcd4b4351577629228257
2019-02-06 13:02:59 -08:00
Aida Getoeva
562b9d1884 prefetch: remove check misses after fetching from server
Summary: We don't really need to check misses here as neither of request fucnctions return misses after fetching from the server. They raise exception if there are any misses.

Differential Revision: D13908252

fbshipit-source-id: 80b6e4fb79b419b5e6d3b343b3bd46d3f8dc7d3c
2019-02-06 10:43:15 -08:00
Aida Getoeva
996ac6da37 prefetch: add requestpacks
Summary: Implemented logic for fetching data from the scmmemcache and the server in pack files format. By default `prefetch` will still use loose files, unless the `remotefilelog.fetchpacks` config flag will be set to true.

Differential Revision: D13905733

fbshipit-source-id: cc559f5bc600067199a91efe6cf44b1bde6bf69b
2019-02-06 10:43:15 -08:00
Aida Getoeva
d853db727d prefetch: add get/set for pack files and remove hitcount
Summary: New get/set protocols for pack files. Also removed hitcount from `receive` method, because it is not used.

Differential Revision: D13924759

fbshipit-source-id: 1382b6f2bc865a19125f3ccd17a779cd16f08b50
2019-02-06 10:43:15 -08:00
Aida Getoeva
2b23a376f6 prefetch: get packs' paths after fetching from server
Summary: To add the data fetched from the server to the scmmemcache, we need to know pasths to the packfiles created.

Differential Revision: D13905734

fbshipit-source-id: 7c470b560e32e63e7df4f960be92bc9b6da9de3d
2019-02-06 10:43:15 -08:00