Get changes that are in one view but not another. This is useful for determining what needs to be inserted when merging or cherry-picking between views. # Arguments `from_view` - Source view name `to_view` - Target view name (None = current view) # Returns Vector of hashes that are in `from_view` but not in `to_view`, in dependency order. # Example ```rust,ignore // Find what's in feature t
(
&self,
from_view: &str,
to_view: Option<&str>,
)
| 2371 | /// println!("{} changes to insert", missing.len()); |
| 2372 | /// ``` |
| 2373 | pub fn get_missing_changes_between( |
| 2374 | &self, |
| 2375 | from_view: &str, |
| 2376 | to_view: Option<&str>, |
| 2377 | ) -> Result<Vec<Hash>, RepositoryError> { |
| 2378 | let txn = self |
| 2379 | .pristine |
| 2380 | .read_txn() |
| 2381 | .map_err(|e| RepositoryError::Database(e.to_string()))?; |
| 2382 | |
| 2383 | let from = txn |
| 2384 | .get_view(from_view) |
| 2385 | .map_err(|e| RepositoryError::Database(e.to_string()))? |
| 2386 | .ok_or_else(|| RepositoryError::ViewNotFound { |
| 2387 | name: from_view.to_string(), |
| 2388 | })?; |
| 2389 | |
| 2390 | let to_name = to_view.unwrap_or(&self.current_view); |
| 2391 | let to = txn |
| 2392 | .get_view(to_name) |
| 2393 | .map_err(|e| RepositoryError::Database(e.to_string()))? |
| 2394 | .ok_or_else(|| RepositoryError::ViewNotFound { |
| 2395 | name: to_name.to_string(), |
| 2396 | })?; |
| 2397 | |
| 2398 | get_missing_changes(&txn, &from, &to).map_err(|e| RepositoryError::Apply(e.to_string())) |
| 2399 | } |
| 2400 | |
| 2401 | /// Get changes up to a specific tag in a view. |
| 2402 | /// |
no test coverage detected