D12623: clone: use better names for temp files

2022-05-10 Thread aalekseyev (Arseniy Alekseyev)
aalekseyev created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL https://phab.mercurial-scm.org/D12623 AFFECTED FILES mercurial/streamclone.py mercurial/util.py CHANGE DETAIL

D12607: censor: make rhg fall back to python when encountering a censored node

2022-05-05 Thread aalekseyev (Arseniy Alekseyev)
aalekseyev created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY This is to make it support censor.policy=ignore without having to duplicate that logic. Also, change the censor test in such a way that it uses rhg now,

D12604: censor: fix [hg update] away from a revision with censored files

2022-05-04 Thread aalekseyev (Arseniy Alekseyev)
aalekseyev created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL https://phab.mercurial-scm.org/D12604 AFFECTED FILES mercurial/filelog.py tests/test-censor2.t CHANGE DETAILS

D12584: censor: demonstrate a bug

2022-04-27 Thread aalekseyev (Arseniy Alekseyev)
aalekseyev created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL https://phab.mercurial-scm.org/D12584 AFFECTED FILES tests/test-censor2.t CHANGE DETAILS diff --git a/tests/te

D12549: branchmap: add a test that shows bad interaction with strip

2022-04-13 Thread aalekseyev (Arseniy Alekseyev)
aalekseyev created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL https://phab.mercurial-scm.org/D12549 AFFECTED FILES tests/test-strip-branch-cache.t CHANGE DETAILS diff --git

D12543: rhg: refactor to pass argv down, instead of caling args_os()

2022-04-12 Thread aalekseyev (Arseniy Alekseyev)
aalekseyev created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY This refactoring makes it easy to patch some command-line preprocessing into rhg. We use this to support using rhg as a shebang interpreter, for example. RE

D12542: narrow: support debugupgraderepo

2022-04-12 Thread aalekseyev (Arseniy Alekseyev)
aalekseyev created this revision. Herald added a reviewer: durin42. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL https://phab.mercurial-scm.org/D12542 AFFECTED FILES mercurial/upgrade_utils/a

D12213: rhg: simplify the handling of share-safe config mismatch

2022-02-21 Thread aalekseyev (Arseniy Alekseyev)
aalekseyev created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL https://phab.mercurial-scm.org/D12213 AFFECTED FILES rust/hg-core/src/repo.rs CHANGE DETAILS diff --git a/rust

D12202: status: fix hg status race against file deletion

2022-02-17 Thread aalekseyev (Arseniy Alekseyev)
aalekseyev created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REPOSITORY rHG Mercurial BRANCH stable REVISION DETAIL https://phab.mercurial-scm.org/D12202 AFFECTED FILES rust/hg-core/src/dirstate_tree/status.rs CHANGE DETAILS di

D12009: revlog: fix a bug where transaction can be aborted partially

2022-01-20 Thread aalekseyev (Arseniy Alekseyev)
aalekseyev created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY Fix a repo corruption bug caused by a partial transaction rollback. REPOSITORY rHG Mercurial BRANCH stable REVISION DETAIL https://phab.mercurial-scm.o

D12008: revlog: demonstrate a bug where transaction can be aborted partially

2022-01-20 Thread aalekseyev (Arseniy Alekseyev)
aalekseyev created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REPOSITORY rHG Mercurial BRANCH stable REVISION DETAIL https://phab.mercurial-scm.org/D12008 AFFECTED FILES tests/test-transaction-rollback-on-revlog-split.t CHANGE DE

D11882: rhg: fix a crash on non-generaldelta revlogs

2021-12-07 Thread aalekseyev (Arseniy Alekseyev)
aalekseyev created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REPOSITORY rHG Mercurial BRANCH stable REVISION DETAIL https://phab.mercurial-scm.org/D11882 AFFECTED FILES rust/hg-core/src/revlog/index.rs rust/hg-core/src/revlog/r

D11881: rhg: centralize index header parsing

2021-12-07 Thread aalekseyev (Arseniy Alekseyev)
aalekseyev created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY Centralize index header parsing, parse the generaldelta flag, and leave breadcrumbs to relate the code to python. REPOSITORY rHG Mercurial BRANCH stable

D11880: rhg: demonstrate that rhg breaks on non-generaldelta revlogs

2021-12-07 Thread aalekseyev (Arseniy Alekseyev)
aalekseyev created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REPOSITORY rHG Mercurial BRANCH stable REVISION DETAIL https://phab.mercurial-scm.org/D11880 AFFECTED FILES tests/test-rhg-no-generaldelta.t CHANGE DETAILS diff --git

D11818: rhg: refactor to use IgnoreFnType alias more widely

2021-11-29 Thread aalekseyev (Arseniy Alekseyev)
aalekseyev created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL https://phab.mercurial-scm.org/D11818 AFFECTED FILES rust/hg-core/src/matchers.rs CHANGE DETAILS diff --git a/

D11817: sparse: lock the store when updating requirements config

2021-11-29 Thread aalekseyev (Arseniy Alekseyev)
aalekseyev created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REPOSITORY rHG Mercurial BRANCH stable REVISION DETAIL https://phab.mercurial-scm.org/D11817 AFFECTED FILES mercurial/sparse.py tests/test-sparse-with-safe-share.t C

D11766: sparse: demonstrate a bug when used with safe-share

2021-11-16 Thread aalekseyev (Arseniy Alekseyev)
aalekseyev created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL https://phab.mercurial-scm.org/D11766 AFFECTED FILES tests/test-sparse-with-safe-share.t CHANGE DETAILS diff -

D11764: rhg: add support for narrow clones and sparse checkouts

2021-11-16 Thread aalekseyev (Arseniy Alekseyev)
aalekseyev created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY This adds a minimal support that can be implemented without parsing the narrowspec. We can parse the narrowspec and add support for more operations later.

D11752: rhg: allow rhg in sparse repos when the operations only need the store

2021-11-11 Thread aalekseyev (Arseniy Alekseyev)
aalekseyev created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL https://phab.mercurial-scm.org/D11752 AFFECTED FILES rust/hg-core/src/operations/list_tracked_files.rs rust/hg

D11751: rhg: only complain about poorly configured fallback when falling back

2021-11-11 Thread aalekseyev (Arseniy Alekseyev)
aalekseyev created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL https://phab.mercurial-scm.org/D11751 AFFECTED FILES rust/rhg/src/main.rs tests/test-rhg.t CHANGE DETAILS di

D11731: rhg: lazily get filesystem metadata

2021-11-02 Thread aalekseyev (Arseniy Alekseyev)
aalekseyev created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY rhg: use openat library for more efficient filesystem access REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL https://phab.mercurial-scm.org/D11

D11724: merge: with stable

2021-10-27 Thread aalekseyev (Arseniy Alekseyev)
aalekseyev created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL https://phab.mercurial-scm.org/D11724 AFFECTED FILES .hgsigs .hgtags relnotes/5.9 CHANGE DETAILS diff --gi

D11723: rhg: make it possible to opt out of [rhg cat]

2021-10-27 Thread aalekseyev (Arseniy Alekseyev)
aalekseyev created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REPOSITORY rHG Mercurial BRANCH stable REVISION DETAIL https://phab.mercurial-scm.org/D11723 AFFECTED FILES rust/rhg/src/commands/cat.rs CHANGE DETAILS diff --git a/r

D11722: rhg: implement the rhg-debugignore subcommand

2021-10-27 Thread aalekseyev (Arseniy Alekseyev)
aalekseyev created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY This can be used to inspect the generated pattern, but also to benchmark the time it takes to parse hgignore. REPOSITORY rHG Mercurial BRANCH stable RE

D11721: rhg: more efficient `HgPath::join`

2021-10-26 Thread aalekseyev (Arseniy Alekseyev)
aalekseyev created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY This commit makes `HgPath::join` slightly more efficient by avoiding one copy. It also avoids a particularly inefficient (quadratic) use of `HgPath::jo

D11716: tests: better determinism in test-chg.t

2021-10-21 Thread aalekseyev (Arseniy Alekseyev)
aalekseyev created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY chg tests fail pretty often with "Sample count: *" line disappearing. It disappears because the sample count is zero, in which case a custom message is print

D11689: rhg: simplify split_metadata

2021-10-19 Thread aalekseyev (Arseniy Alekseyev)
aalekseyev created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY It turns out that it's possible to implement `FilelogEntry.into_data` on top of `split`, as proposed by @spectral. REPOSITORY rHG Mercurial BRANCH defau

D11679: rhg: simplify the type of FilelogEntry

2021-10-15 Thread aalekseyev (Arseniy Alekseyev)
aalekseyev created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY rhg: add FilelogEntry.into_data rhg: internally, return a structured representatioon from hg cat REPOSITORY rHG Mercurial BRANCH default REVISION DE

D11664: rhg: fix `hg cat` interaction with null revision

2021-10-14 Thread aalekseyev (Arseniy Alekseyev)
aalekseyev created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL https://phab.mercurial-scm.org/D11664 AFFECTED FILES rust/hg-core/src/revlog/revlog.rs tests/test-rhg.t CHANG

D11659: rhg: do not try to open a nodemap for an inline index

2021-10-14 Thread aalekseyev (Arseniy Alekseyev)
aalekseyev created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY This saves an [open] system call per file, which is a small saving, but it showed up in the profile at large file counts (it accounted for 30ms out of 400ms

D11656: rhg: fix the test

2021-10-13 Thread aalekseyev (Arseniy Alekseyev)
aalekseyev created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL https://phab.mercurial-scm.org/D11656 AFFECTED FILES rust/hg-core/src/revlog/revlog.rs CHANGE DETAILS diff --g

D11651: rhg: do not fail when the repo is empty

2021-10-12 Thread aalekseyev (Arseniy Alekseyev)
aalekseyev created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL https://phab.mercurial-scm.org/D11651 AFFECTED FILES rust/hg-core/src/revlog/revlog.rs rust/hg-core/src/vfs.rs

D11650: rhg: handle null changelog and manifest revisions

2021-10-12 Thread aalekseyev (Arseniy Alekseyev)
aalekseyev created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL https://phab.mercurial-scm.org/D11650 AFFECTED FILES rust/hg-core/src/revlog/changelog.rs rust/hg-core/src/rev

D11617: rhg: in rhg cat cli, fix the long name of the --rev flag\n\nAlso tweak the help for the anonymous argument.

2021-10-05 Thread aalekseyev (Arseniy Alekseyev)
aalekseyev created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL https://phab.mercurial-scm.org/D11617 AFFECTED FILES rust/rhg/src/commands/cat.rs tests/test-rhg.t CHANGE DET

D11615: rhg: faster hg cat when many files are requested

2021-10-05 Thread aalekseyev (Arseniy Alekseyev)
aalekseyev created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL https://phab.mercurial-scm.org/D11615 AFFECTED FILES rust/hg-core/src/operations/cat.rs rust/rhg/src/commands/

D11616: rhg: stop manifest traversal when no more files are needed

2021-10-05 Thread aalekseyev (Arseniy Alekseyev)
aalekseyev created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL https://phab.mercurial-scm.org/D11616 AFFECTED FILES rust/hg-core/src/operations/cat.rs CHANGE DETAILS diff --