Show More
@@ -1840,7 +1840,7 b' class workingctx(committablectx):' | |||
|
1840 | 1840 | def _poststatusfixup(self, status, fixup): |
|
1841 | 1841 | """update dirstate for files that are actually clean""" |
|
1842 | 1842 | poststatus = self._repo.postdsstatus() |
|
1843 | if fixup or poststatus: | |
|
1843 | if fixup or poststatus or self._repo.dirstate._dirty: | |
|
1844 | 1844 | try: |
|
1845 | 1845 | oldid = self._repo.dirstate.identity() |
|
1846 | 1846 |
@@ -1137,6 +1137,7 b' class dirstate(object):' | |||
|
1137 | 1137 | warnings, |
|
1138 | 1138 | bad, |
|
1139 | 1139 | traversed, |
|
1140 | dirty, | |
|
1140 | 1141 | ) = rustmod.status( |
|
1141 | 1142 | self._map._rustmap, |
|
1142 | 1143 | matcher, |
@@ -1150,6 +1151,8 b' class dirstate(object):' | |||
|
1150 | 1151 | bool(matcher.traversedir), |
|
1151 | 1152 | ) |
|
1152 | 1153 | |
|
1154 | self._dirty |= dirty | |
|
1155 | ||
|
1153 | 1156 | if matcher.traversedir: |
|
1154 | 1157 | for dir in traversed: |
|
1155 | 1158 | matcher.traversedir(dir) |
@@ -293,6 +293,10 b" pub struct DirstateStatus<'a> {" | |||
|
293 | 293 | |
|
294 | 294 | /// Only filled if `collect_traversed_dirs` is `true` |
|
295 | 295 | pub traversed: Vec<HgPathCow<'a>>, |
|
296 | ||
|
297 | /// Whether `status()` made changed to the `DirstateMap` that should be | |
|
298 | /// written back to disk | |
|
299 | pub dirty: bool, | |
|
296 | 300 | } |
|
297 | 301 | |
|
298 | 302 | #[derive(Debug, derive_more::From)] |
@@ -919,6 +923,7 b" pub fn build_response<'a>(" | |||
|
919 | 923 | bad, |
|
920 | 924 | unsure, |
|
921 | 925 | traversed, |
|
926 | dirty: false, | |
|
922 | 927 | } |
|
923 | 928 | } |
|
924 | 929 |
@@ -78,8 +78,9 b" pub fn status<'tree, 'on_disk: 'tree>(" | |||
|
78 | 78 | root_cached_mtime, |
|
79 | 79 | is_at_repo_root, |
|
80 | 80 | )?; |
|
81 | let outcome = common.outcome.into_inner().unwrap(); | |
|
81 | let mut outcome = common.outcome.into_inner().unwrap(); | |
|
82 | 82 | let to_add = common.cached_directory_mtimes_to_add.into_inner().unwrap(); |
|
83 | outcome.dirty = !to_add.is_empty(); | |
|
83 | 84 | for (path, mtime) in &to_add { |
|
84 | 85 | let node = DirstateMap::get_or_insert_node( |
|
85 | 86 | dmap.on_disk, |
@@ -260,6 +260,7 b' fn build_response(' | |||
|
260 | 260 | let unsure = collect_pybytes_list(py, status_res.unsure.as_ref()); |
|
261 | 261 | let bad = collect_bad_matches(py, status_res.bad.as_ref())?; |
|
262 | 262 | let traversed = collect_pybytes_list(py, status_res.traversed.as_ref()); |
|
263 | let dirty = status_res.dirty.to_py_object(py); | |
|
263 | 264 | let py_warnings = PyList::new(py, &[]); |
|
264 | 265 | for warning in warnings.iter() { |
|
265 | 266 | // We use duck-typing on the Python side for dispatch, good enough for |
@@ -297,6 +298,7 b' fn build_response(' | |||
|
297 | 298 | py_warnings.into_object(), |
|
298 | 299 | bad.into_object(), |
|
299 | 300 | traversed.into_object(), |
|
301 | dirty.into_object(), | |
|
300 | 302 | ][..], |
|
301 | 303 | )) |
|
302 | 304 | } |
General Comments 0
You need to be logged in to leave comments.
Login now