Commit Graph

21013 Commits

Author SHA1 Message Date
Jun Wu
94565d0386 lz4: use Rust lz4 binding
Summary:
Drop dependency of `python-lz4`.

Add some convertions from bytearray to bytes to make code compatible.

Reviewed By: DurhamG

Differential Revision: D13516212

fbshipit-source-id: 89beb0aa92be4c5442a8e837f509e1eb17bb1512
2018-12-20 17:54:22 -08:00
Jun Wu
22e9000fc9 lz4-pyframe: add compresshc
Summary:
Unfortunately required symbols are not exposed by lz4-sys. So we just declare
them ourselves.

Make sure it compresses better:

  In [1]: c=open('/bin/bash').read();
  In [2]: from mercurial.rust import lz4
  In [3]: len(lz4.compress(c))
  Out[3]: 762906
  In [4]: len(lz4.compresshc(c))
  Out[4]: 626970

While it's much slower for larger data (and compresshc is slower than pylz4):

  Benchmarking (easy to compress data, 20MB)...
            pylz4.compress: 10328.03 MB/s
       rustlz4.compress_py:  9373.84 MB/s
          pylz4.compressHC:  1666.80 MB/s
     rustlz4.compresshc_py:  8298.57 MB/s
          pylz4.decompress:  3953.03 MB/s
     rustlz4.decompress_py:  3935.57 MB/s
  Benchmarking (hard to compress data, 0.2MB)...
            pylz4.compress:  4357.88 MB/s
       rustlz4.compress_py:  4193.34 MB/s
          pylz4.compressHC:  3740.40 MB/s
     rustlz4.compresshc_py:  2730.71 MB/s
          pylz4.decompress:  5600.94 MB/s
     rustlz4.decompress_py:  5362.96 MB/s
  Benchmarking (hard to compress data, 20MB)...
            pylz4.compress:  5156.72 MB/s
       rustlz4.compress_py:  5447.00 MB/s
          pylz4.compressHC:    33.70 MB/s
     rustlz4.compresshc_py:    22.25 MB/s
          pylz4.decompress:  2375.42 MB/s
     rustlz4.decompress_py:  5755.46 MB/s

Note python-lz4 was using an ancient version of lz4. So there could be differences.

Reviewed By: DurhamG

Differential Revision: D13528200

fbshipit-source-id: 6be1c1dd71f57d40dcffcc8d212d40a853583254
2018-12-20 17:54:22 -08:00
Jun Wu
4f24bffdde cpython-ext: move pybuf to cpython-ext
Summary:
The `pybuf` provides a way to read `bytes`, `bytearray`, some `buffer` types in
a zero-copy way. The main benefit is to use same code to support different
input types. It's copied to a couple of places. Let's move it to `cpython-ext`.

Reviewed By: DurhamG

Differential Revision: D13516206

fbshipit-source-id: f58881c4bfe651a6fdb84cf317a74c3c8d7a4961
2018-12-20 17:54:22 -08:00
Jun Wu
08981fee2e rustlz4: use zero-copy return type
Summary:
Use the newly added zero-copy method to improve Rust lz4 performance. It's now
roughly as fast as python-lz4 when tested by stresstest-compress.py:

  Benchmarking (easy to compress data)...
            pylz4.compress: 10461.62 MB/s
       rustlz4.compress_py:  9379.41 MB/s
          pylz4.decompress:  3802.85 MB/s
     rustlz4.decompress_py:  3975.61 MB/s
  Benchmarking (hard to compress data)...
            pylz4.compress:  5341.69 MB/s
       rustlz4.compress_py:  5012.30 MB/s
          pylz4.decompress:  6768.17 MB/s
     rustlz4.decompress_py:  6651.08 MB/s

(Note: decompress can be visibly faster if we return `bytearray` instead of
`bytes`. However a lot of places expect `bytes`)

Previously, the result looks like:

  Benchmarking (easy to compress data)...
            pylz4.compress: 10810.05 MB/s
       rustlz4.compress_py: 11175.36 MB/s
          pylz4.decompress:  3868.92 MB/s
     rustlz4.decompress_py:   634.56 MB/s
  Benchmarking (hard to compress data)...
            pylz4.compress:  4565.91 MB/s
       rustlz4.compress_py:   622.94 MB/s
          pylz4.decompress:  6887.76 MB/s
     rustlz4.decompress_py:  2854.79 MB/s

Note this changes the return type from `bytes` to `bytearray` for the
`compress` function. `decompress` still returns `bytes`, which is important for
compatibility. Note that zero-copy `bytes` can not be implemented `compress` -
the size of `PyBytes` is unknown and cannot be pre-allocated.

Reviewed By: DurhamG

Differential Revision: D13516211

fbshipit-source-id: b21f852c390722c086aa2f37a758bf3f58af31b4
2018-12-20 17:54:22 -08:00
Jun Wu
3b35a77fe8 rustlz4: expose lz4-pyframe to Python
Summary:
This is intended to replace the python-lz4 library so we have a unified code
path.

However, added benchmark indicates the Rust version is significantly slower
than python-lz4:

  Benchmarking (easy to compress data)...
            pylz4.compress: 10964.14 MB/s
       rustlz4.compress_py: 12126.00 MB/s
          pylz4.decompress:  3908.29 MB/s
     rustlz4.decompress_py:   798.68 MB/s
  Benchmarking (hard to compress data)...
            pylz4.compress:  5615.86 MB/s
       rustlz4.compress_py:   740.32 MB/s
          pylz4.decompress:  6145.68 MB/s
     rustlz4.decompress_py:  2423.99 MB/s

The only case where the Rust version is fine is when the returned data is
small. That suggests rust-cpython was likely doing some memcpy unnecessarily.

Reviewed By: DurhamG

Differential Revision: D13516207

fbshipit-source-id: 72150b15c38bc8d8c7e7717a56a41f48d114db19
2018-12-20 17:54:21 -08:00
Wez Furlong
617ce8db95 hg: unconditionally add IPython.zip to sys.path on startup
Summary:
Rather than only making it available to `hg dbsh`,
add it for all commands/extensions to use.

Reviewed By: quark-zju

Differential Revision: D13505762

fbshipit-source-id: c79fee888d9394c5ad70d3d8b7f59addef1381a1
2018-12-19 15:58:57 -08:00
Marla Azriel
02d41c83e8 commands: help text for update / checkout
Summary: Updated help text for hg update / hg checkout and removed --date option

Reviewed By: ikostia

Differential Revision: D13071724

fbshipit-source-id: 31b51b26f5d199e356f2148353d6714cecc1f632
2018-12-17 14:33:04 -08:00
Jun Wu
fd1b928138 extensions: work with 'hgext.' prefix
Summary:
Be compatible with `hgext.` or `hgext/` prefix. But print a warning saying it's
deprecated.

Reviewed By: DurhamG

Differential Revision: D13490362

fbshipit-source-id: ef13bd57a74be810df409af18a6259bc7b2b6dad
2018-12-17 12:53:12 -08:00
Mark Thomas
75853bb1a6 templater: add default argument to dict get
Summary:
Add a third argument to the `get(dict, key)` template function that serves as a
default.

Reviewed By: DurhamG, quark-zju

Differential Revision: D12980774

fbshipit-source-id: d619275dd3ae880f6aba4c2b3d91aea4b45ea6d6
2018-12-14 06:43:41 -08:00
Mark Thomas
d47eff8070 mutationstore: add Python bindings
Reviewed By: DurhamG, quark-zju

Differential Revision: D12980786

fbshipit-source-id: b1bec8618b335b2790ad9c913b2a4f46573e3c03
2018-12-14 06:43:40 -08:00
Jun Wu
810130a5b9 extensions: remove foreign extension check
Summary:
The test failed because "hgext" is no longer a namespace package.  The check
becomes unnecessary since we almost always use the in-repo modules.

Reviewed By: DurhamG

Differential Revision: D13453160

fbshipit-source-id: 0c5a72b3abeb0a12426d8ed15c045a4ce478a4c6
2018-12-13 12:01:13 -08:00
Mark Thomas
1fa24ad41e drawdag: add --print option
Summary:
Add a new `--print` option to drawdag which prints the commit hashes and
descriptions of all the nodes that were generated by drawdag.

Reviewed By: quark-zju

Differential Revision: D10149266

fbshipit-source-id: 55b4c133b3c98c0258419811d7c00a3ec73a02cc
2018-12-13 10:47:28 -08:00
Mark Thomas
641d1f8d75 drawdag: add fold and revive support
Reviewed By: quark-zju, ikostia

Differential Revision: D10149264

fbshipit-source-id: 42291bbfe41980764b5fa0a62a9cfc60523a2c50
2018-12-13 10:47:28 -08:00
Mark Thomas
1d3d4047e1 mutation: add drawdag support
Summary:
Update drawdag to generate mutation metadata in commits when mutation recording
is enabled.

In order for this to work, we need to add the mutation relationships as edges
between the commits, so that when walking the DAG the predecessors are already
committed and we can find their hashes.

Reviewed By: ikostia

Differential Revision: D9989024

fbshipit-source-id: 671c1eb6c4ae6e87760efb4d3aa47e5e0585c94d
2018-12-13 10:47:28 -08:00
Mark Thomas
079200e14f localrepo: add localrepo.nodes
Summary:
Add a convenience function that generates the nodes that match a revset, rather
than the contexts or rev numbers.

Reviewed By: DurhamG, quark-zju

Differential Revision: D10149262

fbshipit-source-id: 5c889b1c7f03e3fcda7dccd297674c40729ccd90
2018-12-13 10:47:28 -08:00
Mark Thomas
0b6a37c648 mutation: add pushrebase support
Summary: Add support for mutation information being added when a commit is pushrebased.

Reviewed By: DurhamG, quark-zju, ikostia

Differential Revision: D9975558

fbshipit-source-id: 55444c05df32e5be159fbc19610f7a13ab103109
2018-12-13 10:47:28 -08:00
Mark Thomas
4c62f2092c mutation: add split support
Summary:
Add support for mutation information being added when a commit is split.

The top of the final stack is the commit that stores the mutation metadata.
The other commits in the stack are just normal new commits, although the final
commit does record their hashes in its metadata.

Determining when the last commit in the stack happens before it is committed is
a little hard, as the code previously relied on the dirstate ending up clean
to detect a finished split.  Instead we look at the patches that come out of
the filter function and see if they match the original patches that were sent
in.

Reviewed By: DurhamG, ikostia

Differential Revision: D9975469

fbshipit-source-id: acec485f9b561952f4ccdbaaf9491c9d48a70f58
2018-12-13 10:47:28 -08:00
Mark Thomas
ff72745779 mutation: add metaedit and fold support
Summary:
Add support for mutation information being added when a commit is metaedited or
folded.

The folded commit uses the top of the original stack as its predecessor.  The
other commits that are folded are also stored in the metadata.

Reviewed By: DurhamG, quark-zju, ikostia

Differential Revision: D9975471

fbshipit-source-id: 92089d14cd5d65df283bbdc80a8b352b5f3982e9
2018-12-13 10:47:27 -08:00
Mark Thomas
da8491a8bc mutation: add rebase support
Summary: Add support for mutation information being added when a commit is rebased.

Reviewed By: DurhamG, quark-zju, ikostia

Differential Revision: D9975481

fbshipit-source-id: 02a1ace0d6c80d73b1ab76e4d1b23a8d46ab049b
2018-12-13 10:47:27 -08:00
Mark Thomas
c4c48ecac7 mutation: add amend support
Summary: Add support for mutation information being added when a commit is amended.

Reviewed By: DurhamG, ikostia

Differential Revision: D9975472

fbshipit-source-id: 57d51823e709f71a88ad0fb86992a0a38541527c
2018-12-13 10:47:27 -08:00
Mark Thomas
e29647fd94 debugcommands: add debugmutation
Summary: Add a new command to debug-dump mutation information in commits

Reviewed By: DurhamG, quark-zju

Differential Revision: D9975474

fbshipit-source-id: a9ed1578dffc80da3e375837cede8d8685ee0427
2018-12-13 10:47:27 -08:00
Mark Thomas
39e6ad41fb mutation: add mutation information to commit contexts
Summary:
This is the first commit in a series that will replace obsolescence markers
with separate tracking of commit mutation and visibility.

Mutation information is metadata about which commit was mutated and in which
way that led to the creation of this commit.  It is embedded in the extras of
the commit object.

This commit adds the fields to the commit context.  Future commits will create
the mutation information when commits are mutated.

Reviewed By: DurhamG, quark-zju, ikostia

Differential Revision: D9975470

fbshipit-source-id: 0107308731dc021cb72734db8b5dc0a02e6e86e1
2018-12-13 10:47:27 -08:00
Jun Wu
4bfce6446b commands: add "debugstatus"
Summary: Add a dedicated command to debug recent status performance issues.

Reviewed By: DurhamG

Differential Revision: D12910541

fbshipit-source-id: 792bb9bd83e2f43225d9aad4aef64ece45db7ecc
2018-12-13 09:10:21 -08:00
Mark Thomas
56fe009358 help: allow help text config for aliases to be quoted
Summary:
In order for the help text for aliases to be valid RST, it must be possible to
indent some of the lines.  This isn't possible with normal config, as leading
whitespace is stripped.  Make it valid for lines in alias documentation to be
quoted, preserving leading whitespace.

Reviewed By: singhsrb

Differential Revision: D13431946

fbshipit-source-id: eefada39bcd92ce5162a0f34027b9380b5a420c9
2018-12-13 03:11:40 -08:00
Jun Wu
13c3e1c6eb dirstate: stop testing directories as files in ignore handling
Summary:
This is subtle.

`.hgignore`'s current behavior: if `^foo$` rule exists, then directory `foo/`
is ignored (ex. 'foo/bar' should be ignored).

However, that imposes problems for the sparse ignore matcher, which is the
"negate" of the "include" matcher. A user can write `[include]` glob patterns
like:

  a*{b*,c*/d*}/e*

The ignore matcher will be the negate of the above patterns. Then because
`a1b2` does not match `a*{b*,c*/d*}/e`, the negate matcher returns "True",
and the ignore matcher will ignore the directory. So even if file `a1b2/e3`
should be selected, the parent directory being ignored cause the file to
be ignored.

That is clearly incorrect for sparse's usecase.

I think the issue is fundementally a layer violation - it's the *matcher*'s
responsibility to check whether one of the parent directory is matched (or
ignored), not the directory walker's responsibility.

This diff fixes the walker so it uses the visitdir interface, and moves back
the directory check to hgignore matcher to maintain compatibility. For three
matchers involved in ignore handling:

- hgignore matcher: updated to do the recursive directory handling on its own
- gitignore matcher: work out of box. already consider parent directories!
- sparse matcher: want the new behavior

`test-sparse-issues.t` is now green.

With this change, the `forceincludematcher` subdir hack used in sparse is no
longer necessary. Therefore removed.

Besides, all ignore matchers can handle "visitdir" correctly. That is, if
`visitdir('x')` returns `'all'`, then `visitdir('x/y')` will also return `'all'`.
Therefore the parent directory logic in `dirstate.dirignore` becomes
unnecessary and dropped.

Reviewed By: DurhamG

Differential Revision: D10861612

fbshipit-source-id: aa0c181ae64b361b85f08b8fecfdfe6331e9a4c2
2018-12-12 22:44:17 -08:00
Jun Wu
ea51d92c68 commands: move debugcommands to commands/debug
Reviewed By: DurhamG

Differential Revision: D12910540

fbshipit-source-id: 1f4413db6294cbdf0333b88cac1e7d22f81ccc9c
2018-12-12 21:03:38 -08:00
Jun Wu
1ef3e33b69 configwarn: remove the extension
Summary:
The extension was mainly for users `pip install <3rd-party-hg-ext>`, which
usually installs them into `hgext3rd`. Since we no longer search into
`hgext3rd`, this extension can be removed.

Reviewed By: DurhamG

Differential Revision: D13440401

fbshipit-source-id: d67a655ece9a1f6d5feb18d8aeac84852edfdcb9
2018-12-12 18:54:22 -08:00
Jun Wu
ee754d941a hgext: drop support for thirdparty default extensions
Summary:
Our codebase is already unfriendly to 3rd-party extensions and we will likely
break the compatibility as part of revisising / replacing components in Rust
anyway. So just stop supporting `--config extensions.3rdpartyfoo=`.

Note `--config extensions.3rdpartyfoo=foo.py` still works.

This also makes `ImportError` more meaningful. Previously, when `hgext.foo`
imports `bar` which does not exist, the error is "cannot import foo", while
it should really be "cannot import bar". That is because extensions.py falls
back to import `hgext3rd.foo`, and `foo`. Now extensions.py only tries
`hgext.foo` and will suface the right error.

Reviewed By: DurhamG

Differential Revision: D13440400

fbshipit-source-id: c659f6d05abbc0d09f2811f36c0dc31e49491f19
2018-12-12 18:54:22 -08:00
Xinyue Zhang
65ed20fe71 Pass callsite to worker to enable thread-based windows worker from blobstore.
Summary:
This diff adds the `callsite` parameter to worker.worker and checks whether the passed-in callsite is enabled in the worker.enablecallsites config flag. This change essentially enabled parallization for lfs prefetch, which is called during initial repo clone(when mercurial cache is clean). Since blobstore.py seems to be thread-safe, we could also anticipate similar improvements for the more generalized `hg udpate` case by batching files to download.

Details see T37718264

Reviewed By: ikostia

Differential Revision: D13284680

fbshipit-source-id: c3b825033a28344e19ba5ca1621b59fe7b46b322
2018-12-07 15:57:41 -08:00
Jun Wu
b51bf2af16 filemerge: fix fcd.p1 raising exception
Summary:
See user report https://fburl.com/latdfq5n. `fcd` in the code path is not
always a `workingfilectx` and calling `p1` might raise if it does not have
a parent.

Reviewed By: phillco

Differential Revision: D13144605

fbshipit-source-id: 8961943e65504b43b4a9d1a4828755fdf8ca0915
2018-12-06 19:38:36 -08:00
Jun Wu
232dbea03a config: use Rust-backed parselist
Summary:
Now that `parselist` is available in Rust. Let's switch to that.
It's 50x faster.

```
In [1]: s='command, commandfinish, commandexception, exthook, pythonhook, fsmonitor, fsmonitor_details,
   ...:  fsmonitor_status, treedirstate, watchman-command, merge-resolve'

In [3]: p1=m.config.parselist

In [4]: %timeit p1(s)
10000 loops, best of 3: 97.2 µs per loop

In [5]: from mercurial.rust import config

In [6]: p2=config.parselist

In [9]: %timeit p2(s)
100000 loops, best of 3: 2.03 µs per loop
```

Reviewed By: DurhamG

Differential Revision: D9332596

fbshipit-source-id: e7b7d5d41f537d663d36169e14d27ed3d395a59c
2018-12-06 18:23:52 -08:00
Jun Wu
417dc50086 util: remove xmlrpclib
Summary:
The last use of it was the bugzilla extension, which was removed.
Therefore remove it.

Reviewed By: DurhamG

Differential Revision: D13285203

fbshipit-source-id: 47d1fc9df68369660a63313fe4f39aaaffd7f239
2018-12-06 15:37:40 -08:00
Jun Wu
7c69c26d52 date: fix parsing months
Summary:
Backports my upstream patch (https://phab.mercurial-scm.org/D2289)

Discovered by nemo on #mercurial freenode IRC, some months did not parse.

Reviewed By: DurhamG

Differential Revision: D12983571

fbshipit-source-id: b33227b0c986180966579afbb2b7c11fd48d275b
2018-12-06 15:14:18 -08:00
Durham Goode
1a3a0bcd72 nodemap: add key iteration
Summary:
An upcoming diff will need the ability to iterate over all the keys in
the store. So let's expose that functionality.

Reviewed By: quark-zju

Differential Revision: D13062575

fbshipit-source-id: a173fcdbbf44e2d3f09f7229266cca6f3e67944b
2018-12-06 11:47:41 -08:00
Durham Goode
60b3bebaff nodemap: python bindings for rust nodemap
Summary: Simple python bindings for the new nodemap rust structure

Reviewed By: quark-zju

Differential Revision: D13062572

fbshipit-source-id: d60407b87bfc19b496de09273a9c8d6b59af0b8b
2018-12-06 11:47:41 -08:00
Jun Wu
7f87056c37 crecord: show hint about how to use the text interface
Summary:
When the curses interface cannot be used, prompt the user about the text
interface to unblock.

Reviewed By: akushner

Differential Revision: D12987094

fbshipit-source-id: 3eff84d9daaaf19aaa08ebf28cbd7c7bf98f9e9a
2018-12-05 20:09:19 -08:00
Jun Wu
c92e6755d7 plain: add a diff exception
Summary:
Oculus wants to preserve the "do not show binary diff" config while running
`hg export` in automation, since printing the binary diff might just OOM the
container. Let's add a plain exception for it.

Reviewed By: zhh95

Differential Revision: D13111212

fbshipit-source-id: 34af58ac0917de3b3231e637774896d882585e26
2018-12-05 19:23:41 -08:00
Arun Kulshreshtha
2e0f511f6a mononokeapi: fix test-check-code.t
Summary: Fix test failures (`test-check-code.t` and `test-check-config.t`) introduced by my Mononoke API diff stack. I thought Sandcastle would have surfaced these, but I guess not.

Reviewed By: quark-zju

Differential Revision: D13325133

fbshipit-source-id: fd14f4c7e7280155d6f677f18b20691ef54ceca3
2018-12-04 14:39:10 -08:00
Arun Kulshreshtha
ab8ee2e25f pymononokeapi: move pymononokeapi to mercurial/rust
Summary: Per Durham's [comment](https://our.intern.facebook.com/intern/diff/D13055688/?dest_number=63755711&transaction_id=282439265810677) on my previous diff, move `pymononokeapi` to `mercurial/rust` from `hgext/extlib`, since it should not be an extension.

Reviewed By: quark-zju

Differential Revision: D13310612

fbshipit-source-id: ad33753f2db3d92a10271a1592d00b4167399b8f
2018-12-03 18:11:26 -08:00
Haozhun Jin
118a28335d repack: flush new pack files before proceeding to delete old ones
Summary:
Make repacks flush the newly created pack files to disk before proceeding to
delete the old datapacks. This ensures the data is committed to disk before we
delete the old pack files. There had been user complaints of data corruption.

The changes affects repack only to avoid slowing down performance for other
operations with manipulates datapack and historypack.

Reviewed By: DurhamG

Differential Revision: D12920147

fbshipit-source-id: 907b64d7763a6212fb49487cfc3bc403f8e3dce2
2018-11-28 17:58:31 -08:00
Haozhun Jin
461dabad96 bookmark: Turn BookmarkStore into indexed-log backed
Summary:
Turn BookmarkStore rust implementation into indexed-log backed.
Note that this no longer matches existing mercurial bookmark store
disk representation.

Reviewed By: DurhamG

Differential Revision: D13133605

fbshipit-source-id: 2e0a27738bcec607892b0edab6f759116929c8e1
2018-11-28 10:21:26 -08:00
Anastasiya Zhyrkevich
baad48586f lfs debug command to receive a bunch of objects
Summary:
debugcommand for receiving several lfs objects from server
Analog to the funtion `debuglfsreceive`, but for several objects

Will be used in replay traffic for Mononoke LFS.

Requires URL and an iterable with oids and sizes.
Format required:
url, (oid1, size1, oid2, size2, ... )

Write all files to the console.

Reviewed By: quark-zju

Differential Revision: D12956274

fbshipit-source-id: f83dd0636b2ad197cace9633222d0f1ed8191dab
2018-11-13 03:11:18 -08:00
Durham Goode
60c80f4f48 remotefilelog: move remotefilelog specific fileslog logic to remotefilelog
Summary:
We had remotefilelog specific logic in core mercurial code. Now that
we have the fileslog abstraction we can hide remotefilelog specific invalidation
in a remotefilelog specific fileslog implementation.

Reviewed By: quark-zju

Differential Revision: D12959495

fbshipit-source-id: ccf224bf9799eb1af74f0dff6021fcbc2eb20d68
2018-11-11 21:37:52 -08:00
Durham Goode
55010e4e41 remotefilelog: introduce the concepts of a fileslog
Summary:
In upcoming diffs I want to introduce lifetime management for
structures receiving writes for file content. We need to be able commit these at
the end of a transaction, and roll them back in the event of an abort.

We already have this, but it's adhoc and inconsistent. Let's introduce the
concept of a fileslog on the repository that is responsible for all filelog read
writes. At the moment it doesn't manage reads, and only governs remotefilelog
writes, but we can extend this later.

This pattern of a top level repo.*log property that manages the reading/writing
of a type of object is already used in the manifestlog and has proven to be
relatively clean.

Reviewed By: quark-zju

Differential Revision: D12959494

fbshipit-source-id: 676aa86c313cb7e48512091a9c19b9452e8f114a
2018-11-11 21:37:52 -08:00
Durham Goode
23f7e93958 remotefilelog: remove writestore concept from union stores
Summary:
Previously, remotefilelog tried to hide which store should receive
writes behind the union store abstraction. This is starting to make things a
little complicated though. For instance, it means that right now both local data
and local history are written via one api on the remotefilelogcontentstore, even
though the remotefilelogcontentstore should only be about data. It also means
that remotefilelogcontentstore had to become aware of pack files, which it can't
read, so it no longer upholds the guarantee that anything written to it can be
immediately read. Overall it's just confusing.

This diff rips out the writestore concept, and instead has the store setup logic
store the writable stores directly on the repo, and changes the write path to
write to those stores directly. Thus removing the notion of pack files from
remotefilelogcontentstore.

A future diff will clean this up even further, and fix the bug where you can't
read data that was just written to a local pack.

Reviewed By: quark-zju

Differential Revision: D12959502

fbshipit-source-id: 85c39c0696febd0972a21f22f3640fd6954901c1
2018-11-11 21:37:52 -08:00
Jun Wu
ef5f621baa progress: drop config to specify condtype
Summary:
The Rust condition implemenation seems working okay. Therefore drop the support
to switch to buggy `threading.Condition`.

Reviewed By: phillco

Differential Revision: D12875128

fbshipit-source-id: 15f41bdc3fceeaa7de7d8cdbd76ee6d70951c107
2018-11-09 15:27:52 -08:00
Marla Azriel
4027f3a7e9 commands: update help text for smartlog, show, diff
Summary: Provides updated help text for hg smartlog, hg show, and hg diff

Reviewed By: markbt

Differential Revision: D12950765

fbshipit-source-id: d442079499abada1740760c8b6d0c27bf4a2b2d3
2018-11-09 13:14:20 -08:00
Jun Wu
4a49dc876f crecord: fix line number in hunk header
Summary:
`@@ -1,1 +-1,0 @@` is not a valid patch hunk header.
Change it to `@@ -1,1 +0,0 @@`.

This is a backport of my upstream patch https://phab.mercurial-scm.org/D3737

Reviewed By: singhsrb

Differential Revision: D12970975

fbshipit-source-id: eb769e93076efc932a8c4be7387ba21933aae331
2018-11-08 12:34:36 -08:00
Saurabh Singh
b481467dd4 doc: fix 'make doc'
Summary: This has been broken after D12832280.

Reviewed By: quark-zju

Differential Revision: D12981581

fbshipit-source-id: 3f411260e24e623abb6f18814fa5b0bf87b416cd
2018-11-08 10:46:24 -08:00
Kostia Balytskyi
d2c2c250e0 windows: use correct rename exception raising logic
Summary:
The way I wrote this, `if e.errno != errno.EEXIST or e.errno != errno.EACCES`
this condition never succeeds. So we're re-raising always, rather than falling
back to a `delete/rename` strategy.

Differential Revision: D12974035

fbshipit-source-id: 0b500d009315ba0094019a82576d5a3698b624b2
2018-11-08 06:00:16 -08:00