D11012: dirstate: add a function to update tracking status while "moving" parent

2021-07-07 Thread marmoute (Pierre-Yves David)
marmoute created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY The `scmutil.dirstateparent` is moving the dirstate parent without touching the working copy. It isi used by history rewriting operation like amending of

D11011: dirstate: introduce and internal `_remove` method

2021-07-07 Thread marmoute (Pierre-Yves David)
marmoute created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY We want to reserver `dirstate.remove` to `hg remove`-like case and move to a clear API for update of the dirstate coming from update/merge. The first step is

D11010: dirstate: introduce and internal `_add` method

2021-07-07 Thread marmoute (Pierre-Yves David)
marmoute created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY We want to reserver `dirstate.add` to `hg add`-like case and move to a clear API for update of the dirstate coming from update/merge. The first step is to

D11009: tests: demonstrate crash when common predecessor of divergence is hidden

2021-07-07 Thread martinvonz (Martin von Zweigbergk)
martinvonz 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/D11009 AFFECTED FILES tests/test-amend.t CHANGE DETAILS diff --git

D11006: remotefilelog: stop using RuntimeError for control flow

2021-07-07 Thread durin42 (Augie Fackler)
durin42 created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY We introduce a new exception to handle the various failure categories, rather than relying on RuntimeError. REPOSITORY rHG Mercurial BRANCH default

D11008: shallowutil: dedent code after the previous change

2021-07-07 Thread durin42 (Augie Fackler)
durin42 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/D11008 AFFECTED FILES hgext/remotefilelog/shallowutil.py CHANGE DETAILS diff

D11007: shallowutil: narrow scope of try/except block

2021-07-07 Thread durin42 (Augie Fackler)
durin42 created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY This will make this code easier to understand in the future. REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL

D11005: remotefilelog: tweak corrupt cache test to grep more flexibly

2021-07-07 Thread durin42 (Augie Fackler)
durin42 created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY I'm about to fix the abuse of RuntimeError here, which breaks the test if I don't do this. REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL

D11001: run-tests: also catch double-escapes for $TESTTMP

2021-07-07 Thread Raphaël Gomès
Alphare 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/D11001 AFFECTED FILES tests/run-tests.py tests/test-paths.t CHANGE DETAILS diff

D11004: test-run-tests: add missing backslash for Windows

2021-07-07 Thread Raphaël Gomès
Alphare 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/D11004 AFFECTED FILES tests/test-run-tests.t CHANGE DETAILS diff --git

D11003: windows: use cpu-intensive task instead of real time in test

2021-07-07 Thread Raphaël Gomès
Alphare created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY Windows profiling breaks when using real time instead of cpu, but we need the extension function to show up, so make it do something instead of waiting. I've

D11002: windows: use shell function instead of variable substitution

2021-07-07 Thread Raphaël Gomès
Alphare created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY This makes it compatible with Windows REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL https://phab.mercurial-scm.org/D11002 AFFECTED FILES

D11000: windows: add windows behavior on broken pager

2021-07-07 Thread Raphaël Gomès
Alphare created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY Apparently, Windows has "better" behavior than Unix in this case. This is an edge case that led me down a rabbit hole, only to find a bug in the Python

D10999: compat: normalise path before comparison in revlog splitting test

2021-07-07 Thread Raphaël Gomès
Alphare created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY This fixes the test on Window. REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL https://phab.mercurial-scm.org/D10999 AFFECTED FILES

D10998: windows: replicate the normalizing behavior of os.environ

2021-07-07 Thread Raphaël Gomès
Alphare created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY On Windows, `os.environ` normalizes environment variables to uppercase. Our current bytes-based environ substitution object is a simple dict, so we add the