(doc) ADCs now have an overview doc, plus...

- repo-deletion is now a proper doc
  - other doc enhancements and clarifications
This commit is contained in:
Sitaram Chamarty 2011-05-08 12:56:26 +05:30
parent 74c1736222
commit 867b34f32c
4 changed files with 97 additions and 23 deletions

63
contrib/adc/README.mkd Normal file
View file

@ -0,0 +1,63 @@
# brief descriptions of the shipped ADCs (admin-defined commands)
(...with pointers to further information where needed)
----
**able**: enable/disable push access temporarily (such as for taking backups
or other admin chores); details [here][able].
[able]: http://sitaramc.github.com/gitolite/doc/admin-defined-commands.html#_enable_disable_push_access_temporarily
**delete-branch**: allow someone to delete a branch that they themselves
created. (i.e., when the user had RWC, but not RWCD, permissions). Details on
this ADC are [here][dbsha]; details on RWC/RWD/RWCD etc are [here][rwcd].
[dbsha]: https://github.com/sitaramc/gitolite/commit/89b68bf5ca99508caaa768c60ce910d7e0a29ccf
[rwcd]: http://sitaramc.github.com/gitolite/doc/gitolite.conf.html#_creating_and_deleting_branches
**fork**: Think of it as a server-side clone; details [here][fork].
[fork]: http://sitaramc.github.com/gitolite/doc/admin-defined-commands.html#_fork
**get-rights-and-owner.in-perl**: Most of the ADCs are in shell, so this is a
sample of how to write an ADC in perl.
**gl-reflog**: show a fake "reflog" from the server, and allow recovery from
deleted branches and bad force pushes; details in source.
**help**: not all shipped ADCs may be enabled by the site admin. Conversely
the admin may create and install his own ADCs that dont ship with gitolite
itself. This ADC displays site-local help, if the site admin enabled it.
**hub**: allow "pull requests" a la github; details [here][hub].
[hub]: http://sitaramc.github.com/gitolite/contrib/adc/hub.html
**rm**, **lock**, and **unlock**:<br>
**trash**, **list-trash**, and **restore**:
> two families of repo deletion commands; details [here][rddoc]
[rddoc]: http://sitaramc.github.com/gitolite/contrib/adc/repo-deletion.html
**restrict-admin**: sample program to show how you can allow the admin to run
pre-specified shell commands (without actually having full shell access).
Details [here][ra].
[ra]: http://sitaramc.github.com/gitolite/doc/admin-defined-commands.html#_bonus_restricted_admin
**sudo**: allow admin to run ADCs on behalf of a user. Useful in support
situations I guess. Details in source.
Note: the Unix "sudo" and "su" programs are most often used to acquire
*higher* privileges, although they're actually designed to go the other way
also. In gitolite we do not do the former, only the latter (i.e., a normal
gitolite user cannot do admin-stuff using this ADC).
**su-expand**, **su-getperms**, **su-setperms**: as above, but for the
internal commands 'expand', 'getperms', and 'setperms'. (These commands are
not ADCs so you cannot simply use the 'sudo' ADC described above).
**who-pushed**: find the last person to push a given commit; details in
source.

View file

@ -1,6 +1,8 @@
# deleting repos safely
(see http://groups.google.com/group/gitolite/browse_thread/thread/fb9cf5a464b6dfee )
(see [this thread][thr] on the gitolite mailing list)
[thr]: http://groups.google.com/group/gitolite/browse_thread/thread/fb9cf5a464b6dfee
By default, the old 'rmrepo' ADC (admin-defined command) just went and deleted
the repo -- no questions asked! Sometimes, that could be a disaster -- you
@ -13,12 +15,13 @@ either, both, or neither family of commands.
Local settings for these ADCs can be found in the common settings file
"adc.common-functions".
1. 'rm' will remove the repo. If USE_LOCK_UNLOCK is set, rm will refuse to
1. 'rm' will remove the repo. If `USE_LOCK_UNLOCK` is set, rm will refuse to
remove a locked repo. All repos are locked by default, and you have to
explicitly 'unlock' a repo to remove it. You can also 'lock' it again
instead of removing it of course.
There's also ARE_YOU_SURE, for situations where a simple warning suffices.
There's also `ARE_YOU_SURE`, for situations where a simple warning
suffices.
You can also use both these flags if you wish.