D8087: rust-status: rename `StatusResult` to `DirstateStatus`

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

D8087: rust-status: rename `StatusResult` to `DirstateStatus`

marmoute (Pierre-Yves David)
Alphare created this revision.
Herald added subscribers: mercurial-devel, kevincox.
Herald added a reviewer: hg-reviewers.

REVISION SUMMARY
  "Result" has a special meaning in the Rust world, this should be clearer.

REPOSITORY
  rHG Mercurial

BRANCH
  default

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

AFFECTED FILES
  rust/hg-core/src/dirstate/status.rs
  rust/hg-core/src/lib.rs
  rust/hg-cpython/src/dirstate/status.rs

CHANGE DETAILS

diff --git a/rust/hg-cpython/src/dirstate/status.rs b/rust/hg-cpython/src/dirstate/status.rs
--- a/rust/hg-cpython/src/dirstate/status.rs
+++ b/rust/hg-cpython/src/dirstate/status.rs
@@ -20,7 +20,7 @@
     matchers::{AlwaysMatcher, FileMatcher},
     status,
     utils::{files::get_path_from_bytes, hg_path::HgPath},
-    StatusResult,
+    DirstateStatus,
 };
 use std::borrow::Borrow;
 
@@ -114,7 +114,7 @@
 
 fn build_response(
     lookup: Vec<&HgPath>,
-    status_res: StatusResult,
+    status_res: DirstateStatus,
     py: Python,
 ) -> PyResult<(PyList, PyList, PyList, PyList, PyList, PyList, PyList)> {
     let modified = collect_pybytes_list(py, status_res.modified.as_ref());
diff --git a/rust/hg-core/src/lib.rs b/rust/hg-core/src/lib.rs
--- a/rust/hg-core/src/lib.rs
+++ b/rust/hg-core/src/lib.rs
@@ -13,7 +13,7 @@
     dirs_multiset::{DirsMultiset, DirsMultisetIter},
     dirstate_map::DirstateMap,
     parsers::{pack_dirstate, parse_dirstate, PARENT_SIZE},
-    status::{status, StatusOptions, StatusResult},
+    status::{status, DirstateStatus, StatusOptions},
     CopyMap, CopyMapIter, DirstateEntry, DirstateParents, EntryState,
     StateMap, StateMapIter,
 };
diff --git a/rust/hg-core/src/dirstate/status.rs b/rust/hg-core/src/dirstate/status.rs
--- a/rust/hg-core/src/dirstate/status.rs
+++ b/rust/hg-core/src/dirstate/status.rs
@@ -251,7 +251,7 @@
     })
 }
 
-pub struct StatusResult<'a> {
+pub struct DirstateStatus<'a> {
     pub modified: Vec<&'a HgPath>,
     pub added: Vec<&'a HgPath>,
     pub removed: Vec<&'a HgPath>,
@@ -263,7 +263,7 @@
 
 fn build_response<'a>(
     results: impl IntoIterator<Item = IoResult<(&'a HgPath, Dispatch)>>,
-) -> IoResult<(Vec<&'a HgPath>, StatusResult<'a>)> {
+) -> IoResult<(Vec<&'a HgPath>, DirstateStatus<'a>)> {
     let mut lookup = vec![];
     let mut modified = vec![];
     let mut added = vec![];
@@ -286,7 +286,7 @@
 
     Ok((
         lookup,
-        StatusResult {
+        DirstateStatus {
             modified,
             added,
             removed,
@@ -301,7 +301,7 @@
     matcher: &'b impl Matcher,
     root_dir: impl AsRef<Path> + Sync + Send + Copy,
     options: StatusOptions,
-) -> IoResult<(Vec<&'c HgPath>, StatusResult<'c>)> {
+) -> IoResult<(Vec<&'c HgPath>, DirstateStatus<'c>)> {
     let files = matcher.file_set();
     let mut results = vec![];
     if let Some(files) = files {



To: Alphare, #hg-reviewers
Cc: kevincox, mercurial-devel
_______________________________________________
Mercurial-devel mailing list
[hidden email]
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel
Reply | Threaded
Open this post in threaded view
|

D8087: rust-status: rename `StatusResult` to `DirstateStatus`

marmoute (Pierre-Yves David)
Alphare updated this revision to Diff 20045.

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D8087?vs=19944&id=20045

BRANCH
  default

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

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

AFFECTED FILES
  rust/hg-core/src/dirstate/status.rs
  rust/hg-core/src/lib.rs
  rust/hg-cpython/src/dirstate/status.rs

CHANGE DETAILS

diff --git a/rust/hg-cpython/src/dirstate/status.rs b/rust/hg-cpython/src/dirstate/status.rs
--- a/rust/hg-cpython/src/dirstate/status.rs
+++ b/rust/hg-cpython/src/dirstate/status.rs
@@ -20,7 +20,7 @@
     matchers::{AlwaysMatcher, FileMatcher},
     status,
     utils::{files::get_path_from_bytes, hg_path::HgPath},
-    StatusResult,
+    DirstateStatus,
 };
 use std::borrow::Borrow;
 
@@ -114,7 +114,7 @@
 
 fn build_response(
     lookup: Vec<&HgPath>,
-    status_res: StatusResult,
+    status_res: DirstateStatus,
     py: Python,
 ) -> PyResult<(PyList, PyList, PyList, PyList, PyList, PyList, PyList)> {
     let modified = collect_pybytes_list(py, status_res.modified.as_ref());
diff --git a/rust/hg-core/src/lib.rs b/rust/hg-core/src/lib.rs
--- a/rust/hg-core/src/lib.rs
+++ b/rust/hg-core/src/lib.rs
@@ -13,7 +13,7 @@
     dirs_multiset::{DirsMultiset, DirsMultisetIter},
     dirstate_map::DirstateMap,
     parsers::{pack_dirstate, parse_dirstate, PARENT_SIZE},
-    status::{status, StatusOptions, StatusResult},
+    status::{status, DirstateStatus, StatusOptions},
     CopyMap, CopyMapIter, DirstateEntry, DirstateParents, EntryState,
     StateMap, StateMapIter,
 };
diff --git a/rust/hg-core/src/dirstate/status.rs b/rust/hg-core/src/dirstate/status.rs
--- a/rust/hg-core/src/dirstate/status.rs
+++ b/rust/hg-core/src/dirstate/status.rs
@@ -255,7 +255,7 @@
     })
 }
 
-pub struct StatusResult<'a> {
+pub struct DirstateStatus<'a> {
     pub modified: Vec<&'a HgPath>,
     pub added: Vec<&'a HgPath>,
     pub removed: Vec<&'a HgPath>,
@@ -267,7 +267,7 @@
 
 fn build_response<'a>(
     results: impl IntoIterator<Item = IoResult<(&'a HgPath, Dispatch)>>,
-) -> IoResult<(Vec<&'a HgPath>, StatusResult<'a>)> {
+) -> IoResult<(Vec<&'a HgPath>, DirstateStatus<'a>)> {
     let mut lookup = vec![];
     let mut modified = vec![];
     let mut added = vec![];
@@ -290,7 +290,7 @@
 
     Ok((
         lookup,
-        StatusResult {
+        DirstateStatus {
             modified,
             added,
             removed,
@@ -305,7 +305,7 @@
     matcher: &'b impl Matcher,
     root_dir: impl AsRef<Path> + Sync + Send + Copy,
     options: StatusOptions,
-) -> IoResult<(Vec<&'c HgPath>, StatusResult<'c>)> {
+) -> IoResult<(Vec<&'c HgPath>, DirstateStatus<'c>)> {
     let files = matcher.file_set();
     let mut results = vec![];
     if let Some(files) = files {



To: Alphare, #hg-reviewers
Cc: kevincox, mercurial-devel
_______________________________________________
Mercurial-devel mailing list
[hidden email]
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel
Reply | Threaded
Open this post in threaded view
|

D8087: rust-status: rename `StatusResult` to `DirstateStatus`

marmoute (Pierre-Yves David)
In reply to this post by marmoute (Pierre-Yves David)
Alphare updated this revision to Diff 20156.

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D8087?vs=20045&id=20156

BRANCH
  default

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

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

AFFECTED FILES
  rust/hg-core/src/dirstate/status.rs
  rust/hg-core/src/lib.rs
  rust/hg-cpython/src/dirstate/status.rs

CHANGE DETAILS

diff --git a/rust/hg-cpython/src/dirstate/status.rs b/rust/hg-cpython/src/dirstate/status.rs
--- a/rust/hg-cpython/src/dirstate/status.rs
+++ b/rust/hg-cpython/src/dirstate/status.rs
@@ -20,7 +20,7 @@
     matchers::{AlwaysMatcher, FileMatcher},
     status,
     utils::{files::get_path_from_bytes, hg_path::HgPath},
-    StatusResult,
+    DirstateStatus,
 };
 use std::borrow::Borrow;
 
@@ -114,7 +114,7 @@
 
 fn build_response(
     lookup: Vec<&HgPath>,
-    status_res: StatusResult,
+    status_res: DirstateStatus,
     py: Python,
 ) -> PyResult<(PyList, PyList, PyList, PyList, PyList, PyList, PyList)> {
     let modified = collect_pybytes_list(py, status_res.modified.as_ref());
diff --git a/rust/hg-core/src/lib.rs b/rust/hg-core/src/lib.rs
--- a/rust/hg-core/src/lib.rs
+++ b/rust/hg-core/src/lib.rs
@@ -13,7 +13,7 @@
     dirs_multiset::{DirsMultiset, DirsMultisetIter},
     dirstate_map::DirstateMap,
     parsers::{pack_dirstate, parse_dirstate, PARENT_SIZE},
-    status::{status, StatusOptions, StatusResult},
+    status::{status, DirstateStatus, StatusOptions},
     CopyMap, CopyMapIter, DirstateEntry, DirstateParents, EntryState,
     StateMap, StateMapIter,
 };
diff --git a/rust/hg-core/src/dirstate/status.rs b/rust/hg-core/src/dirstate/status.rs
--- a/rust/hg-core/src/dirstate/status.rs
+++ b/rust/hg-core/src/dirstate/status.rs
@@ -255,7 +255,7 @@
     })
 }
 
-pub struct StatusResult<'a> {
+pub struct DirstateStatus<'a> {
     pub modified: Vec<&'a HgPath>,
     pub added: Vec<&'a HgPath>,
     pub removed: Vec<&'a HgPath>,
@@ -267,7 +267,7 @@
 
 fn build_response<'a>(
     results: impl IntoIterator<Item = IoResult<(&'a HgPath, Dispatch)>>,
-) -> IoResult<(Vec<&'a HgPath>, StatusResult<'a>)> {
+) -> IoResult<(Vec<&'a HgPath>, DirstateStatus<'a>)> {
     let mut lookup = vec![];
     let mut modified = vec![];
     let mut added = vec![];
@@ -290,7 +290,7 @@
 
     Ok((
         lookup,
-        StatusResult {
+        DirstateStatus {
             modified,
             added,
             removed,
@@ -305,7 +305,7 @@
     matcher: &'b impl Matcher,
     root_dir: impl AsRef<Path> + Sync + Send + Copy,
     options: StatusOptions,
-) -> IoResult<(Vec<&'c HgPath>, StatusResult<'c>)> {
+) -> IoResult<(Vec<&'c HgPath>, DirstateStatus<'c>)> {
     let files = matcher.file_set();
     let mut results = vec![];
     if let Some(files) = files {



To: Alphare, #hg-reviewers, kevincox
Cc: kevincox, mercurial-devel
_______________________________________________
Mercurial-devel mailing list
[hidden email]
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel
Reply | Threaded
Open this post in threaded view
|

D8087: rust-status: rename `StatusResult` to `DirstateStatus`

marmoute (Pierre-Yves David)
In reply to this post by marmoute (Pierre-Yves David)
Alphare updated this revision to Diff 20185.

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D8087?vs=20156&id=20185

BRANCH
  default

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

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

AFFECTED FILES
  rust/hg-core/src/dirstate/status.rs
  rust/hg-core/src/lib.rs
  rust/hg-cpython/src/dirstate/status.rs

CHANGE DETAILS

diff --git a/rust/hg-cpython/src/dirstate/status.rs b/rust/hg-cpython/src/dirstate/status.rs
--- a/rust/hg-cpython/src/dirstate/status.rs
+++ b/rust/hg-cpython/src/dirstate/status.rs
@@ -20,7 +20,7 @@
     matchers::{AlwaysMatcher, FileMatcher},
     status,
     utils::{files::get_path_from_bytes, hg_path::HgPath},
-    StatusResult,
+    DirstateStatus,
 };
 use std::borrow::Borrow;
 
@@ -114,7 +114,7 @@
 
 fn build_response(
     lookup: Vec<&HgPath>,
-    status_res: StatusResult,
+    status_res: DirstateStatus,
     py: Python,
 ) -> PyResult<(PyList, PyList, PyList, PyList, PyList, PyList, PyList)> {
     let modified = collect_pybytes_list(py, status_res.modified.as_ref());
diff --git a/rust/hg-core/src/lib.rs b/rust/hg-core/src/lib.rs
--- a/rust/hg-core/src/lib.rs
+++ b/rust/hg-core/src/lib.rs
@@ -13,7 +13,7 @@
     dirs_multiset::{DirsMultiset, DirsMultisetIter},
     dirstate_map::DirstateMap,
     parsers::{pack_dirstate, parse_dirstate, PARENT_SIZE},
-    status::{status, StatusOptions, StatusResult},
+    status::{status, DirstateStatus, StatusOptions},
     CopyMap, CopyMapIter, DirstateEntry, DirstateParents, EntryState,
     StateMap, StateMapIter,
 };
diff --git a/rust/hg-core/src/dirstate/status.rs b/rust/hg-core/src/dirstate/status.rs
--- a/rust/hg-core/src/dirstate/status.rs
+++ b/rust/hg-core/src/dirstate/status.rs
@@ -255,7 +255,7 @@
     })
 }
 
-pub struct StatusResult<'a> {
+pub struct DirstateStatus<'a> {
     pub modified: Vec<&'a HgPath>,
     pub added: Vec<&'a HgPath>,
     pub removed: Vec<&'a HgPath>,
@@ -267,7 +267,7 @@
 
 fn build_response<'a>(
     results: impl IntoIterator<Item = IoResult<(&'a HgPath, Dispatch)>>,
-) -> IoResult<(Vec<&'a HgPath>, StatusResult<'a>)> {
+) -> IoResult<(Vec<&'a HgPath>, DirstateStatus<'a>)> {
     let mut lookup = vec![];
     let mut modified = vec![];
     let mut added = vec![];
@@ -290,7 +290,7 @@
 
     Ok((
         lookup,
-        StatusResult {
+        DirstateStatus {
             modified,
             added,
             removed,
@@ -305,7 +305,7 @@
     matcher: &'b impl Matcher,
     root_dir: impl AsRef<Path> + Sync + Send + Copy,
     options: StatusOptions,
-) -> IoResult<(Vec<&'c HgPath>, StatusResult<'c>)> {
+) -> IoResult<(Vec<&'c HgPath>, DirstateStatus<'c>)> {
     let files = matcher.file_set();
     let mut results = vec![];
     if let Some(files) = files {



To: Alphare, #hg-reviewers, kevincox
Cc: kevincox, mercurial-devel
_______________________________________________
Mercurial-devel mailing list
[hidden email]
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel
Reply | Threaded
Open this post in threaded view
|

D8087: rust-status: rename `StatusResult` to `DirstateStatus`

marmoute (Pierre-Yves David)
In reply to this post by marmoute (Pierre-Yves David)
marmoute added a comment.
marmoute accepted this revision.


  Simple clear effective. Thanks for splitting

REPOSITORY
  rHG Mercurial

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

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

To: Alphare, #hg-reviewers, kevincox, marmoute
Cc: marmoute, kevincox, mercurial-devel
_______________________________________________
Mercurial-devel mailing list
[hidden email]
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel