diff options
author | Klaus Aehlig <klaus.aehlig@huawei.com> | 2022-11-24 09:00:00 +0100 |
---|---|---|
committer | Klaus Aehlig <klaus.aehlig@huawei.com> | 2022-11-30 10:24:43 +0100 |
commit | 9885e30b138ec77a0aced5fd767a2ad724a9a31e (patch) | |
tree | 5f1884e56662592a09a5c18c555205240c6ad6d2 /share | |
parent | a6576499eeb3bf4b7976c38cfd73cb5ec878c8bb (diff) | |
download | justbuild-9885e30b138ec77a0aced5fd767a2ad724a9a31e.tar.gz |
Add script to import a git repos as dependency
... assuming this repo already uses just and has a multi-repository
configuration committed. In the import, transitive dependencies, as
well as repositories serving as layers, are taken into account, and
"file" repositories are rewritten to be subdirs of the repository
imported. The imported repositories are renamed to reflect the
repository pulling them in, extending the name appropriately to
avoid conflicts. This renaming is reflected in the bindings and
layer references of the imported repositories as well.
In this simple version, no automatic deduplication of imported
repositories to already existing repositories is made, but the
user can specify that certain foreign repositories should not be
imported and mapped to already present repositories.
Diffstat (limited to 'share')
-rw-r--r-- | share/man/just-import-git.1.org | 79 |
1 files changed, 79 insertions, 0 deletions
diff --git a/share/man/just-import-git.1.org b/share/man/just-import-git.1.org new file mode 100644 index 00000000..354c2c2b --- /dev/null +++ b/share/man/just-import-git.1.org @@ -0,0 +1,79 @@ +#+TITLE: JUST-import-git +#+MAN_CLASS_OPTIONS: section-id=1 + +* NAME + +just-import-git - import one git repository to a multi-repository configuration + +* SYNOPSIS + +just-import-deps [OPTIONS] URL [foreign repository name] + +* DESCRIPTION + +Extend an existing *just-mr-repository-config(5)* by adding one +git repository. In doing so, the dependencies declared in the +imported repository are added as well and ~"file"~ respositories +are transformed to ~"subdir"~ parts of the imported repository. +This solves the problem, that a repository can refer to itself only +as ~"."~ in a portable way. The importing party, however, always +knows the URL it is importing from. + +The imported repositories are renamed in a way that no conflicts +with already present repositories arise. The repositories pulled in +as dependencies are named in a way to remind for which repositories +they came as a dependency. This renaming is taken into account at +all places repositories are referred to, i.e., the ~"bindings"~ +field, as well as roots defined by reference to other repositories. + +Only the main parts of repositories are imported (~"repository"~, +~"bindings"~, names, and roots). The ~"pragma"~ part, as well as +unknown fields are dropped. + +The repository to import is specified by its URL + +The resulting configuration is printed on standard output. + + +* OPTIONS + + *--as* NAME\\ + Specify the name the imported repository should have in the + final configuration. If not specified, default to the name + the repository has in the configuration file of the repository + imported. In any case, the name is amended if it conflicts + with an already existing name. + + *-b* BRANCH\\ + The branch in the imported repository to use; this branch is + also recorded as the branch to follow. Defaults to ~"master"~. + + *-C* CONFIGFILE\\ + Use the specified file as the configuration to import into. + If not specified, for a config file is searched in the same + way, as ~just-mr~ does, when invoved with ~--norc~. + + *-h*, *--help* \\ + Output a usage message and exit. + + *--map* THEIRS OURS\\ + Map repositories from the imported configuration to already + existing ones. Those repositories are not imported (and the + search for their transitive dependency is ommitted) and instead + the specified already existing repository is used. This is + useful, if a sufficiently compatible repository already exists + in the configuration. + + *-R* RELPATH\\ + Use the file, specified by path relative to the repository + root, as multi-repository specification in the imported + repository. If not specifed, for a config file is searched + in the same way as ~just-mr~ does, when invoced with ~--no-rc~, + however leaving out searches relative to global roots (~"home"~ + and ~"system"~). In other words, ~repos.json~ and ~etc/repos.json~ + are tried if this option is not given. + + +* See also + +*just-mr-repository-config(5)*, *just-mr(1)* |