MCPcopy Create free account
hub / github.com/atomicdotdev/atomic / create_view_from

Method create_view_from

atomic-repository/src/repository/views.rs:393–399  ·  view source on GitHub ↗

Create a new view that inherits changes from another view. This creates a new view and copies all changes from the source view to the new view. The new view will have the same content state as the source view at the time of creation. # Arguments `name` - The name of the new view to create `from_view` - The name of the view to inherit changes from # Errors Returns an error if: - The new view a

(&mut self, name: &str, from_view: &str)

Source from the content-addressed store, hash-verified

391 /// repo.create_view_from("feature", "dev")?;
392 /// ```
393 pub fn create_view_from(&mut self, name: &str, from_view: &str) -> Result<(), RepositoryError> {
394 // Thin wrapper: anchor the new draft on the source AND seed its
395 // change-set membership from the source's visible set. The overlay
396 // never copies content — the edges already live in the graph; the
397 // new view just selects them (see `create_overlay_view`).
398 self.create_overlay_view(name, Some(from_view), Some(from_view))
399 }
400
401 /// List all views in the repository.
402 ///

Calls 1

create_overlay_viewMethod · 0.80