Patchwork D11554: dirstate-item: update the attribute documentation

login
register
mail settings
Submitter phabricator
Date Oct. 1, 2021, 6:40 p.m.
Message ID <differential-rev-PHID-DREV-hwfajyhlulvtmvwqwdzc-req@mercurial-scm.org>
Download mbox | patch
Permalink /patch/49878/
State Superseded
Headers show

Comments

phabricator - Oct. 1, 2021, 6:40 p.m.
marmoute created this revision.
Herald added a reviewer: hg-reviewers.
Herald added a subscriber: mercurial-patches.

REVISION SUMMARY
  It was very outdated. We are about to change these attribute so we should has
  well have them documented so that the change get easier to grasp.

REPOSITORY
  rHG Mercurial

BRANCH
  default

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

AFFECTED FILES
  mercurial/pure/parsers.py

CHANGE DETAILS




To: marmoute, #hg-reviewers
Cc: mercurial-patches, mercurial-devel

Patch

diff --git a/mercurial/pure/parsers.py b/mercurial/pure/parsers.py
--- a/mercurial/pure/parsers.py
+++ b/mercurial/pure/parsers.py
@@ -48,12 +48,28 @@ 
 class DirstateItem(object):
     """represent a dirstate entry
 
-    It contains:
+    It hold multiple attributes
+
+    # about file tracking
+    - wc_tracked: is the file tracked by the working copy
+    - p1_tracked: is the file tracked in working copy first parent
+    - p2_tracked: is the file tracked in working copy second parent
 
-    - state (one of 'n', 'a', 'r', 'm')
-    - mode,
-    - size,
-    - mtime,
+    # about what possible merge action related to this file
+    - clean_p1: merge picked the file content from p1
+    - clean_p2: merge picked the file content from p2
+    - merged: file gather changes from both side.
+
+    # about the file state expected from p1 manifest:
+    - mode: the file mode in p1
+    - size: the file size in p1
+
+    # about the file state on disk last time we saw it:
+    - mtime: the last known clean mtime for the file.
+
+    The last three item (mode, size and mtime) can be None if no meaningful (or
+    trusted) value exists.
+
     """
 
     _wc_tracked = attr.ib()