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>,
)
| 3341 | /// println!("{} changes to insert", missing.len()); |
| 3342 | /// ``` |
| 3343 | pub fn get_missing_changes_between( |
| 3344 | &self, |
| 3345 | from_view: &str, |
| 3346 | to_view: Option<&str>, |
| 3347 | ) -> Result<Vec<Hash>, RepositoryError> { |
| 3348 | let txn = self |
| 3349 | .pristine |
| 3350 | .read_txn() |
| 3351 | .map_err(|e| RepositoryError::Database(e.to_string()))?; |
| 3352 | |
| 3353 | let from = txn |
| 3354 | .get_view(from_view) |
| 3355 | .map_err(|e| RepositoryError::Database(e.to_string()))? |
| 3356 | .ok_or_else(|| RepositoryError::ViewNotFound { |
| 3357 | name: from_view.to_string(), |
| 3358 | })?; |
| 3359 | |
| 3360 | let to_name = to_view.unwrap_or(&self.current_view); |
| 3361 | let to = txn |
| 3362 | .get_view(to_name) |
| 3363 | .map_err(|e| RepositoryError::Database(e.to_string()))? |
| 3364 | .ok_or_else(|| RepositoryError::ViewNotFound { |
| 3365 | name: to_name.to_string(), |
| 3366 | })?; |
| 3367 | |
| 3368 | get_missing_changes(&txn, &from, &to).map_err(|e| RepositoryError::Apply(e.to_string())) |
| 3369 | } |
| 3370 | |
| 3371 | /// Get changes up to a specific tag in a view. |
| 3372 | /// |
no test coverage detected