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

Method create_draft_view

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

Create a new Draft view parented on an explicit named parent. Unlike [`Repository::create_view`], which parents on the nearest shared ancestor of the *current* view, this method parents on the given view regardless of what is currently checked out. The new view's change log starts empty. Returns `ViewNotFound` if the parent does not exist and `ViewAlreadyExists` if the name is taken.

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

Source from the content-addressed store, hash-verified

771 /// Returns `ViewNotFound` if the parent does not exist and
772 /// `ViewAlreadyExists` if the name is taken.
773 pub fn create_draft_view(
774 &mut self,
775 name: &str,
776 parent_name: &str,
777 ) -> Result<(), RepositoryError> {
778 self.create_view_with_identity(name, ViewScope::Draft, Some(parent_name))
779 }
780
781 /// Create a view with an explicit scope and optional named parent.
782 ///

Calls 1