just playing with tangled
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

cli: stop using shared id prefix context to compute immutable heads

It's unlikely that the immutable set is defined by short hashes, and more
importantly, the cache must not be initialized by using tx.repo().

+6 -1
+6 -1
cli/src/cli_util.rs
··· 1112 1112 Ok(()) 1113 1113 }; 1114 1114 } 1115 + 1116 + // Not using self.id_prefix_context() because the disambiguation data 1117 + // must not be calculated and cached against arbitrary repo. It's also 1118 + // unlikely that the immutable expression contains short hashes. 1119 + let id_prefix_context = IdPrefixContext::new(self.revset_extensions.clone()); 1115 1120 let to_rewrite_revset = 1116 1121 RevsetExpression::commits(commits.into_iter().cloned().collect_vec()); 1117 1122 let immutable = revset_util::parse_immutable_expression(&self.revset_parse_context()) ··· 1121 1126 let mut expression = RevsetExpressionEvaluator::new( 1122 1127 repo, 1123 1128 self.revset_extensions.clone(), 1124 - self.id_prefix_context()?, 1129 + &id_prefix_context, 1125 1130 immutable, 1126 1131 ); 1127 1132 expression.intersect_with(&to_rewrite_revset);