init
CLI reference
Description
Since this command initializes the current workspace, you will always start with
this command. It will create a folder called .esysrepo storing various
configuration files as well as a few git repositories.
In its simplest form, the only required parameter of the init command is the
URL of the git repository where the manifest is located (-u). Alternatively,
--project-name / -p can resolve that URL from a known manifest directory
(mutually exclusive with -u). The steps then followed are:
- Clone the git repository holding the manifest into a temporary folder inside
the
.esysrepofolder - Detect the format of the manifest file (Google repo tool format or ESysRepo
native format), unless
--googleforces the Google path - Depending on the manifest's format, create configuration files and move the
git repo with the manifest to its final folder inside
.esysrepo
The contents of .esysrepo are not secret, but they are not part of the public
interface of the tool and may change between versions. Use only the command line
tool itself and do not change by hand any of the files found in that folder,
except where explicitly documented.
Usage
esysrepo init -u URL [options ...]
esysrepo init -p PROJECT [options ...]
Options
Available options:
--manifest-url/-uURL: The URL of the git repository holding the manifest (required unless-pis used)--manifest-branch/-bBRANCH: Manifest branch or revision to check out--manifest-name/-mNAME: Manifest file name used to initialize the workspace (defaultdefault.xml)--project-name/-pNAME: Project name to look up in a manifest directory (resolves the manifest URL; cannot be combined with-u)--rev-setNAME: Native manifest revision-set name to select at init--google/-g: Force Google repo tool manifest format (skip native.esysrepo.manifest*detection when both formats exist in the same repository)--strict: Fail on unknown manifest XML for both Google repo and ESysRepo formats (default is tolerant / ignore-unknown). Stored asparse_modein.esysrepo/config.jsonfor later sync/load--git-super/-s: Treat the repository as a git super project (not implemented yet)--folder/-fPATH: Workspace folder to initialize (common option; default is the current directory).
Examples
To get the source code of ESysRepo, this would be the command line to use if using SSH (you need to be a contributor):
esysrepo init -u ssh://git@gitlab.com/libesys/esysbuild/manifest.git
Or simply using HTTPS, which will work for everyone:
esysrepo init -u https://gitlab.com/libesys/esysbuild/manifest.git
Initialize into a specific folder:
esysrepo init -u https://gitlab.com/libesys/esysbuild/manifest.git -f /path/to/ws
Force Google repo format when a native ESysRepo manifest is also present:
esysrepo init -u https://example.com/manifest.git --google
Select a native revision-set at init:
esysrepo init -u https://example.com/manifest.git --rev-set develop