p4 repo (graph)

Create, edit, or delete a repo specification.

Note

For depots of type graph only.

Syntax

p4 [g-opts] repo [-d | -i] [-f] reponame
p4 repo -o reponame

Description

Note

An administrator is the owner, or a user that has been granted the admin permission for that specific graph depot or repo.

Such an administrator uses this command to create, edit, or delete a repo that stores files from Git users.

By default, the editor configured by the $P4EDITOR environment variable displays the repo specification, which you can save immediately, or after making edits.

To create a repo, you must be an admin, be the owner of the graph depot, or have the create-repo permission. For details about permissions, see p4 grant-permission.

Note

It is a best practice when you create a repo to set the default branch. See "Specify a default branch" in the Helix4Git Administrator Guide.

Options

-d reponame

Delete the repo, including the files it contains. The name of a repo cannot be the same as the name of a branch, client workspace, or label.

Warning

The Helix server cannot retrieve a deleted repo.

-f

Enable any user with the admin privilege to force a change, such as to delete the repo or change its owner. By default, a repo can be deleted only by the owner.

-i

Read a repo specification from standard input.

-o reponame

Write a repo specification to standard output.

g-opts

See Global options.

Form Fields

Field Name Description

Name:

The name of this repo.

Owner:

The user who created this repo.

Created:

The date this specification was created.

Pushed:

The date of the last push to this repo.

ForkedFrom:

The name of the repo from which this repo was forked.

Description:

A short description of the repo (optional).

MirroredFrom:

Upstream URL this read-only repo is mirrored from.

DefaultBranch:

The default branch to clone, such as refs/heads/master.

gconn-serverId: The id of the gconn server that is configured to do mirroring for this repo.

Examples

To create a repo, //graphDepot1/repo8, within the depot of type graph, graphDepot1, that already exists:

p4 repo //graphDepot1/repo8

To create a repo directly from the command line, without having to use the spec editor:

p4 repo -o //graphDepot1/repo8 | p4 repo -i

To delete a repo named //graphDepot1/repo8:

p4 repo -d //graphDepot1/repo8

You will be prompted to use the -f option to force deletion:

p4 repo -f -d //graphDepot1/repo8

Related Commands

To list the repos known to Helix server

p4 repos

To list all depots known to Helix server

p4 depots