Show More
@@ -1,134 +1,135 b'' | |||
|
1 | 1 | Nginx Configuration Example |
|
2 | 2 | --------------------------- |
|
3 | 3 | |
|
4 | 4 | Use the following example to configure Nginx as a your web server. |
|
5 | 5 | |
|
6 | 6 | |
|
7 | 7 | .. code-block:: nginx |
|
8 | ||
|
8 | 9 | ## rate limiter for certain pages to prevent brute force attacks |
|
9 | 10 | limit_req_zone $binary_remote_addr zone=dl_limit:10m rate=1r/s; |
|
10 | 11 |
|
|
11 | 12 | ## custom log format |
|
12 | 13 | log_format log_custom '$remote_addr - $remote_user [$time_local] ' |
|
13 | 14 | '"$request" $status $body_bytes_sent ' |
|
14 | 15 | '"$http_referer" "$http_user_agent" ' |
|
15 | 16 | '$request_time $upstream_response_time $pipe'; |
|
16 | 17 |
|
|
17 | 18 | ## define upstream (local RhodeCode instance) to connect to |
|
18 | 19 | upstream rc { |
|
19 | 20 | # Url to running RhodeCode instance. |
|
20 | 21 | # This is shown as `- URL:` in output from rccontrol status. |
|
21 | 22 | server 127.0.0.1:10002; |
|
22 | 23 |
|
|
23 | 24 | # add more instances for load balancing |
|
24 | 25 | # server 127.0.0.1:10003; |
|
25 | 26 | # server 127.0.0.1:10004; |
|
26 | 27 | } |
|
27 | 28 |
|
|
28 | 29 | ## HTTP to HTTPS rewrite |
|
29 | 30 | server { |
|
30 | 31 | listen 80; |
|
31 | 32 | server_name rhodecode.myserver.com; |
|
32 | 33 |
|
|
33 | 34 | if ($http_host = rhodecode.myserver.com) { |
|
34 | 35 | rewrite (.*) https://rhodecode.myserver.com$1 permanent; |
|
35 | 36 | } |
|
36 | 37 | } |
|
37 | 38 |
|
|
38 | 39 | ## Optional gist alias server, for serving nicer GIST urls. |
|
39 | 40 | server { |
|
40 | 41 | listen 443; |
|
41 | 42 | server_name gist.myserver.com; |
|
42 | 43 | access_log /var/log/nginx/gist.access.log log_custom; |
|
43 | 44 | error_log /var/log/nginx/gist.error.log; |
|
44 | 45 |
|
|
45 | 46 | ssl on; |
|
46 | 47 | ssl_certificate gist.rhodecode.myserver.com.crt; |
|
47 | 48 | ssl_certificate_key gist.rhodecode.myserver.com.key; |
|
48 | 49 |
|
|
49 | 50 | ssl_session_timeout 5m; |
|
50 | 51 |
|
|
51 | 52 | ssl_protocols TLSv1 TLSv1.1 TLSv1.2; |
|
52 | 53 | ssl_prefer_server_ciphers on; |
|
53 | 54 | ssl_ciphers 'ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES256-GCM-SHA384:DHE-RSA-AES128-GCM-SHA256:DHE-DSS-AES128-GCM-SHA256:kEDH+AESGCM:ECDHE-RSA-AES128-SHA256:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA:ECDHE-ECDSA-AES128-SHA:ECDHE-RSA-AES256-SHA384:ECDHE-ECDSA-AES256-SHA384:ECDHE-RSA-AES256-SHA:ECDHE-ECDSA-AES256-SHA:DHE-RSA-AES128-SHA256:DHE-RSA-AES128-SHA:DHE-DSS-AES128-SHA256:DHE-RSA-AES256-SHA256:DHE-DSS-AES256-SHA:DHE-RSA-AES256-SHA:AES128-GCM-SHA256:AES256-GCM-SHA384:AES128-SHA256:AES256-SHA256:AES128-SHA:AES256-SHA:AES:CAMELLIA:DES-CBC3-SHA:!aNULL:!eNULL:!EXPORT:!DES:!RC4:!MD5:!PSK:!aECDH:!EDH-DSS-DES-CBC3-SHA:!EDH-RSA-DES-CBC3-SHA:!KRB5-DES-CBC3-SHA'; |
|
54 | 55 |
|
|
55 | 56 | # strict http prevents from https -> http downgrade |
|
56 | 57 | add_header Strict-Transport-Security "max-age=31536000; includeSubdomains;"; |
|
57 | 58 |
|
|
58 | 59 | # Diffie-Hellman parameter for DHE ciphersuites, recommended 2048 bits |
|
59 | 60 | #ssl_dhparam /etc/nginx/ssl/dhparam.pem; |
|
60 | 61 | |
|
61 | 62 | rewrite ^/(.+)$ https://rhodecode.myserver.com/_admin/gists/$1; |
|
62 | 63 | rewrite (.*) https://rhodecode.myserver.com/_admin/gists; |
|
63 | 64 | } |
|
64 | 65 |
|
|
65 | 66 |
|
|
66 | 67 | ## MAIN SSL enabled server |
|
67 | 68 | server { |
|
68 | 69 | listen 443 ssl; |
|
69 | 70 | server_name rhodecode.myserver.com; |
|
70 | 71 |
|
|
71 | 72 | access_log /var/log/nginx/rhodecode.access.log log_custom; |
|
72 | 73 | error_log /var/log/nginx/rhodecode.error.log; |
|
73 | 74 |
|
|
74 | 75 | ssl on; |
|
75 | 76 | ssl_certificate rhodecode.myserver.com.crt; |
|
76 | 77 | ssl_certificate_key rhodecode.myserver.com.key; |
|
77 | 78 |
|
|
78 | 79 | ssl_session_timeout 5m; |
|
79 | 80 |
|
|
80 | 81 | ssl_protocols TLSv1 TLSv1.1 TLSv1.2; |
|
81 | 82 | ssl_prefer_server_ciphers on; |
|
82 | 83 | ssl_ciphers 'ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES256-GCM-SHA384:DHE-RSA-AES128-GCM-SHA256:DHE-DSS-AES128-GCM-SHA256:kEDH+AESGCM:ECDHE-RSA-AES128-SHA256:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA:ECDHE-ECDSA-AES128-SHA:ECDHE-RSA-AES256-SHA384:ECDHE-ECDSA-AES256-SHA384:ECDHE-RSA-AES256-SHA:ECDHE-ECDSA-AES256-SHA:DHE-RSA-AES128-SHA256:DHE-RSA-AES128-SHA:DHE-DSS-AES128-SHA256:DHE-RSA-AES256-SHA256:DHE-DSS-AES256-SHA:DHE-RSA-AES256-SHA:AES128-GCM-SHA256:AES256-GCM-SHA384:AES128-SHA256:AES256-SHA256:AES128-SHA:AES256-SHA:AES:CAMELLIA:DES-CBC3-SHA:!aNULL:!eNULL:!EXPORT:!DES:!RC4:!MD5:!PSK:!aECDH:!EDH-DSS-DES-CBC3-SHA:!EDH-RSA-DES-CBC3-SHA:!KRB5-DES-CBC3-SHA'; |
|
83 | 84 |
|
|
84 | 85 | # Diffie-Hellman parameter for DHE ciphersuites, recommended 2048 bits |
|
85 | 86 | #ssl_dhparam /etc/nginx/ssl/dhparam.pem; |
|
86 | 87 | |
|
87 | 88 | include /etc/nginx/proxy.conf; |
|
88 | 89 |
|
|
89 | 90 | ## serve static files by Nginx, recommended for performance |
|
90 | 91 | # location /_static/rhodecode { |
|
91 | 92 | # alias /path/to/.rccontrol/enterprise-1/static; |
|
92 | 93 | # } |
|
93 | 94 | |
|
94 | 95 | ## channelstream websocket handling |
|
95 | 96 | location /_channelstream { |
|
96 | 97 | rewrite /_channelstream/(.*) /$1 break; |
|
97 | 98 |
|
|
98 | 99 | proxy_pass http://127.0.0.1:9800; |
|
99 | 100 |
|
|
100 | 101 | proxy_connect_timeout 10; |
|
101 | 102 | proxy_send_timeout 10m; |
|
102 | 103 | proxy_read_timeout 10m; |
|
103 | 104 | tcp_nodelay off; |
|
104 | 105 | proxy_set_header Host $host; |
|
105 | 106 | proxy_set_header X-Real-IP $remote_addr; |
|
106 | 107 | proxy_set_header X-Url-Scheme $scheme; |
|
107 | 108 | proxy_set_header X-Forwarded-Proto $scheme; |
|
108 | 109 | proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; |
|
109 | 110 | gzip off; |
|
110 | 111 | proxy_http_version 1.1; |
|
111 | 112 | proxy_set_header Upgrade $http_upgrade; |
|
112 | 113 | proxy_set_header Connection "upgrade"; |
|
113 | 114 | } |
|
114 | 115 |
|
|
115 | 116 | location /_admin/login { |
|
116 | 117 | ## rate limit this endpoint |
|
117 | 118 | limit_req zone=dl_limit burst=10 nodelay; |
|
118 | 119 | try_files $uri @rhode; |
|
119 | 120 | } |
|
120 | 121 |
|
|
121 | 122 | location / { |
|
122 | 123 | try_files $uri @rhode; |
|
123 | 124 | } |
|
124 | 125 |
|
|
125 | 126 | location @rhode { |
|
126 | 127 | proxy_pass http://rc; |
|
127 | 128 | } |
|
128 | 129 |
|
|
129 | 130 | ## custom 502 error page |
|
130 | 131 | error_page 502 /502.html; |
|
131 | 132 | location = /502.html { |
|
132 | 133 | root /path/to/.rccontrol/enterprise-1/static; |
|
133 | 134 | } |
|
134 | 135 | } No newline at end of file |
@@ -1,77 +1,77 b'' | |||
|
1 | 1 | .. _deprecated-methods-ref: |
|
2 | 2 | |
|
3 | 3 | deprecated methods |
|
4 | 4 | ================== |
|
5 | 5 | |
|
6 | 6 | changeset_comment |
|
7 | 7 | ----------------- |
|
8 | 8 | |
|
9 | 9 | .. py:function:: changeset_comment(apiuser, repoid, revision, message, userid=<Optional:<OptionalAttr:apiuser>>, status=<Optional:None>) |
|
10 | 10 | |
|
11 | 11 | .. deprecated:: 3.4.0 |
|
12 | 12 | |
|
13 | 13 | Please use method `comment_commit` instead. |
|
14 | 14 | |
|
15 | 15 | |
|
16 | 16 | Set a changeset comment, and optionally change the status of the |
|
17 | 17 | changeset. |
|
18 | 18 | |
|
19 | 19 | This command can only be run using an |authtoken| with admin |
|
20 | 20 | permissions on the |repo|. |
|
21 | 21 | |
|
22 | 22 | :param apiuser: This is filled automatically from the |authtoken|. |
|
23 | 23 | :type apiuser: AuthUser |
|
24 | 24 | :param repoid: Set the repository name or repository ID. |
|
25 | 25 | :type repoid: str or int |
|
26 | 26 | :param revision: Specify the revision for which to set a comment. |
|
27 | 27 | :type revision: str |
|
28 | 28 | :param message: The comment text. |
|
29 | 29 | :type message: str |
|
30 | 30 | :param userid: Set the user name of the comment creator. |
|
31 | 31 | :type userid: Optional(str or int) |
|
32 | 32 | :param status: Set the comment status. The following are valid options: |
|
33 | 33 | * not_reviewed |
|
34 | 34 | * approved |
|
35 | 35 | * rejected |
|
36 | 36 | * under_review |
|
37 | 37 | :type status: str |
|
38 | 38 | |
|
39 | 39 | Example error output: |
|
40 | 40 | |
|
41 |
.. code-block:: j |
|
|
41 | .. code-block:: javascript | |
|
42 | 42 | |
|
43 | 43 | { |
|
44 | "id" : <id_given_in_input>, | |
|
44 | "id" : "<id_given_in_input>", | |
|
45 | 45 | "result" : { |
|
46 | 46 | "msg": "Commented on commit `<revision>` for repository `<repoid>`", |
|
47 | "status_change": null or <status>, | |
|
47 | "status_change": null or "<status>", | |
|
48 | 48 | "success": true |
|
49 | 49 | }, |
|
50 | 50 | "error" : null |
|
51 | 51 | } |
|
52 | 52 | |
|
53 | 53 | |
|
54 | 54 | get_locks |
|
55 | 55 | --------- |
|
56 | 56 | |
|
57 | 57 | .. py:function:: get_locks(apiuser, userid=<Optional:<OptionalAttr:apiuser>>) |
|
58 | 58 | |
|
59 | 59 | .. deprecated:: 4.0.0 |
|
60 | 60 | |
|
61 | 61 | Please use method `get_user_locks` instead. |
|
62 | 62 | |
|
63 | 63 | None |
|
64 | 64 | |
|
65 | 65 | |
|
66 | 66 | show_ip |
|
67 | 67 | ------- |
|
68 | 68 | |
|
69 | 69 | .. py:function:: show_ip(apiuser, userid=<Optional:<OptionalAttr:apiuser>>) |
|
70 | 70 | |
|
71 | 71 | .. deprecated:: 4.0.0 |
|
72 | 72 | |
|
73 | 73 | Please use method `get_ip` instead. |
|
74 | 74 | |
|
75 | 75 | None |
|
76 | 76 | |
|
77 | 77 |
@@ -1,21 +1,26 b'' | |||
|
1 | 1 | .. _contributing: |
|
2 | 2 | |
|
3 | 3 | Contributing to RhodeCode |
|
4 | 4 | ========================= |
|
5 | 5 | |
|
6 | 6 | |
|
7 | 7 | |
|
8 | 8 | Welcome to the contribution guides and development docs of RhodeCode. |
|
9 | 9 | |
|
10 | 10 | |
|
11 | 11 | |
|
12 | 12 | .. toctree:: |
|
13 | 13 | :maxdepth: 1 |
|
14 | 14 | |
|
15 | 15 | overview |
|
16 | 16 | testing/index |
|
17 | 17 | dev-setup |
|
18 | 18 | db-schema |
|
19 | 19 | dev-settings |
|
20 | 20 | api |
|
21 | 21 | dependencies |
|
22 | checklist-tickets | |
|
23 | checklist-pull-request | |
|
24 | frontend | |
|
25 | standards | |
|
26 |
@@ -1,97 +1,97 b'' | |||
|
1 | 1 | .. _integrations-ci: |
|
2 | 2 | |
|
3 | 3 | CI Server integration |
|
4 | 4 | ===================== |
|
5 | 5 | |
|
6 | 6 | |
|
7 | 7 | RhodeCode :ref:`integrations-webhook` integration is a powerfull tool to allow |
|
8 | 8 | interaction with systems like Jenkin, Bamboo, TeamCity, CircleCi or any other |
|
9 | 9 | CI server that allows triggering a build using HTTP call. |
|
10 | 10 | |
|
11 | 11 | Below are few examples on how to use :ref:`integrations-webhook` to trigger |
|
12 | 12 | a CI build. |
|
13 | 13 | |
|
14 | 14 | |
|
15 | 15 | General Webhook |
|
16 | 16 | +++++++++++++++ |
|
17 | 17 | |
|
18 | 18 | :ref:`integrations-webhook` allows sending a JSON payload information to specified |
|
19 | 19 | url with GET or POST methods. There are several variables that could be used |
|
20 | 20 | in the URL greatly extending the flexibility of this type of integration. |
|
21 | 21 | |
|
22 | 22 | Most of the modern CI systems such as Jenkins, TeamCity, Bamboo or CircleCi |
|
23 | 23 | allows triggering builds via GET or POST calls. |
|
24 | 24 | |
|
25 | 25 | :ref:`integrations-webhook` can be either specified per each repository or |
|
26 | 26 | globally, if your CI maps directly to all your projects a global |
|
27 | 27 | :ref:`integrations-webhook` integration can be created and will trigger builds |
|
28 | 28 | for each change in projects. If only some projects allow triggering builds a |
|
29 | 29 | global integration will also work because mostly a CI system will ignore a |
|
30 | 30 | call for unspecified builds. |
|
31 | 31 | |
|
32 | 32 | |
|
33 | 33 | .. note:: |
|
34 | 34 | |
|
35 | 35 | A quick note on security. It's recommended to allow IP restrictions |
|
36 | 36 | to only allow RhodeCode server to trigger builds. If you need to |
|
37 | 37 | specify username and password this could be done by embedding it into a |
|
38 | trigger URL, e.g. `http://user:password@server.com/job/${project_id} | |
|
38 | trigger URL, e.g. `http://user:password@server.com/job/${project_id}` | |
|
39 | 39 | |
|
40 | 40 | |
|
41 | 41 | If users require to provide any custom parameters, they can be stored for each |
|
42 | 42 | project inside the :ref:`repo-xtra`. For example to migrate a current job that |
|
43 | 43 | has a numeric build id, storing this as `jenkins_build_id` key extra field |
|
44 | 44 | the url would look like that:: |
|
45 | 45 | |
|
46 | 46 | http://server/job/${extra:jenkins_build_id}/ |
|
47 | 47 | |
|
48 | 48 | |
|
49 | 49 | .. note:: |
|
50 | 50 | |
|
51 | 51 | Please note that some variables will result in multiple calls. |
|
52 | 52 | e.g. for |HG| specifying `${branch}` will trigger as many builds as how |
|
53 | 53 | many branches the suer actually pushed. Same applies to `${commit_id}` |
|
54 | 54 | This will trigger many builds if many commits are pushed. This allows |
|
55 | 55 | triggering individual builds for each pushed commit. |
|
56 | 56 | |
|
57 | 57 | |
|
58 | 58 | Jenkins |
|
59 | 59 | +++++++ |
|
60 | 60 | |
|
61 | 61 | To use Jenkins CI with RhodeCode, a Jenkins Build with Parameters should be used. |
|
62 | 62 | Plugin details are available here: https://wiki.jenkins.io/display/JENKINS/Build+With+Parameters+Plugin |
|
63 | 63 | |
|
64 | 64 | If the plugin is configured, RhodeCode can trigger builds automatically by |
|
65 | 65 | calling such example url provided in :ref:`integrations-webhook` integration:: |
|
66 | 66 | |
|
67 | 67 | http://server/job/${project_id}/build-branch-${branch}/buildWithParameters?token=TOKEN&PARAMETER=value&PARAMETER2=value2 |
|
68 | 68 | |
|
69 | 69 | |
|
70 | 70 | Team City |
|
71 | 71 | +++++++++ |
|
72 | 72 | |
|
73 | 73 | To use TeamCity CI it's enough to call the API and provide a buildId. |
|
74 | 74 | Example url after configuring :ref:`repo-xtra` would look like that:: |
|
75 | 75 | |
|
76 | 76 | http://teacmtiyserver/viewType.html?buildTypeId=${extra:tc_build_id} |
|
77 | 77 | |
|
78 | 78 | |
|
79 | 79 | Each project can have many build configurations. |
|
80 | 80 | buildTypeId which is a unique ID for each build configuration (job). |
|
81 | 81 | |
|
82 | 82 | |
|
83 | 83 | CircleCi |
|
84 | 84 | ++++++++ |
|
85 | 85 | |
|
86 | 86 | To use CircleCi, a POST call needs to be triggered. Example build url would |
|
87 | 87 | look like this:: |
|
88 | 88 | |
|
89 | 89 | http://cicleCiServer/project/${repo_type}/${username}/${repo_id}/tree/${branch} |
|
90 | 90 | |
|
91 | 91 | |
|
92 | 92 | Circle Ci expects format of:: |
|
93 | 93 | |
|
94 | 94 | POST: /project/:vcs-type/:username/:project/tree/:branch |
|
95 | 95 | |
|
96 | 96 | |
|
97 | 97 | CircleCi API documentation can be found here: https://circleci.com/docs/api/v1-reference/ |
@@ -1,54 +1,55 b'' | |||
|
1 | 1 | .. _integrations: |
|
2 | 2 | |
|
3 | 3 | Integrations |
|
4 | 4 | ------------ |
|
5 | 5 | |
|
6 | 6 | Rhodecode supports integrations with external services for various events, |
|
7 | 7 | such as commit pushes and pull requests. Multiple integrations of the same type |
|
8 | 8 | can be added at the same time; this is useful for posting different events to |
|
9 | 9 | different Slack channels, for example. |
|
10 | 10 | |
|
11 | 11 | Supported integrations |
|
12 | 12 | ^^^^^^^^^^^^^^^^^^^^^^ |
|
13 | 13 | |
|
14 | 14 | ============================ ============ ===================================== |
|
15 | 15 | Type/Name |RC| Edition Description |
|
16 | 16 | ============================ ============ ===================================== |
|
17 | 17 | :ref:`integrations-slack` |RCCEshort| https://slack.com/ |
|
18 | 18 | :ref:`integrations-hipchat` |RCCEshort| https://www.hipchat.com/ |
|
19 | 19 | :ref:`integrations-webhook` |RCCEshort| POST events as `json` to a custom url |
|
20 | 20 | :ref:`integrations-ci` |RCCEshort| Trigger Builds for Common CI Systems |
|
21 | 21 | :ref:`integrations-email` |RCCEshort| Send repo push commits by email |
|
22 | 22 | :ref:`integrations-redmine` |RCEEshort| Close/Resolve/Reference redmine issues |
|
23 | 23 | :ref:`integrations-jira` |RCEEshort| Close/Resolve/Reference JIRA issues |
|
24 | 24 | ============================ ============ ===================================== |
|
25 | 25 | |
|
26 | 26 | .. _creating-integrations: |
|
27 | 27 | |
|
28 | 28 | Creating an Integration |
|
29 | 29 | ^^^^^^^^^^^^^^^^^^^^^^^ |
|
30 | 30 | |
|
31 | 31 | Integrations can be added globally via the admin UI: |
|
32 | 32 | |
|
33 | 33 | :menuselection:`Admin --> Integrations` |
|
34 | 34 | |
|
35 | 35 | or per repository in each repository's settings: |
|
36 | 36 | |
|
37 | 37 | :menuselection:`Admin --> Repositories --> Edit --> Integrations` |
|
38 | 38 | |
|
39 | 39 | To create an integration, select the type from the list in the *Create New |
|
40 | 40 | Integration* section. |
|
41 | 41 | |
|
42 | 42 | The *Current Integrations* section shows existing integrations that have been |
|
43 | 43 | created along with their type (eg. Slack) and enabled status. |
|
44 | 44 | |
|
45 | 45 | See pages specific to each type of integration for more instructions: |
|
46 | 46 | |
|
47 | 47 | .. toctree:: |
|
48 | 48 | |
|
49 | 49 | slack |
|
50 | 50 | hipchat |
|
51 | 51 | redmine |
|
52 | 52 | jira |
|
53 | 53 | webhook |
|
54 | 54 | |
|
55 | ci |
@@ -1,66 +1,65 b'' | |||
|
1 | 1 | .. _api-ex: |
|
2 | 2 | |
|
3 | 3 | API Example Usage |
|
4 | 4 | ================= |
|
5 | 5 | |
|
6 | 6 | Use the following example uses of the |RCE| API to carry out work on your |
|
7 | 7 | instances, or |repo| maintanence on the server. For the complete API |
|
8 | 8 | documentation, see the :ref:`api` section. |
|
9 | 9 | |
|
10 | 10 | .. _api-strip: |
|
11 | 11 | |
|
12 | 12 | Stripping Commits |
|
13 | 13 | ----------------- |
|
14 | 14 | |
|
15 | 15 | The strip command is useful for removing commits on the server, allowing |
|
16 | 16 | you to push changes without using force. To strip commits on the server, use |
|
17 | 17 | the following steps: |
|
18 | 18 | |
|
19 | 19 | 1. Install |RCT|, as explained in the :ref:`install-tools` section. |
|
20 | 20 | 2. Configure the :file:`~/.rhoderc` file with the API connection details, as |
|
21 | 21 | explained in the :ref:`config-rhoderc` section. |
|
22 | 22 | 3. Check the |RCE| changelog and see from which revision onwards you wish to |
|
23 | 23 | strip commits. This will also strip all descendants. |
|
24 | 24 | |
|
25 | 25 | .. image:: ../images/pre-strip.png |
|
26 | 26 | |
|
27 | 27 | |
|
28 | 28 | 4. Enter your |RCT| virtual environment, using the following example: |
|
29 | 29 | |
|
30 | 30 | .. code-block:: bash |
|
31 | 31 | |
|
32 | 32 | $ . venv/bin/activate |
|
33 | 33 | (venv)$ |
|
34 | 34 | |
|
35 | 35 | 5. Use the API to strip a commit, or number of commits from a |repo|. In this |
|
36 | 36 | example I am stripping the top two commits from ``ad1e0523a4ab`` onwards. |
|
37 | 37 | |
|
38 | 38 | .. note:: |
|
39 | 39 | |
|
40 | 40 | Repositories in |repo| groups require the |repo| group to be passed as |
|
41 | 41 | part of the ``repoid``. |
|
42 | 42 | |
|
43 | 43 | .. code-block:: bash |
|
44 | 44 | |
|
45 | 45 | # Run the Strip API call |
|
46 | 46 | $ rhodecode-api --instance-name=instance-id strip \ |
|
47 | 47 | repoid:repo-group/repo-name revision:ad1e0523a4ab branch:stable |
|
48 | 48 | |
|
49 | 49 | # Check the JSON-RPC verification |
|
50 | 50 | |
|
51 |
.. code-block:: j |
|
|
51 | .. code-block:: javascript | |
|
52 | 52 | |
|
53 | 53 | { |
|
54 | 54 | "error": null, |
|
55 | 55 | "id": 5960, |
|
56 | 56 | "result": { |
|
57 | "msg": "Stripped commit ad1e0523a4ab from | |
|
58 | repo `repo-group/repo-name`", | |
|
57 | "msg": "Stripped commit ad1e0523a4ab from repo `repo-group/repo-name`", | |
|
59 | 58 | "repository": "repo-group/repo-name" |
|
60 | 59 | } |
|
61 | 60 | } |
|
62 | 61 | |
|
63 | 62 | 6. Once the commits are stripped, you can verify that they are |
|
64 | 63 | stripped on the web interface. |
|
65 | 64 | |
|
66 | 65 | .. image:: ../images/post-strip.png |
General Comments 0
You need to be logged in to leave comments.
Login now