[Commented On] D10983: dirstate-item: also build DistateItem in dirstate.directories()

SimonSapin phabricator at mercurial-scm.org
Tue Jul 6 09:04:58 UTC 2021


SimonSapin added a comment.


  Currently a `dirstatetuple` / `dirstateitem` only exists for paths that are present in dirstate-v1 and for which `dirstate.__contains__` returns true. It contains a `state` whose value is always `n`, `a`, `r`, or `m`. However we want to move towards not having this `state` at all other than in dirstate-v1 parsing and serialization. Adding more cases to handle makes that more difficult and isn’t necessary.
  
  In Rust code the `DirstateEntry` struct corresponds to `dirstatetuple` / `dirstateitem`. Current in the tree dirstate map, "directory" nodes don’t have a `DirstateEntry` at all. (And soon entry-less nodes won’t be just directories but will also potentially include ignored or unknown files.) When adding this `directories` iterator I only made it create tuples that look kinda like `dirstatetuple` as a shortcut because that’s what `debugcommands.debugstate` was already handling.

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST ACTION
  https://phab.mercurial-scm.org/D10983/new/

REVISION DETAIL
  https://phab.mercurial-scm.org/D10983

To: marmoute, #hg-reviewers
Cc: SimonSapin, mercurial-patches
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mercurial-scm.org/pipermail/mercurial-patches/attachments/20210706/db99f1b3/attachment-0002.html>


More information about the Mercurial-patches mailing list