Support to reparent all children of a parent project
This change adds a new option to the 'set-project-parent' command that allows to reparent all child projects of one parent project to another parent project. It is possible to specify certain children of the old parent that should not be reparented. This is e.g. useful if you have defined a set of default access rights on a parent project P and now one of its child projects C should not inherit these default access rights. The new functionality allows you to easily introduce a new hierarchy level under P: 1. create new child project D under P which defines the default access rights 2. reparent all child projects of P to D, except C (and D) 3. remove the default access rights from P Change-Id: I3c6d8407f357f601c8000e6bc5cbc696012ecd09 Signed-off-by: Edwin Kempin <edwin.kempin@sap.com>
This commit is contained in:
@@ -10,6 +10,8 @@ SYNOPSIS
|
||||
[verse]
|
||||
'ssh' -p <port> <host> 'gerrit set-project-parent'
|
||||
[--parent <NAME>]
|
||||
[--children-of <NAME>]
|
||||
[--exclude <NAME>]
|
||||
<NAME> ...
|
||||
|
||||
DESCRIPTION
|
||||
@@ -33,6 +35,19 @@ OPTIONS
|
||||
Name of the parent to inherit through. If not specified,
|
||||
the parent is set back to the default `All-Projects`.
|
||||
|
||||
--children-of::
|
||||
Name of the parent project for which all child projects should be
|
||||
reparented. If the new parent project or any project in its
|
||||
parent line is a child of this parent project it is automatically
|
||||
excluded from reparenting.
|
||||
|
||||
--exclude::
|
||||
Name of a child project that should not be reparented. This
|
||||
option can only be used if the option --children-of is set.
|
||||
Multiple child projects can be excluded from reparenting by
|
||||
specifying the --exclude option multiple times. Excluding a
|
||||
project that is not a child project has no effect.
|
||||
|
||||
EXAMPLES
|
||||
--------
|
||||
Configure `kernel/omap` to inherit permissions from `kernel/common`:
|
||||
@@ -41,6 +56,13 @@ Configure `kernel/omap` to inherit permissions from `kernel/common`:
|
||||
$ ssh -p 29418 review.example.com gerrit set-project-parent --parent kernel/common kernel/omap
|
||||
====
|
||||
|
||||
Reparent all children of `myParent` to `myOtherParent`:
|
||||
|
||||
====
|
||||
$ ssh -p 29418 review.example.com gerrit set-project-parent \
|
||||
--children-of myParent --parent myOtherParent
|
||||
====
|
||||
|
||||
SEE ALSO
|
||||
--------
|
||||
|
||||
|
||||
Reference in New Issue
Block a user