This is a common technique to store variable-length integers efficiently.
It's compatible with both Thrift and Protobuf [1].
It's intended to be used in:
- On-disk file format to make the file compact and avoid issues like
https://bz.mercurial-scm.org/5681 (Obsolete markers code crashes with
metadata keys/values longer than 255 bytes).
- Thrift layer.
[1]: https://developers.google.com/protocol-buffers/docs/encoding#varints
Test Plan:
```
cargo test
cargo clippy
```
Also ran a kcov coverage check and it says 100%.
```
cargo rustc --lib --profile test -- -Ccodegen-units=1 -Clink-dead-code -Zno-landing-pads
kcov --include-path $PWD/src --verify target/kcov ./target/debug/*-????????????????
```
Differential Revision: https://phab.mercurial-scm.org/D929
Summary:
Let's switch to upstream phabricator for our code reviews. We keep the
internal configs around, and they can be accessed by swapping the .arcconfig
symlink if necessary.
Test Plan: hgarc lint, hgarc unit, hgarc diff
Reviewers: sid0, mitrandir, quark
Reviewed By: mitrandir, quark
Differential Revision: https://hg-phab.durin42.com/D1
Summary:
This diffs add a `getmeta` method to all content stores. The cdatapack code is
modified to pass the tests, it needs further change to support `getmeta`.
The datapack format is bumped to v1 from v0. For v1, we append a `metadata`
dict at the end of each revision. The dict is currently used to store revlog
flags and rawsize of raw revlog fulltext. In the future we can put more data
like a second hash etc, without changing API or format again.
This diff focuses on correctness. A datapack caching layer to speed up
`getmeta` will be added later.
Tests are updated since we write new v1 packfile now and the format change
leads to different content and packfile names.
`Makefile`, `ls-l.py` are added to make tests easier to maintain.
Test Plan: Updated existing tests.
Reviewers: #mercurial, rmcelroy, durham
Reviewed By: durham
Subscribers: rmcelroy, mjpieters
Differential Revision: https://phabricator.intern.facebook.com/D4903917
Signature: t1:4903917:1493255844:7ef5d487096cd2f78f2aaae672a68d49f33632ee
Summary:
We have encountered a kernel issue where `rmdir` a non-empty directory may race
with other things and hang in kernel for a long time.
This patch changes `os.rmdir` to avoid `rmdir` non-empty directories. It is
written in Cython calling the low-level `readdir` libc friends to make overhead
minimal.
Test Plan: Added a new test
Reviewers: #sourcecontrol, clm, rmcelroy
Reviewed By: rmcelroy
Subscribers: rmcelroy, simpkins, osandov, mjpieters
Differential Revision: https://phabricator.intern.facebook.com/D4716711
Tasks: 16647532
Signature: t1:4716711:1489627923:7c7432748c1fd8c070ce257bd172feebd3807f65
Summary:
This makes `arc unit` work for the repo.
Hopefully it helps improve the code quality.
Test Plan:
Run `arc unit`. Make some changes locally to confirm
it can handle skipped and failed tests.
Reviewers: #sourcecontrol, simonfar
Reviewed By: simonfar
Subscribers: simonfar, mjpieters
Differential Revision: https://phabricator.intern.facebook.com/D3889495
Signature: t1:3889495:1474454314:b3fb7e538979c775f8301d9abdad0d6eda71e411
Summary: This diff adds an `.hgignore` file for the `linelog` directory.
Test Plan: `make local`, and run `hg status`, make sure no unwanted files are printed.
Reviewers: #mercurial, ttung, akushner
Reviewed By: akushner
Subscribers: mjpieters
Differential Revision: https://phabricator.intern.facebook.com/D3699575
Signature: t1:3699575:1471151389:7e4de7b75d671d3f0db18337e57c65e9972de059
Summary: This allows us to use fastmanifest as a directory to drop in the python module.
Test Plan: compiles, passes existing tests.
Reviewers: lcharignon
Reviewed By: lcharignon
Subscribers: mitrandir, mjpieters
Differential Revision: https://phabricator.intern.facebook.com/D3351021
Signature: t1:3351021:1464284417:6cbcde514ab1fd7b5caa6c83cb5577f3502dbc58
Summary:
Still missing:
== Code and tests: ==
* remove path
* contains path (but this is essentially the same as get path)
* read/write from file
== Tests: ==
* checksumming directories
Test Plan: well, it kind of builds.
Reviewers: durham, simpkins, lcharignon
Reviewed By: lcharignon
Subscribers: net-systems-diffs@, mitrandir, mjpieters, akushner, rmcelroy
Differential Revision: https://phabricator.fb.com/D3120166
Signature: t1:3120166:1459464981:60f19dd1e36d62776a69fa88c018122a4be27d87
Summary:
Ignore the .testtimes file created by run-tests.py
This is the same ignore line used in the main hg repository's .hgignore file.
Test Plan: Ran "hg status", didn't see tests/.testtimes listed as untracked any more.
Reviewers: #sourcecontrol, rmcelroy, ttung, durham
Reviewed By: durham
Subscribers: net-systems-diffs@, yogeshwer, mjpieters
Differential Revision: https://phabricator.fb.com/D3014987
Signature: t1:3014987:1457138188:066392d386341e7304b875d9e0aa3d5f4b368a6a
Summary: Added all the sql commands for the MySQL remote database, and gathered all the commands in a single function
Test Plan: Created a serverrepo, two client ones, did push and pulls between them
Reviewers: #sourcecontrol, rmcelroy
Reviewed By: rmcelroy
Differential Revision: https://phabricator.fb.com/D2661606
Tasks: 8660367
Signature: t1:2661606:1447875185:0e9d3876b2f509028585349a9d05b447876b3da0
Summary: Because working in a virtualenv w/ setuptools makes things a little easier :)
Test Plan: workon hg && python setup.py develop
Reviewers: rmcelroy, durham
Reviewed By: durham
Differential Revision: https://phabricator.fb.com/D2570341
Signature: t1:2570341:1445542319:0f30cb4aefb7c59753decda4535ca335a4f423cc