[PATCH 2 of 4 V2] parsers: write dirstate starting with non-normal entries

Laurent Charignon lcharignon at fb.com
Tue Dec 1 12:06:53 CST 2015


On Nov 30, 2015, at 9:33 PM, Martin von Zweigbergk <martinvonz at google.com<mailto:martinvonz at google.com>> wrote:



On Mon, Nov 30, 2015 at 4:57 PM Laurent Charignon <lcharignon at fb.com<mailto:lcharignon at fb.com>> wrote:
# HG changeset patch
# User Laurent Charignon <lcharignon at fb.com<mailto:lcharignon at fb.com>>
# Date 1448930384 28800
#      Mon Nov 30 16:39:44 2015 -0800
# Node ID 5e659a9b2694d155e33286ef9b236e092ce80ad0
# Parent  a86356722e51056c2bbfd6accae954ca386d92e1
parsers: write dirstate starting with non-normal entries

Before this patch we were writing the dirstate entries in a "random" way,
following the *unstable* order of a Python dictionary. This patch changes the
order in which we write the dirstate entries.

We now start with the non-normal files (that have changed and likely to have
changed) and end with the normal files. This makes the job of hg status easier
as, in most cases, it will need to access the non-normal entries of the
dirstate. This new ordering allows hg status to stop iterating over the dirstate
after processing those entries.

But that change to "hg status" is not in this patch, correct?

Correct

Is it coming later?

I have a patch working with hgwatchman to do that, I don't have a patch for vanilla hg without watchman.

It seems like some way of indicating whether the dirstate was written in this order is needed so the reader knows whether it has to read all of it or not. Maybe that's also coming later, or maybe you will just depend on that fact internally where you can better control what version of hg people are running? It feels like I'm missing some context here that others may have. Sorry if these are silly questions.

These are great questions and yes we probably need to indicate that the dirstate was written in order and that will be another dirstate format change.
Durham started a discussion on 11/11 about dirstate format change. Matt, suggested some changes to dirstate format.
I started a wiki page: https://www.mercurial-scm.org/wiki/DirstateFormatImprovementsPlan#preview to gather the desired format change.

What is the best way to go for implementing all of these changes, do we want a long patch series that shows the end to end improvement to status?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://selenic.com/pipermail/mercurial-devel/attachments/20151201/a7185aa5/attachment.html>


More information about the Mercurial-devel mailing list