Show More
@@ -70,31 +70,32 b' Creating a pull request' | |||
|
70 | 70 | (and its ancestors) by selecting it and clicking the ``Open new pull request |
|
71 | 71 | for selected changesets`` button. |
|
72 | 72 | |
|
73 | Non changeable repository urls | |
|
74 |
------------------------- |
|
|
73 | Permanent repository URLs | |
|
74 | ------------------------- | |
|
75 | 75 | |
|
76 | 76 | Due to the complicated nature of repository grouping, URLs of repositories |
|
77 | can often change. | |
|
78 | ||
|
79 | example:: | |
|
77 | can often change. For example, a repository originally accessible from:: | |
|
80 | 78 | |
|
81 | #before | |
|
82 | 79 | http://server.com/repo_name |
|
83 | # after insertion to test_group group the url will be | |
|
80 | ||
|
81 | would get a new URL after moving it to test_group:: | |
|
82 | ||
|
84 | 83 | http://server.com/test_group/repo_name |
|
85 | 84 | |
|
86 | This can be an issue for build systems and any other hardcoded scripts, moving | |
|
87 | a repository to a group leads to a need for changing external systems. To | |
|
88 | overcome this Kallithea introduces a non-changable replacement URL. It's | |
|
89 | simply a repository ID prefixed with ``_``. The above URLs are also accessible as:: | |
|
85 | Such moving of a repository to a group can be an issue for build systems and | |
|
86 | other scripts where the repository paths are hardcoded. To mitigate this, | |
|
87 | Kallithea provides permanent URLs using the repository ID prefixed with an | |
|
88 | underscore. In all Kallithea URLs, for example those for the changelog and the | |
|
89 | file view, a repository name can be replaced by this ``_ID`` string. Since IDs | |
|
90 | are always the same, moving the repository to a different group will not affect | |
|
91 | such URLs. | |
|
92 | ||
|
93 | In the example, the repository could also be accessible as:: | |
|
90 | 94 | |
|
91 | 95 | http://server.com/_<ID> |
|
92 | 96 | |
|
93 | Since IDs are always the same, moving the repository will not affect | |
|
94 | such a URL. the ``_<ID>`` syntax can be used anywhere in the system so | |
|
95 | URLs with ``repo_name`` for changelogs and files can be exchanged | |
|
96 | with the ``_<ID>`` syntax. | |
|
97 | ||
|
97 | The ID of a given repository can be shown from the repository ``Summary`` page, | |
|
98 | by selecting the ``Show by ID`` button next to ``Clone URL``. | |
|
98 | 99 | |
|
99 | 100 | E-mail notifications |
|
100 | 101 | -------------------- |
@@ -154,7 +154,7 b' class BaseVCSController(object):' | |||
|
154 | 154 | def _get_by_id(self, repo_name): |
|
155 | 155 | """ |
|
156 | 156 | Gets a special pattern _<ID> from clone url and tries to replace it |
|
157 |
with a repository_name for support of _<ID> |
|
|
157 | with a repository_name for support of _<ID> permanent URLs | |
|
158 | 158 | |
|
159 | 159 | :param repo_name: |
|
160 | 160 | """ |
@@ -8,12 +8,12 b'' | |||
|
8 | 8 | </div> |
|
9 | 9 | <div class="input"> |
|
10 | 10 | ${h.text('repo_name',class_="medium")} |
|
11 |
<span class="help-block">${_(' |
|
|
11 | <span class="help-block">${_('Permanent Repository ID')}: `_${c.repo_info.repo_id}` <span><a id="show_more_clone_id" href="#">${_('What is that?')}</a></span></span> | |
|
12 | 12 | <span id="clone_id" class="help-block" style="display: none"> |
|
13 | 13 | ${_('URL by id')}: `${c.repo_info.clone_url(with_id=True)}` </br> |
|
14 | 14 | ${_('''In case this repository is renamed or moved into another group the repository URL changes. |
|
15 |
Using the above URL guarantees that this repository |
|
|
16 |
|
|
|
15 | Using the above permanent URL guarantees that this repository always will be accessible on that URL. | |
|
16 | This is useful for CI systems, or any other cases that you need to hardcode the URL into a 3rd party service.''')}</span> | |
|
17 | 17 | </div> |
|
18 | 18 | </div> |
|
19 | 19 | <div class="field"> |
General Comments 0
You need to be logged in to leave comments.
Login now