Patchwork D11413: dirstate-v2: Remove the `.d` suffix in data file names

login
register
mail settings
Submitter phabricator
Date Sept. 14, 2021, 1:42 p.m.
Message ID <differential-rev-PHID-DREV-l6acvkklgqlkavzi6cze-req@mercurial-scm.org>
Download mbox | patch
Permalink /patch/49731/
State Superseded
Headers show

Comments

phabricator - Sept. 14, 2021, 1:42 p.m.
SimonSapin created this revision.
Herald added a reviewer: hg-reviewers.
Herald added a subscriber: mercurial-patches.

REVISION SUMMARY
  It could cause confusion since `.d` is already used for revlogs.
  This suffix is not necessary since there is already a `dirstate.` prefix.

REPOSITORY
  rHG Mercurial

BRANCH
  default

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

AFFECTED FILES
  mercurial/dirstateutils/docket.py
  rust/hg-core/src/dirstate_tree/on_disk.rs

CHANGE DETAILS




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

Patch

diff --git a/rust/hg-core/src/dirstate_tree/on_disk.rs b/rust/hg-core/src/dirstate_tree/on_disk.rs
--- a/rust/hg-core/src/dirstate_tree/on_disk.rs
+++ b/rust/hg-core/src/dirstate_tree/on_disk.rs
@@ -265,7 +265,7 @@ 
     }
 
     pub fn data_filename(&self) -> String {
-        String::from_utf8(format_bytes!(b"dirstate.{}.d", self.uuid)).unwrap()
+        String::from_utf8(format_bytes!(b"dirstate.{}", self.uuid)).unwrap()
     }
 }
 
diff --git a/mercurial/dirstateutils/docket.py b/mercurial/dirstateutils/docket.py
--- a/mercurial/dirstateutils/docket.py
+++ b/mercurial/dirstateutils/docket.py
@@ -34,7 +34,7 @@ 
 
 
 class DirstateDocket(object):
-    data_filename_pattern = b'dirstate.%s.d'
+    data_filename_pattern = b'dirstate.%s'
 
     def __init__(self, parents, data_size, tree_metadata, uuid):
         self.parents = parents