Skip to content
This repository has been archived by the owner on Jun 18, 2021. It is now read-only.

Command Reference

Péter Szilágyi edited this page Feb 9, 2014 · 6 revisions

This section contains an exhaustive list of all the commands currently supported by SrcBox.

srcbox

The command ensures that the supported source versioning systems (git and hg for now) are available, and offers to install them otherwise.

srcbox list [group]

Lists all the git repositories tracked by SrcBox. The optional group lists only a subgroup of the maintained repos.

$ srcbox list
List of repositories tracked by SrcBox:
 + patches
   - canvas
   - nitrogen
 - myapp
 - srcbox

$ srcbox list patches
List of repositories tracked by SrcBox:
 - canvas
 - nitrogen

srcbox create repo vcs

Creates a new empty source repository of type vcs (git or hg) called repo inside the SrcBox repository collection.

This command is to be used when a new repository/project is needed and there aren’t any existing repositories which can be imported into SrcBox.

$ srcbox create mygitrepo git
Creating empty git repository...
Initializing new git repository...
Git repository successfully created.

$ srcbox create myhgrepo hg
Initializing new mercurial repository...
Mercurial repository successfully created.

Note, even though SrcBox supports multiple source versioning systems, repository names must be unique among all of them. This is to prevent accidentally mixing up same-named but different repos.

srcbox clone repo

Clones a source repository called repo from the SrcBox collection into the current folder and configures a default remote called srcbox for committing code back into SrcBox through the svc. The type of the repository is automatically determined and handled correctly.

$ srcbox clone mygitrepo
Cloning git repository...
Git repository successfully cloned.

$ srcbox clone myhgrepo
Cloning mercurial repository...
Mercurial repository successfully cloned.

srcbox import repo

Imports an existing source repository into SrcBox and also configures a remote called srcbox for the local repo. Note, this command is meant to be executed from within a git or mercurial repository, which is to be imported.

$ srcbox import myapp
Creating empty repository...
Importing data into new repository...
Repository successfully imported.