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

Method create_draft_view

atomic-repository/src/repository/views.rs:778–784  ·  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

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

Calls 1