D7834: nodemap: have some python code writing a nodemap in persistent binary form

2020-02-04 Thread martinvonz (Martin von Zweigbergk)
martinvonz added inline comments. INLINE COMMENTS > marmoute wrote in nodemap.py:47-49 > The Python code is not meant to be use in production, especially not the > parsing one (because it bring no advantage). > > So I want the API to be named after the actual semantic, not after this >

D8076: worker: Manually buffer reads from pickle stream

2020-02-04 Thread heftig (Jan Alexander Steffens)
heftig added a comment. I went for the wrapper overriding `read` after failing to find a way to ask `BufferedReader` whether data remains in the buffer. Even `peek` will trigger a blocking read when the buffer is empty. REPOSITORY rHG Mercurial CHANGES SINCE LAST ACTION

D7894: nodemap: introduce an option to use mmap to read the nodemap mapping

2020-02-04 Thread marmoute (Pierre-Yves David)
marmoute added a comment. marmoute updated this revision to Diff 19906. rebase to latest default REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.org/D7894?vs=19846=19906 CHANGES SINCE LAST ACTION https://phab.mercurial-scm.org/D7894/new/ REVISION DETAIL

D7888: nodemap: track the maximum revision tracked in the nodemap

2020-02-04 Thread marmoute (Pierre-Yves David)
marmoute added a comment. marmoute updated this revision to Diff 19900. rebase to latest default REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.org/D7888?vs=19840=19900 CHANGES SINCE LAST ACTION https://phab.mercurial-scm.org/D7888/new/ REVISION DETAIL

D7889: nodemap: track the total and unused amount of data in the rawdata file

2020-02-04 Thread marmoute (Pierre-Yves David)
marmoute added a comment. marmoute updated this revision to Diff 19901. rebase to latest default REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.org/D7889?vs=19841=19901 CHANGES SINCE LAST ACTION https://phab.mercurial-scm.org/D7889/new/ REVISION DETAIL

D7893: nodemap: update the index with the newly written data (when appropriate)

2020-02-04 Thread marmoute (Pierre-Yves David)
marmoute added a comment. marmoute updated this revision to Diff 19905. rebase to latest default REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.org/D7893?vs=19845=19905 CHANGES SINCE LAST ACTION https://phab.mercurial-scm.org/D7893/new/ REVISION DETAIL

D7892: nodemap: never read more than the expected data amount

2020-02-04 Thread marmoute (Pierre-Yves David)
marmoute added a comment. marmoute updated this revision to Diff 19904. rebase to latest default REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.org/D7892?vs=19844=19904 CHANGES SINCE LAST ACTION https://phab.mercurial-scm.org/D7892/new/ REVISION DETAIL

D7890: nodemap: double check the source docket when doing incremental update

2020-02-04 Thread marmoute (Pierre-Yves David)
marmoute added a comment. marmoute updated this revision to Diff 19902. rebase to latest default REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.org/D7890?vs=19842=19902 CHANGES SINCE LAST ACTION https://phab.mercurial-scm.org/D7890/new/ REVISION DETAIL

D7891: nodemap: write new data from the expected current data length

2020-02-04 Thread marmoute (Pierre-Yves David)
marmoute added a comment. marmoute updated this revision to Diff 19903. rebase to latest default REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.org/D7891?vs=19843=19903 CHANGES SINCE LAST ACTION https://phab.mercurial-scm.org/D7891/new/ REVISION DETAIL

D7885: nodemap: keep track of the docket for loaded data

2020-02-04 Thread marmoute (Pierre-Yves David)
marmoute added a comment. marmoute updated this revision to Diff 19897. rebase to latest default REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.org/D7885?vs=19838=19897 CHANGES SINCE LAST ACTION https://phab.mercurial-scm.org/D7885/new/ REVISION DETAIL

D7887: nodemap: add a flag to dump the details of the docket

2020-02-04 Thread marmoute (Pierre-Yves David)
marmoute added a comment. marmoute updated this revision to Diff 19899. rebase to latest default REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.org/D7887?vs=19768=19899 CHANGES SINCE LAST ACTION https://phab.mercurial-scm.org/D7887/new/ REVISION DETAIL

D7840: nodemap: add a (python) index class for persistent nodemap testing

2020-02-04 Thread marmoute (Pierre-Yves David)
marmoute added a comment. marmoute updated this revision to Diff 19888. rebase to latest default REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.org/D7840?vs=19756=19888 CHANGES SINCE LAST ACTION https://phab.mercurial-scm.org/D7840/new/ REVISION DETAIL

D7845: nodemap: add basic checking of the on disk nodemap content

2020-02-04 Thread marmoute (Pierre-Yves David)
marmoute added a comment. marmoute updated this revision to Diff 19893. rebase to latest default REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.org/D7845?vs=19834=19893 CHANGES SINCE LAST ACTION https://phab.mercurial-scm.org/D7845/new/ REVISION DETAIL

D7886: nodemap: introduce append-only incremental update of the persisten data

2020-02-04 Thread marmoute (Pierre-Yves David)
marmoute added a comment. marmoute updated this revision to Diff 19898. rebase to latest default REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.org/D7886?vs=19839=19898 CHANGES SINCE LAST ACTION https://phab.mercurial-scm.org/D7886/new/ REVISION DETAIL

D7884: nodemap: introduce an explicit class/object for the docket

2020-02-04 Thread marmoute (Pierre-Yves David)
marmoute added a comment. marmoute updated this revision to Diff 19896. rebase to latest default REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.org/D7884?vs=19837=19896 CHANGES SINCE LAST ACTION https://phab.mercurial-scm.org/D7884/new/ REVISION DETAIL

D7835: nodemap: write nodemap data on disk

2020-02-04 Thread marmoute (Pierre-Yves David)
marmoute added a comment. marmoute updated this revision to Diff 19883. rebase to latest default REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.org/D7835?vs=19825=19883 CHANGES SINCE LAST ACTION https://phab.mercurial-scm.org/D7835/new/ REVISION DETAIL

D7883: nodemap: keep track of the ondisk id of nodemap blocks

2020-02-04 Thread marmoute (Pierre-Yves David)
marmoute added a comment. marmoute updated this revision to Diff 19895. rebase to latest default REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.org/D7883?vs=19836=19895 CHANGES SINCE LAST ACTION https://phab.mercurial-scm.org/D7883/new/ REVISION DETAIL

D7846: nodemap: all check that revision and nodes match in the nodemap

2020-02-04 Thread marmoute (Pierre-Yves David)
marmoute added a comment. marmoute updated this revision to Diff 19894. rebase to latest default REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.org/D7846?vs=19835=19894 CHANGES SINCE LAST ACTION https://phab.mercurial-scm.org/D7846/new/ REVISION DETAIL

D7844: nodemap: code to parse the persistent binary nodemap data

2020-02-04 Thread marmoute (Pierre-Yves David)
marmoute added a comment. marmoute updated this revision to Diff 19892. rebase to latest default REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.org/D7844?vs=19833=19892 CHANGES SINCE LAST ACTION https://phab.mercurial-scm.org/D7844/new/ REVISION DETAIL

D7843: nodemap: move the iteratio inside the Block object

2020-02-04 Thread marmoute (Pierre-Yves David)
marmoute added a comment. marmoute updated this revision to Diff 19891. rebase to latest default REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.org/D7843?vs=19832=19891 CHANGES SINCE LAST ACTION https://phab.mercurial-scm.org/D7843/new/ REVISION DETAIL

D7834: nodemap: have some python code writing a nodemap in persistent binary form

2020-02-04 Thread marmoute (Pierre-Yves David)
marmoute added a comment. marmoute updated this revision to Diff 19882. rebase to latest default REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.org/D7834?vs=19824=19882 CHANGES SINCE LAST ACTION https://phab.mercurial-scm.org/D7834/new/ REVISION DETAIL

D7842: nodemap: use an explicit "Block" object in the reference implementation

2020-02-04 Thread marmoute (Pierre-Yves David)
marmoute added a comment. marmoute updated this revision to Diff 19890. rebase to latest default REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.org/D7842?vs=19831=19890 CHANGES SINCE LAST ACTION https://phab.mercurial-scm.org/D7842/new/ REVISION DETAIL

D7841: nodemap: add a optional `nodemap_add_full` method on indexes

2020-02-04 Thread marmoute (Pierre-Yves David)
marmoute added a comment. marmoute updated this revision to Diff 19889. rebase to latest default REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.org/D7841?vs=19830=19889 CHANGES SINCE LAST ACTION https://phab.mercurial-scm.org/D7841/new/ REVISION DETAIL

D7839: nodemap: delete older raw data file when creating a new ones

2020-02-04 Thread marmoute (Pierre-Yves David)
marmoute added a comment. marmoute updated this revision to Diff 19887. rebase to latest default REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.org/D7839?vs=19829=19887 CHANGES SINCE LAST ACTION https://phab.mercurial-scm.org/D7839/new/ REVISION DETAIL

D7836: nodemap: add a function to read the data from disk

2020-02-04 Thread marmoute (Pierre-Yves David)
marmoute added a comment. marmoute updated this revision to Diff 19884. rebase to latest default REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.org/D7836?vs=19826=19884 CHANGES SINCE LAST ACTION https://phab.mercurial-scm.org/D7836/new/ REVISION DETAIL

D7838: nodemap: use an intermediate "docket" file to carry small metadata

2020-02-04 Thread marmoute (Pierre-Yves David)
marmoute added a comment. marmoute updated this revision to Diff 19886. rebase to latest default REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.org/D7838?vs=19828=19886 CHANGES SINCE LAST ACTION https://phab.mercurial-scm.org/D7838/new/ REVISION DETAIL

D7837: nodemap: only use persistent nodemap for non-inlined revlog

2020-02-04 Thread marmoute (Pierre-Yves David)
marmoute added a comment. marmoute updated this revision to Diff 19885. rebase to latest default REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.org/D7837?vs=19827=19885 CHANGES SINCE LAST ACTION https://phab.mercurial-scm.org/D7837/new/ REVISION DETAIL

D8076: worker: Manually buffer reads from pickle stream

2020-02-04 Thread heftig (Jan Alexander Steffens)
heftig created this revision. Herald added subscribers: mercurial-devel, mjpieters. Herald added a reviewer: hg-reviewers. REVISION SUMMARY My previous fix (D8051 , which added Python's built-in buffering to the pickle stream) has the problem that the

D8075: config: also respect HGRCSKIPREPO in the zeroconf extension

2020-02-04 Thread marmoute (Pierre-Yves David)
marmoute created this revision. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers. REPOSITORY rHG Mercurial REVISION DETAIL https://phab.mercurial-scm.org/D8075 AFFECTED FILES hgext/zeroconf/__init__.py tests/test-hgrc.t CHANGE DETAILS diff --git

D8074: config: also respect HGRCSKIPREPO in hgwebdir_mod

2020-02-04 Thread marmoute (Pierre-Yves David)
marmoute created this revision. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers. REPOSITORY rHG Mercurial REVISION DETAIL https://phab.mercurial-scm.org/D8074 AFFECTED FILES mercurial/hgweb/hgwebdir_mod.py tests/test-hgrc.t CHANGE DETAILS diff --git

D8072: config: add a function in `rcutil` to abstract HGRCSKIPREPO

2020-02-04 Thread marmoute (Pierre-Yves David)
marmoute created this revision. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers. REVISION SUMMARY We wil need to respect this environment variable in more place. REPOSITORY rHG Mercurial REVISION DETAIL https://phab.mercurial-scm.org/D8072 AFFECTED FILES

D8073: config: also respect HGRCSKIPREPO in `dispatch._getlocal`

2020-02-04 Thread marmoute (Pierre-Yves David)
marmoute created this revision. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers. REVISION SUMMARY For some reason, we are also reading the local config in that function. REPOSITORY rHG Mercurial REVISION DETAIL https://phab.mercurial-scm.org/D8073

D8039: chg: force-set LC_CTYPE on server start to actual value from the environment

2020-02-04 Thread spectral (Kyle Lippincott)
spectral updated this revision to Diff 19876. REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.org/D8039?vs=19676=19876 BRANCH default CHANGES SINCE LAST ACTION https://phab.mercurial-scm.org/D8039/new/ REVISION DETAIL

D8023: chg: read CHGORIG_ values from env and handle these appropriately

2020-02-04 Thread spectral (Kyle Lippincott)
spectral updated this revision to Diff 19875. REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.org/D8023?vs=19652=19875 BRANCH default CHANGES SINCE LAST ACTION https://phab.mercurial-scm.org/D8023/new/ REVISION DETAIL

D8022: chg: pass copies of some envvars so we can detect py37+ modifications

2020-02-04 Thread spectral (Kyle Lippincott)
spectral updated this revision to Diff 19874. REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.org/D8022?vs=19656=19874 BRANCH default CHANGES SINCE LAST ACTION https://phab.mercurial-scm.org/D8022/new/ REVISION DETAIL

D8039: chg: force-set LC_CTYPE on server start to actual value from the environment

2020-02-04 Thread spectral (Kyle Lippincott)
spectral added a comment. In D8039#118719 , @yuja wrote: >> What do you think about this approach: >> 1. The server detects that LC_TYPE is coerced. >> 2. When handling the "validate" command, the server sends back "invalidate this

D8071: copies: avoid filtering by short-circuit dirstate-only copies earlier

2020-02-04 Thread martinvonz (Martin von Zweigbergk)
martinvonz created this revision. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers. REVISION SUMMARY The call to `y.ancestor(x)` triggered repo filtering, which we'd like to avoid in the simple `hg status --copies` case. REPOSITORY rHG Mercurial BRANCH

D8070: tests: add test showing that repo filter is calculated for `hg st --copies`

2020-02-04 Thread martinvonz (Martin von Zweigbergk)
martinvonz created this revision. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers. REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL https://phab.mercurial-scm.org/D8070 AFFECTED FILES tests/test-repo-filters-tiptoe.t CHANGE DETAILS diff --git

D7827: rebase: don't use rebased node as dirstate p2 (BC)

2020-02-04 Thread martinvonz (Martin von Zweigbergk)
martinvonz updated this revision to Diff 19871. REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.org/D7827?vs=19861=19871 BRANCH default CHANGES SINCE LAST ACTION https://phab.mercurial-scm.org/D7827/new/ REVISION DETAIL

D8041: revset: add a revset for parents in merge state

2020-02-04 Thread martinvonz (Martin von Zweigbergk)
martinvonz added inline comments. martinvonz marked an inline comment as done. INLINE COMMENTS > martinvonz wrote in next:3 > Those both sound like good ideas. I'll send an update later today. I've renamed them `conflictlocal()` and `conflictother()`. Hopefully that's clear enough and not too

D8043: graphlog: use '%' for other context in merge conflict

2020-02-04 Thread martinvonz (Martin von Zweigbergk)
martinvonz updated this revision to Diff 19870. REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.org/D8043?vs=19723=19870 BRANCH default CHANGES SINCE LAST ACTION https://phab.mercurial-scm.org/D8043/new/ REVISION DETAIL

D8041: revset: add a revset for parents in merge state

2020-02-04 Thread martinvonz (Martin von Zweigbergk)
martinvonz updated this revision to Diff 19869. REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.org/D8041?vs=19722=19869 BRANCH default CHANGES SINCE LAST ACTION https://phab.mercurial-scm.org/D8041/new/ REVISION DETAIL

D7932: debugstripbackups: introduce command to interact with strip backups

2020-02-04 Thread pulkit (Pulkit Goyal)
pulkit edited the summary of this revision. pulkit retitled this revision from "[RFC]debugbackups: introduce command to interact with strip backups" to "debugstripbackups: introduce command to interact with strip backups". pulkit updated this revision to Diff 19868. REPOSITORY rHG Mercurial

D8051: worker: Use buffered input from the pickle stream

2020-02-04 Thread yuja (Yuya Nishihara)
yuja added a comment. > for rfd, wfd in pipes: > os.close(wfd) > > - selector.register(os.fdopen(rfd, 'rb', 0), selectors.EVENT_READ) > > +selector.register(os.fdopen(rfd, 'rb'), selectors.EVENT_READ) Using buffered I/O can cause a deadlock (until the worker

Re: D8051: worker: Use buffered input from the pickle stream

2020-02-04 Thread Yuya Nishihara
> for rfd, wfd in pipes: > os.close(wfd) > -selector.register(os.fdopen(rfd, 'rb', 0), selectors.EVENT_READ) > +selector.register(os.fdopen(rfd, 'rb'), selectors.EVENT_READ) Using buffered I/O can cause a deadlock (until the worker process exits.) The master process

D7730: rebase: make sure pruning does not confuse rebase (issue6180)

2020-02-04 Thread pulkit (Pulkit Goyal)
pulkit added a comment. In D7730#117268 , @marmoute wrote: > I think is would be simpler and sfare to prevent unrelated operation during rebase. If the user cannot prune here we won't have to deal with it. This woudl also apply to other