##// END OF EJS Templates
branching: merge stable into default
Raphaël Gomès -
r52516:59f846fb merge default
parent child Browse files
Show More
@@ -260,3 +260,4 b' d1d48d18db37106b801ef6cb90955536458e7ffc'
260 c9ceb4f6025690167bdb245e530de6bac8baae95 0 iQHNBAABCgA3FiEEH2b4zfZU6QXBHaBhoR4BzQ4F2VYFAmX0GbUZHGFscGhhcmVAcmFwaGFlbGdvbWVzLmRldgAKCRChHgHNDgXZVj4vC/40JjDo04IWnDADAdcoHeMOutM3ScB+p81rwmGmv2iyPOJrNLCwuNvFsUVUc8JibGFRZ0CiJ8ln3kImLoHPDwRgGrfQlBE7I4mAV7X7MbljdKCtXS4vAl2UasvsVL2fpRTdk4hIPtJo5pu+cLfQx44w20C1zrdp59UVaB/N1iQm4kDwca7/dsKLAH+7mwiRu7oK74xqLbHAks+vMnShTsl0r4XQUhi82Oka6cpt/Fh6gEjpvIkkAf9DiwGHzhqEJao+hh3lkumKyQmBu5UOUhiN7B0/8LT/o2lt2FR64uQPl8lAfLpMBDDbanvy9OQcZDtFym8TxT56oWc2JlGwFgjhoa2LvoSeRkX8sTABBPDmfa6sdzoJoE0CTSqYwcn0j39pkTnCFX7Ku9KAIi+1OlVWVYYlz1KbeajGqwdCgCkjJE/Mz5glvJqSbzh+0Gw3T4NYBCcXPnwmUShLMxprG1V7l19r8DkfG2KYOSw57l2VJ+nVhq6m+3MAqr58k6EcHqI=
260 c9ceb4f6025690167bdb245e530de6bac8baae95 0 iQHNBAABCgA3FiEEH2b4zfZU6QXBHaBhoR4BzQ4F2VYFAmX0GbUZHGFscGhhcmVAcmFwaGFlbGdvbWVzLmRldgAKCRChHgHNDgXZVj4vC/40JjDo04IWnDADAdcoHeMOutM3ScB+p81rwmGmv2iyPOJrNLCwuNvFsUVUc8JibGFRZ0CiJ8ln3kImLoHPDwRgGrfQlBE7I4mAV7X7MbljdKCtXS4vAl2UasvsVL2fpRTdk4hIPtJo5pu+cLfQx44w20C1zrdp59UVaB/N1iQm4kDwca7/d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ejYmSTShfvCO6MmgGhAzD78TwxgqbBKPKlrTDtv+A2sBi/Uyv4PCCOdfVHNlfBlcaRjhzBKH7l6ckXWO8L0LBcksH2TVUMgE/jMP1gx35FNQSV0BSqXsnq9+sHhscFoMjcb8RjEUOOeYqQNvqbp9ldQlGU1H/OD42zUjQU66XwhAtMzw57jGyb8DUiG0BtYhK4+N+oGi9wzTrvoZGzKbSiTRP76mzIudyghITh0rD8AEwj3ke/EXoFZDZcNk48xdMaJ1cmXnsbWUCA7thtfFoPpC8prf0BXY+MGjiYnqUEikUJIzP/1z6By7H28mR9I4XifXW15vL5gDFrBJsao6PVb19inya3Zj49dXouU9Zu/iUk=
@@ -276,3 +276,4 b' d1d48d18db37106b801ef6cb90955536458e7ffc'
276 c9ceb4f6025690167bdb245e530de6bac8baae95 6.7
276 c9ceb4f6025690167bdb245e530de6bac8baae95 6.7
277 2e6fde2ed01e63f0de6a5966994fbb60b1f87057 6.7.1
277 2e6fde2ed01e63f0de6a5966994fbb60b1f87057 6.7.1
278 803e61387e86f103483120df35619bdb175e3482 6.7.2
278 803e61387e86f103483120df35619bdb175e3482 6.7.2
279 028dc3f92dbd0f93bb78f9848c94ba5eecd72e71 6.7.3
@@ -37,9 +37,8 b' def check_dirstate(ui, repo, **options):'
37
37
38 is_narrow = requirements.NARROW_REQUIREMENT in repo.requirements
38 is_narrow = requirements.NARROW_REQUIREMENT in repo.requirements
39 narrow_matcher = repo.narrowmatch() if is_narrow else None
39 narrow_matcher = repo.narrowmatch() if is_narrow else None
40
40 for err in repo.dirstate.verify(m1, m2, parent1, narrow_matcher):
41 for err in repo.dirstate.verify(m1, m2, narrow_matcher):
41 ui.warn(err)
42 ui.warn(err[0] % err[1:])
43 errors += 1
42 errors += 1
44
43
45 return errors
44 return errors
@@ -47,4 +47,4 b' def admin_verify(ui, repo, **opts):'
47 ui.status(_(b"running %s\n") % name)
47 ui.status(_(b"running %s\n") % name)
48 errors = func()
48 errors = func()
49 if errors:
49 if errors:
50 ui.warn(_(b"found %d errors\n") % len(errors))
50 ui.warn(_(b"found %d errors\n") % errors)
@@ -2209,6 +2209,8 b' def fscasesensitive(path: bytes) -> bool'
2209
2209
2210
2210
2211 _re2_input = lambda x: x
2211 _re2_input = lambda x: x
2212 # google-re2 will need to be tell to not output error on its own
2213 _re2_options = None
2212 try:
2214 try:
2213 import re2 # pytype: disable=import-error
2215 import re2 # pytype: disable=import-error
2214
2216
@@ -2229,6 +2231,7 b' class _re:'
2229 def _checkre2():
2231 def _checkre2():
2230 global _re2
2232 global _re2
2231 global _re2_input
2233 global _re2_input
2234 global _re2_options
2232 if _re2 is not None:
2235 if _re2 is not None:
2233 # we already have the answer
2236 # we already have the answer
2234 return
2237 return
@@ -2247,6 +2250,12 b' class _re:'
2247 check_input = pycompat.sysstr(check_input)
2250 check_input = pycompat.sysstr(check_input)
2248 _re2 = bool(re2.match(check_pattern, check_input))
2251 _re2 = bool(re2.match(check_pattern, check_input))
2249 _re2_input = pycompat.sysstr
2252 _re2_input = pycompat.sysstr
2253 try:
2254 quiet = re2.Options()
2255 quiet.log_errors = False
2256 _re2_options = quiet
2257 except AttributeError:
2258 pass
2250
2259
2251 def compile(self, pat, flags=0):
2260 def compile(self, pat, flags=0):
2252 """Compile a regular expression, using re2 if possible
2261 """Compile a regular expression, using re2 if possible
@@ -2262,7 +2271,12 b' class _re:'
2262 if flags & remod.MULTILINE:
2271 if flags & remod.MULTILINE:
2263 pat = b'(?m)' + pat
2272 pat = b'(?m)' + pat
2264 try:
2273 try:
2265 return re2.compile(_re2_input(pat))
2274 input_regex = _re2_input(pat)
2275 if _re2_options is not None:
2276 compiled = re2.compile(input_regex, options=_re2_options)
2277 else:
2278 compiled = re2.compile(input_regex)
2279 return compiled
2266 except re2.error:
2280 except re2.error:
2267 pass
2281 pass
2268 return remod.compile(pat, flags)
2282 return remod.compile(pat, flags)
@@ -1,3 +1,20 b''
1 = Mercurial 6.7.3 =
2
3 * setup: display return code information about failed `hg` call
4 * bundle-spec: properly identify changegroup-less bundle
5 * bundle-spec: properly parse boolean configuration as boolean
6 * matchers: fix the bug in rust PatternMatcher that made it cut off early
7 * match: fix the "visitdir" method on "rootfilesin" matchers
8 * match: fix the rust-side bug in visit_children_set for rootfilesin matchers
9 * match: strengthen visit_children_set invariant, Recursive means "all files"
10 * wireprotoserver: ensure that output stream gets flushed on exception
11 * re2: make errors quiet
12 * dirstate-v2: add check of parent/child nodes being related when writing
13 * dirstate-v2: check that root nodes are at the root before writing
14 * rust-cpython: don't swallow the dirstate error message
15 * rust: blanket implementation of Graph for Graph references
16 * Various fixes to `admin::verify`
17
1 = Mercurial 6.7.2 =
18 = Mercurial 6.7.2 =
2
19
3 Exceptional release following a large performance regression when cloning.
20 Exceptional release following a large performance regression when cloning.
@@ -423,6 +423,18 b' mod tests {'
423 ),
423 ),
424 vec![8, 7, 4, 3, 2, 1, 0]
424 vec![8, 7, 4, 3, 2, 1, 0]
425 );
425 );
426 // it works as well on references, because &Graph implements Graph
427 // this is needed as of this writing by RHGitaly
428 assert_eq!(
429 list_ancestors(
430 &SampleGraph,
431 vec![11.into(), 13.into()],
432 0.into(),
433 false
434 ),
435 vec![8, 7, 4, 3, 2, 1, 0]
436 );
437
426 assert_eq!(
438 assert_eq!(
427 list_ancestors(
439 list_ancestors(
428 SampleGraph,
440 SampleGraph,
@@ -640,7 +640,20 b' pub(super) fn write('
640 out: Vec::with_capacity(size_guess),
640 out: Vec::with_capacity(size_guess),
641 };
641 };
642
642
643 let root_nodes = writer.write_nodes(dirstate_map.root.as_ref())?;
643 let root_nodes = dirstate_map.root.as_ref();
644 for node in root_nodes.iter() {
645 // Catch some corruptions before we write to disk
646 let full_path = node.full_path(dirstate_map.on_disk)?;
647 let base_name = node.base_name(dirstate_map.on_disk)?;
648 if full_path != base_name {
649 let explanation = format!(
650 "Dirstate root node '{}' is not at the root",
651 full_path
652 );
653 return Err(HgError::corrupted(explanation).into());
654 }
655 }
656 let root_nodes = writer.write_nodes(root_nodes)?;
644
657
645 let unreachable_bytes = if append {
658 let unreachable_bytes = if append {
646 dirstate_map.unreachable_bytes
659 dirstate_map.unreachable_bytes
@@ -691,9 +704,11 b" impl Writer<'_, '_> {"
691 // First accumulate serialized nodes in a `Vec`
704 // First accumulate serialized nodes in a `Vec`
692 let mut on_disk_nodes = Vec::with_capacity(nodes_len);
705 let mut on_disk_nodes = Vec::with_capacity(nodes_len);
693 for node in nodes {
706 for node in nodes {
694 let children =
707 let children = node.children(self.dirstate_map.on_disk)?;
695 self.write_nodes(node.children(self.dirstate_map.on_disk)?)?;
696 let full_path = node.full_path(self.dirstate_map.on_disk)?;
708 let full_path = node.full_path(self.dirstate_map.on_disk)?;
709 self.check_children(&children, full_path)?;
710
711 let children = self.write_nodes(children)?;
697 let full_path = self.write_path(full_path.as_bytes());
712 let full_path = self.write_path(full_path.as_bytes());
698 let copy_source = if let Some(source) =
713 let copy_source = if let Some(source) =
699 node.copy_source(self.dirstate_map.on_disk)?
714 node.copy_source(self.dirstate_map.on_disk)?
@@ -771,6 +786,37 b" impl Writer<'_, '_> {"
771 Ok(ChildNodes { start, len })
786 Ok(ChildNodes { start, len })
772 }
787 }
773
788
789 /// Catch some dirstate corruptions before writing them to disk
790 fn check_children(
791 &mut self,
792 children: &dirstate_map::ChildNodesRef,
793 full_path: &HgPath,
794 ) -> Result<(), DirstateError> {
795 for child in children.iter() {
796 let child_full_path =
797 child.full_path(self.dirstate_map.on_disk)?;
798
799 let prefix_length = child_full_path.len()
800 // remove the filename
801 - child.base_name(self.dirstate_map.on_disk)?.len()
802 // remove the slash
803 - 1;
804
805 let child_prefix = &child_full_path.as_bytes()[..prefix_length];
806
807 if child_prefix != full_path.as_bytes() {
808 let explanation = format!(
809 "dirstate child node's path '{}' \
810 does not start with its parent's path '{}'",
811 child_full_path, full_path,
812 );
813
814 return Err(HgError::corrupted(explanation).into());
815 }
816 }
817 Ok(())
818 }
819
774 /// If the given slice of items is within `on_disk`, returns its offset
820 /// If the given slice of items is within `on_disk`, returns its offset
775 /// from the start of `on_disk`.
821 /// from the start of `on_disk`.
776 fn on_disk_offset_of<T>(&self, slice: &[T]) -> Option<Offset>
822 fn on_disk_offset_of<T>(&self, slice: &[T]) -> Option<Offset>
@@ -133,6 +133,12 b' pub enum GraphError {'
133 ParentOutOfRange(Revision),
133 ParentOutOfRange(Revision),
134 }
134 }
135
135
136 impl<T: Graph> Graph for &T {
137 fn parents(&self, rev: Revision) -> Result<[Revision; 2], GraphError> {
138 (*self).parents(rev)
139 }
140 }
141
136 /// The Mercurial Revlog Index
142 /// The Mercurial Revlog Index
137 ///
143 ///
138 /// This is currently limited to the minimal interface that is needed for
144 /// This is currently limited to the minimal interface that is needed for
@@ -270,9 +270,9 b' py_class!(pub class DirstateMap |py| {'
270 let tuple = (packed, tree_metadata, append);
270 let tuple = (packed, tree_metadata, append);
271 Ok(tuple.to_py_object(py).into_object())
271 Ok(tuple.to_py_object(py).into_object())
272 },
272 },
273 Err(_) => Err(PyErr::new::<exc::OSError, _>(
273 Err(e) => Err(PyErr::new::<exc::OSError, _>(
274 py,
274 py,
275 "Dirstate error".to_string(),
275 e.to_string(),
276 )),
276 )),
277 }
277 }
278 }
278 }
@@ -132,6 +132,16 b' Entire changelog and manifest log missin'
132 dirstate inconsistent with current parent's manifest
132 dirstate inconsistent with current parent's manifest
133 1 dirstate errors
133 1 dirstate errors
134 [1]
134 [1]
135
136 We can check the dirstate in isolation
137 $ hg admin::verify -c dirstate
138 running 1 checks
139 running working-copy.dirstate
140 checking dirstate
141 warning: ignoring unknown working parent c5ddb05ab828!
142 file marked as tracked in p1 (000000000000) but not in manifest1
143 found 1 errors
144
135 $ cp -R .hg/store-full/. .hg/store
145 $ cp -R .hg/store-full/. .hg/store
136
146
137 Entire changelog and filelog missing
147 Entire changelog and filelog missing
General Comments 0
You need to be logged in to leave comments. Login now