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>,
)
| 2221 | /// println!("{} changes to insert", missing.len()); |
| 2222 | /// ``` |
| 2223 | pub fn get_missing_changes_between( |
| 2224 | &self, |
| 2225 | from_view: &str, |
| 2226 | to_view: Option<&str>, |
| 2227 | ) -> Result<Vec<Hash>, RepositoryError> { |
| 2228 | let txn = self |
| 2229 | .pristine |
| 2230 | .read_txn() |
| 2231 | .map_err(|e| RepositoryError::Database(e.to_string()))?; |
| 2232 | |
| 2233 | let from = txn |
| 2234 | .get_view(from_view) |
| 2235 | .map_err(|e| RepositoryError::Database(e.to_string()))? |
| 2236 | .ok_or_else(|| RepositoryError::ViewNotFound { |
| 2237 | name: from_view.to_string(), |
| 2238 | })?; |
| 2239 | |
| 2240 | let to_name = to_view.unwrap_or(&self.current_view); |
| 2241 | let to = txn |
| 2242 | .get_view(to_name) |
| 2243 | .map_err(|e| RepositoryError::Database(e.to_string()))? |
| 2244 | .ok_or_else(|| RepositoryError::ViewNotFound { |
| 2245 | name: to_name.to_string(), |
| 2246 | })?; |
| 2247 | |
| 2248 | get_missing_changes(&txn, &from, &to).map_err(|e| RepositoryError::Apply(e.to_string())) |
| 2249 | } |
| 2250 | |
| 2251 | /// Get changes up to a specific tag in a view. |
| 2252 | /// |
no test coverage detected