##// END OF EJS Templates
obsolete: don't use os.stat in repo.obsstore.__nonzero__ if it's static HTTP...
obsolete: don't use os.stat in repo.obsstore.__nonzero__ if it's static HTTP If a repo is accessed via static HTTP, then we obviously can't use os.stat() to just peek at the file size. Let's download the entire file to check its size. Yes, this feels wasteful, but: 1. If we're cloning or pulling a repo from a static HTTP server, we need the contents of the obsstore anyway. 2. Implementing statichttpvfs.stat() that uses HEAD will result in one more request to a static-only HTTP server, which is already slow. Also parsing a response to a HEAD request to construct os.stat_result is pretty hacky. There's also a question of the remote server properly supporting HEAD method and reporting at least file size. 3. Implementing statichttpvfs.stat() that uses GET is pretty much the same thing as we do here, except we can't even cache the response easily, unlike simply accessing obsstore._data, which is @propertycache'd. Importing statichttprepo locally to avoid circular import. See also: 4507bc001365 and commit message of f8f2ecdde4b5. Differential Revision: https://phab.mercurial-scm.org/D12195

File last commit:

r49386:7e0dd0ec default
r49640:ef50a62e default
Show More
Cargo.toml
47 lines | 1.0 KiB | application/toml | TOMLLexer
Georges Racinet
rust: pure Rust lazyancestors iterator...
r40307 [package]
name = "hg-core"
version = "0.1.0"
authors = ["Georges Racinet <gracinet@anybox.fr>"]
description = "Mercurial pure Rust core library, with no assumption on Python bindings (FFI)"
Raphaël Gomès
rust: switch hg-core and hg-cpython to rust 2018 edition...
r42828 edition = "2018"
Georges Racinet
rust: pure Rust lazyancestors iterator...
r40307
[lib]
name = "hg"
Georges Racinet
rust: translated random test of missingancestors...
r41841
Raphaël Gomès
rust-dirstate: add rust implementation of `parse_dirstate` and `pack_dirstate`...
r42488 [dependencies]
Simon Sapin
rust: Align DirstateEntry internals with Python/C DirstateItem...
r48856 bitflags = "1.2"
Simon Sapin
dirstate-tree: Serialize to disk...
r47872 bytes-cast = "0.2"
Raphaël Gomès
rust: update all dependencies...
r45090 byteorder = "1.3.4"
Simon Sapin
rust: replace trivial `impl From …` with `#[derive(derive_more::From)]`...
r47164 derive_more = "0.99"
Simon Sapin
rust: Parse system and user configuration...
r47212 home = "0.5"
copies-rust: use immutable "OrdMap" to store copies information...
r46577 im-rc = "15.0.*"
Simon Sapin
dirstate-tree: Add the new `status()` algorithm...
r47883 itertools = "0.9"
Raphaël Gomès
rust: update all dependencies...
r45090 lazy_static = "1.4.0"
Simon Sapin
dirstate-v2: Replace the 32-bit `mode` field with two bits...
r49009 libc = "0.2"
Martin von Zweigbergk
rust: upgrade `rand*` crates...
r49403 rand = "0.8.4"
rand_pcg = "0.3.1"
rand_distr = "0.4.2"
Raphaël Gomès
rust-dependencies: update rayon...
r44618 rayon = "1.3.0"
Raphaël Gomès
rust-dependencies: update `regex` to 1.3.9...
r45405 regex = "1.3.9"
Simon Sapin
rust: Use a maintained crate for SHA-1 hashing...
r48171 sha-1 = "0.9.6"
Raphaël Gomès
rust-performance: introduce FastHashMap type alias for HashMap...
r44278 twox-hash = "1.5.0"
Raphaël Gomès
rust-utils: add util for canonical path...
r44783 same-file = "1.0.6"
Simon Sapin
rust: Make OwningDirstateMap generic and move it into hg-core...
r48766 stable_deref_trait = "1.2.0"
Simon Sapin
dirstate-v2: Skip readdir in status based on directory mtime...
r48138 tempfile = "3.1.0"
Simon Sapin
rust: use crossbeam-channel crate directly...
r46669 crossbeam-channel = "0.4"
Raphaël Gomès
rust-dependencies: upgrade `micro-timer` dependency...
r45461 micro-timer = "0.3.0"
Raphaël Gomès
rust: add logging utils...
r45027 log = "0.4.8"
Simon Sapin
rust: Update the memmap2 crate to version 0.4.0...
r48795 memmap2 = {version = "0.4", features = ["stable_deref_trait"]}
Antoine Cezar
hg-core: Add a limited read only `revlog` implementation...
r46097 zstd = "0.5.3"
Simon Sapin
rust: Upgrade to format-bytes 0.3...
r49323 format-bytes = "0.3.0"
Antoine Cezar
hg-core: Add a limited read only `revlog` implementation...
r46097
Raphaël Gomès
rust: update minimum supported Rust compiler version...
r46189 # We don't use the `miniz-oxide` backend to not change rhg benchmarks and until
# we have a clearer view of which backend is the fastest.
Antoine Cezar
hg-core: Add a limited read only `revlog` implementation...
r46097 [dependencies.flate2]
version = "1.0.16"
features = ["zlib"]
default-features = false
Raphaël Gomès
rust-pathauditor: add Rust implementation of the `pathauditor`...
r44737
[dev-dependencies]
Georges Racinet
rust-nodemap: pure Rust example...
r44870 clap = "*"
pretty_assertions = "0.6.1"