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