general.rst
174 lines
| 6.5 KiB
| text/x-rst
|
RstLexer
r1025 | .. _general: | |||
r2095 | ======================= | |||
Bradley M. Kuhn
|
r4192 | General Kallithea usage | ||
r1025 | ======================= | |||
Søren Løvborg
|
r5425 | Repository deletion | ||
r1123 | ------------------- | |||
r1025 | ||||
Thomas De Schampheleire
|
r7332 | When an admin or owner deletes a repository, Kallithea does | ||
Michael V. DePalatis
|
r4955 | not physically delete said repository from the filesystem, but instead | ||
renames it in a special way so that it is not possible to push, clone | ||||
Thomas De Schampheleire
|
r4962 | or access the repository. | ||
Søren Løvborg
|
r5425 | There is a special command for cleaning up such archived repositories:: | ||
r3335 | ||||
Thomas De Schampheleire
|
r7332 | kallithea-cli repo-purge-deleted -c my.ini --older-than=30d | ||
r3335 | ||||
Thomas De Schampheleire
|
r4962 | This command scans for archived repositories that are older than | ||
30 days, displays them, and asks if you want to delete them (unless given | ||||
Thomas De Schampheleire
|
r7332 | the ``--no-ask`` flag). If you host a large amount of repositories with | ||
Thomas De Schampheleire
|
r4962 | forks that are constantly being deleted, it is recommended that you run this | ||
Michael V. DePalatis
|
r4955 | command via crontab. | ||
r1025 | ||||
Thomas De Schampheleire
|
r4962 | It is worth noting that even if someone is given administrative access to | ||
Kallithea and deletes a repository, you can easily restore such an action by | ||||
renaming the repository directory, removing the ``rm__<date>`` prefix. | ||||
Mads Kiilerich
|
r5433 | |||
Thomas De Schampheleire
|
r4965 | File view: follow current branch | ||
-------------------------------- | ||||
r1025 | ||||
Thomas De Schampheleire
|
r4965 | In the file view, left and right arrows allow to jump to the previous and next | ||
revision. Depending on the way revisions were created in the repository, this | ||||
could jump to a different branch. When the checkbox ``Follow current branch`` | ||||
is checked, these arrows will only jump to revisions on the same branch as the | ||||
currently visible revision. So for example, if someone is viewing files in the | ||||
``beta`` branch and marks the `Follow current branch` checkbox, the < and > | ||||
arrows will only show revisions on the ``beta`` branch. | ||||
r1025 | ||||
Thomas De Schampheleire
|
r4966 | Changelog features | ||
------------------ | ||||
The core feature of a repository's ``changelog`` page is to show the revisions | ||||
in a repository. However, there are several other features available from the | ||||
changelog. | ||||
Branch filter | ||||
By default, the changelog shows revisions from all branches in the | ||||
repository. Use the branch filter to restrict to a given branch. | ||||
r1025 | ||||
Thomas De Schampheleire
|
r4966 | Viewing a changeset | ||
A particular changeset can be opened by clicking on either the changeset | ||||
hash or the commit message, or by ticking the checkbox and clicking the | ||||
``Show selected changeset`` button at the top. | ||||
r1025 | ||||
Thomas De Schampheleire
|
r4966 | Viewing all changes between two changesets | ||
To get a list of all changesets between two selected changesets, along with | ||||
the changes in each one of them, tick the checkboxes of the first and | ||||
last changeset in the desired range and click the ``Show selected changesets`` | ||||
button at the top. You can only show the range between the first and last | ||||
checkbox (no cherry-picking). | ||||
r1025 | ||||
Thomas De Schampheleire
|
r4966 | From that page, you can proceed to viewing the overall delta between the | ||
selected changesets, by clicking the ``Compare revisions`` button. | ||||
Creating a pull request | ||||
You can create a new pull request for the changes of a particular changeset | ||||
(and its ancestors) by selecting it and clicking the ``Open new pull request | ||||
for selected changesets`` button. | ||||
r1025 | ||||
Søren Løvborg
|
r5425 | |||
Thomas De Schampheleire
|
r4967 | Permanent repository URLs | ||
------------------------- | ||||
r1813 | ||||
Michael V. DePalatis
|
r4955 | Due to the complicated nature of repository grouping, URLs of repositories | ||
Thomas De Schampheleire
|
r4967 | can often change. For example, a repository originally accessible from:: | ||
r3224 | ||||
Søren Løvborg
|
r5497 | http://kallithea.example.com/repo_name | ||
Thomas De Schampheleire
|
r4967 | |||
would get a new URL after moving it to test_group:: | ||||
Søren Løvborg
|
r5497 | http://kallithea.example.com/test_group/repo_name | ||
r3224 | ||||
Thomas De Schampheleire
|
r4967 | Such moving of a repository to a group can be an issue for build systems and | ||
other scripts where the repository paths are hardcoded. To mitigate this, | ||||
Kallithea provides permanent URLs using the repository ID prefixed with an | ||||
underscore. In all Kallithea URLs, for example those for the changelog and the | ||||
file view, a repository name can be replaced by this ``_ID`` string. Since IDs | ||||
are always the same, moving the repository to a different group will not affect | ||||
such URLs. | ||||
In the example, the repository could also be accessible as:: | ||||
r1813 | ||||
Søren Løvborg
|
r5497 | http://kallithea.example.com/_<ID> | ||
r3224 | ||||
Thomas De Schampheleire
|
r4967 | The ID of a given repository can be shown from the repository ``Summary`` page, | ||
by selecting the ``Show by ID`` button next to ``Clone URL``. | ||||
r1813 | ||||
Søren Løvborg
|
r5425 | |||
Søren Løvborg
|
r5412 | Email notifications | ||
------------------- | ||||
r1025 | ||||
Søren Løvborg
|
r5425 | With email settings properly configured in the Kallithea | ||
Søren Løvborg
|
r5412 | configuration file, Kallithea will send emails on user registration and when | ||
Michael V. DePalatis
|
r4955 | errors occur. | ||
r1025 | ||||
Søren Løvborg
|
r5412 | Emails are also sent for comments on changesets. In this case, an email is sent | ||
Thomas De Schampheleire
|
r4964 | to the committer of the changeset (if known to Kallithea), to all reviewers of | ||
the pull request (if applicable) and to all people mentioned in the comment | ||||
using @mention notation. | ||||
r2105 | ||||
r1025 | Trending source files | |||
r1123 | --------------------- | |||
r1025 | ||||
Thomas De Schampheleire
|
r4968 | Trending source files are calculated based on a predefined dictionary of known | ||
types and extensions. If an extension is missing or you would like to scan | ||||
Mads Kiilerich
|
r8432 | custom files, it is possible to add additional file extensions with | ||
``EXTRA_MAPPINGS`` in your custom Kallithea extensions.py file. See | ||||
:ref:`customization`. | ||||
r2706 | ||||
Cloning remote repositories | ||||
--------------------------- | ||||
Thomas De Schampheleire
|
r4969 | Kallithea has the ability to clone repositories from given remote locations. | ||
r2706 | ||||
Thomas De Schampheleire
|
r4969 | If you need to clone repositories that are protected via basic authentication, | ||
you can pass the credentials in the URL, e.g. | ||||
Søren Løvborg
|
r5497 | ``http://user:passw@remote.example.com/repo``. Kallithea will then try to login and | ||
Thomas De Schampheleire
|
r4969 | clone using the given credentials. Please note that the given credentials will | ||
be stored as plaintext inside the database. However, the authentication | ||||
information will not be shown in the clone URL on the summary page. | ||||
r3770 | ||||
Thomas De Schampheleire
|
r4963 | Specific features configurable in the Admin settings | ||
---------------------------------------------------- | ||||
r3770 | ||||
Thomas De Schampheleire
|
r4963 | In general, the Admin settings should be self-explanatory and will not be | ||
described in more detail in this documentation. However, there are a few | ||||
features that merit further explanation. | ||||
r3770 | ||||
Thomas De Schampheleire
|
r4963 | Repository extra fields | ||
Mads Kiilerich
|
r5568 | ^^^^^^^^^^^^^^^^^^^^^^^ | ||
r3777 | ||||
Søren Løvborg
|
r5425 | In the *Visual* tab, there is an option "Use repository extra | ||
fields", which allows to set custom fields for each repository in the system. | ||||
Once enabled site-wide, the custom fields can be edited per-repository under | ||||
*Options* | *Settings* | *Extra Fields*. | ||||
r3939 | ||||
Thomas De Schampheleire
|
r4963 | Example usage of such fields would be to define company-specific information | ||
into repositories, e.g., defining a ``repo_manager`` key that would give info | ||||
about a manager of each repository. There's no limit for adding custom fields. | ||||
Newly created fields are accessible via the API. | ||||
r3770 | ||||
Mads Kiilerich
|
r5413 | Meta tagging | ||
Mads Kiilerich
|
r5568 | ^^^^^^^^^^^^ | ||
r3770 | ||||
Søren Løvborg
|
r5425 | In the *Visual* tab, option "Stylify recognised meta tags" will cause Kallithea | ||
to turn certain text fragments in repository and repository group | ||||
descriptions into colored tags. Currently recognised tags are:: | ||||
r3770 | ||||
[featured] | ||||
[stale] | ||||
[dead] | ||||
[lang => lang] | ||||
[license => License] | ||||
[requires => Repo] | ||||
[recommends => Repo] | ||||
[see => URI] | ||||