Mercurial > hg > orthanc-book
annotate Sphinx/source/developers/repositories.rst @ 534:8e27dbf6f39e
BasicAuthLevel put in more visible way
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Tue, 27 Oct 2020 14:17:03 +0100 |
parents | 53901a601ea2 |
children | 654e1614cec1 |
rev | line source |
---|---|
339
c0a3cd1cabff
Accessing code repositories
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1 .. _repositories: |
c0a3cd1cabff
Accessing code repositories
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
2 |
c0a3cd1cabff
Accessing code repositories
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
3 Accessing code repositories |
c0a3cd1cabff
Accessing code repositories
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
4 =========================== |
c0a3cd1cabff
Accessing code repositories
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
5 |
c0a3cd1cabff
Accessing code repositories
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
6 .. contents:: |
c0a3cd1cabff
Accessing code repositories
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
7 |
c0a3cd1cabff
Accessing code repositories
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
8 |
c0a3cd1cabff
Accessing code repositories
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
9 Context |
c0a3cd1cabff
Accessing code repositories
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
10 ------- |
c0a3cd1cabff
Accessing code repositories
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
11 |
c0a3cd1cabff
Accessing code repositories
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
12 The Orthanc server and most of its plugins are versioned using |
c0a3cd1cabff
Accessing code repositories
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
13 `Mercurial <https://en.wikipedia.org/wiki/Mercurial>`__ on a |
c0a3cd1cabff
Accessing code repositories
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
14 `self-hosted server <https://hg.orthanc-server.com/>`__. |
c0a3cd1cabff
Accessing code repositories
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
15 |
c0a3cd1cabff
Accessing code repositories
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
16 The Orthanc project started back in 2011, back in a time where |
c0a3cd1cabff
Accessing code repositories
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
17 Mercurial and `Git <https://en.wikipedia.org/wiki/Git>`__ were equally |
c0a3cd1cabff
Accessing code repositories
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
18 popular. Sébastien Jodogne, the original author of Orthanc, decided to |
c0a3cd1cabff
Accessing code repositories
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
19 use Mercurial given the higher simplicity of its set of commands, and |
c0a3cd1cabff
Accessing code repositories
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
20 given the fact it is safer to use for less experienced users. |
c0a3cd1cabff
Accessing code repositories
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
21 |
c0a3cd1cabff
Accessing code repositories
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
22 As pointed out on `Wikipedia |
c0a3cd1cabff
Accessing code repositories
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
23 <https://en.wikipedia.org/wiki/Mercurial>`__, the *"Git vs. Mercurial |
c0a3cd1cabff
Accessing code repositories
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
24 [debate] has become one of the holy wars of hacker culture."* We |
c0a3cd1cabff
Accessing code repositories
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
25 certainly don't want to endure this debate in the context of the |
c0a3cd1cabff
Accessing code repositories
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
26 Orthanc ecosystem. The fact is that a distributed revision-control |
340 | 27 was needed for Orthanc, and that both Git and Mercurial have a similar |
339
c0a3cd1cabff
Accessing code repositories
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
28 set of features. |
c0a3cd1cabff
Accessing code repositories
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
29 |
c0a3cd1cabff
Accessing code repositories
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
30 If Orthanc were started in 2020, maybe we would have used Git, or |
340 | 31 maybe not. But the Orthanc ecosystem is not at all about versioning |
32 systems. We want to be entirely dedicated to lowering barriers to | |
33 entry in the field of medical imaging. As a consequence, the choice of | |
339
c0a3cd1cabff
Accessing code repositories
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
34 Mercurial should be considered as a part of the history, and we simply |
c0a3cd1cabff
Accessing code repositories
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
35 ask people to accept it as a fact. |
c0a3cd1cabff
Accessing code repositories
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
36 |
c0a3cd1cabff
Accessing code repositories
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
37 Regarding the reason behind self-hosting, Orthanc was hosted on |
c0a3cd1cabff
Accessing code repositories
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
38 `Google Code |
c0a3cd1cabff
Accessing code repositories
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
39 <https://en.wikipedia.org/wiki/Google_Developers#Google_Code>`__ |
c0a3cd1cabff
Accessing code repositories
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
40 between 2012 and 2015, until it was shutdown. In July 2015, Orthanc |
c0a3cd1cabff
Accessing code repositories
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
41 was moved to `Bitbucket by Atlassian |
c0a3cd1cabff
Accessing code repositories
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
42 <https://en.wikipedia.org/wiki/Bitbucket>`__. Unfortunately, in July |
c0a3cd1cabff
Accessing code repositories
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
43 2019, Bitbucket announced that `Mercurial support would be dropped on |
c0a3cd1cabff
Accessing code repositories
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
44 June 2020 |
c0a3cd1cabff
Accessing code repositories
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
45 <https://bitbucket.org/blog/sunsetting-mercurial-support-in-bitbucket>`__, |
c0a3cd1cabff
Accessing code repositories
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
46 forcing us to deal with another migration. |
c0a3cd1cabff
Accessing code repositories
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
47 |
c0a3cd1cabff
Accessing code repositories
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
48 We are of course grateful to Google and Atlassian for having hosted |
c0a3cd1cabff
Accessing code repositories
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
49 Orthanc during 8 years. However, we cannot afford the cost of |
c0a3cd1cabff
Accessing code repositories
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
50 periodically coping with hosting migrations. We prefer to have a |
c0a3cd1cabff
Accessing code repositories
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
51 simpler environment, yet under our full control. As a consequence, |
c0a3cd1cabff
Accessing code repositories
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
52 starting Q2 2020, Orthanc is hosted using the official ``hg serve`` |
c0a3cd1cabff
Accessing code repositories
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
53 tool. |
c0a3cd1cabff
Accessing code repositories
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
54 |
c0a3cd1cabff
Accessing code repositories
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
55 |
c0a3cd1cabff
Accessing code repositories
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
56 Accessing Mercurial |
c0a3cd1cabff
Accessing code repositories
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
57 ------------------- |
c0a3cd1cabff
Accessing code repositories
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
58 |
340 | 59 .. _hg-clone: |
60 | |
339
c0a3cd1cabff
Accessing code repositories
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
61 Read-only access |
c0a3cd1cabff
Accessing code repositories
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
62 ^^^^^^^^^^^^^^^^ |
c0a3cd1cabff
Accessing code repositories
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
63 |
c0a3cd1cabff
Accessing code repositories
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
64 Anybody has full read-only access to all of the Orthanc official |
c0a3cd1cabff
Accessing code repositories
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
65 repositories, on our `self-hosted server |
390
32d0a95bee7e
note about slowness
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
366
diff
changeset
|
66 <https://hg.orthanc-server.com/>`__. As the ``hg serve`` tool that is |
32d0a95bee7e
note about slowness
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
366
diff
changeset
|
67 used by our Web server tends to be slow, we recommend people to |
32d0a95bee7e
note about slowness
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
366
diff
changeset
|
68 locally clone our Mercurial repositories. |
339
c0a3cd1cabff
Accessing code repositories
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
69 |
c0a3cd1cabff
Accessing code repositories
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
70 .. highlight:: bash |
c0a3cd1cabff
Accessing code repositories
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
71 |
c0a3cd1cabff
Accessing code repositories
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
72 Locally cloning one of those Mercurial repositories (say, the main |
c0a3cd1cabff
Accessing code repositories
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
73 ``orthanc`` repository) is as simple as typing:: |
c0a3cd1cabff
Accessing code repositories
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
74 |
362 | 75 $ hg clone https://hg.orthanc-server.com/orthanc/ |
339
c0a3cd1cabff
Accessing code repositories
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
76 |
340 | 77 You can then use separate tools such as `TortoiseHg |
78 <https://en.wikipedia.org/wiki/TortoiseHg>`__ to browse the code with | |
79 richer features than the Web interface. | |
80 | |
366 | 81 .. highlight:: text |
82 | |
83 You might have to set up a host fingerprint in the Mercurial | |
84 configuration. Add the following lines to your ``~/.hgrc`` file:: | |
85 | |
86 [hostfingerprints] | |
522 | 87 hg.orthanc-server.com = 1B:29:E6:DE:95:7B:6B:21:59:2C:0E:C4:85:B9:64:C9:08:84:9B:98 |
514
55bd72f6df8a
update mercurial fingerprints
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
498
diff
changeset
|
88 |
55bd72f6df8a
update mercurial fingerprints
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
498
diff
changeset
|
89 .. highlight:: bash |
55bd72f6df8a
update mercurial fingerprints
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
498
diff
changeset
|
90 |
55bd72f6df8a
update mercurial fingerprints
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
498
diff
changeset
|
91 For reference, here is the command that was used to generate this SHA1 |
55bd72f6df8a
update mercurial fingerprints
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
498
diff
changeset
|
92 fingerprint (`click here for more information |
55bd72f6df8a
update mercurial fingerprints
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
498
diff
changeset
|
93 <https://wiki.fluidproject.org/display/fluid/Setting+Host+Fingerprints+for+Mercurial>`__):: |
55bd72f6df8a
update mercurial fingerprints
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
498
diff
changeset
|
94 |
522 | 95 $ openssl s_client -servername hg.orthanc-server.com -connect hg.orthanc-server.com:443 \ |
96 < /dev/null 2>/dev/null | openssl x509 -fingerprint -sha1 -noout -in /dev/stdin | |
514
55bd72f6df8a
update mercurial fingerprints
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
498
diff
changeset
|
97 |
55bd72f6df8a
update mercurial fingerprints
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
498
diff
changeset
|
98 **Important:** As our certificates are changed periodically, you'll |
55bd72f6df8a
update mercurial fingerprints
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
498
diff
changeset
|
99 have to regularly update your configuration file once Mercurial |
55bd72f6df8a
update mercurial fingerprints
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
498
diff
changeset
|
100 complains about an unexpected fingerprint. |
366 | 101 |
339
c0a3cd1cabff
Accessing code repositories
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
102 |
391
4bc6bcd83ae5
hostfingerprints is not specific to Windows
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
390
diff
changeset
|
103 Recent versions of Mercurial |
4bc6bcd83ae5
hostfingerprints is not specific to Windows
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
390
diff
changeset
|
104 ............................ |
344 | 105 |
106 .. highlight:: text | |
107 | |
391
4bc6bcd83ae5
hostfingerprints is not specific to Windows
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
390
diff
changeset
|
108 While cloning the repository, you might face an error similar to:: |
344 | 109 |
110 abort: error: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:661) | |
111 | |
112 In such a case, you must explicitly add the cryptographic fingerprint | |
391
4bc6bcd83ae5
hostfingerprints is not specific to Windows
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
390
diff
changeset
|
113 of our code server using a more recent option than the |
4bc6bcd83ae5
hostfingerprints is not specific to Windows
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
390
diff
changeset
|
114 ``hostfingerprints`` option. To this end, edit the `configuration file |
344 | 115 <https://www.mercurial-scm.org/doc/hgrc.5.html#files>`__ of Mercurial |
391
4bc6bcd83ae5
hostfingerprints is not specific to Windows
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
390
diff
changeset
|
116 (by default on Microsoft Windows, ``%USERPROFILE%\Mercurial.ini``), |
4bc6bcd83ae5
hostfingerprints is not specific to Windows
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
390
diff
changeset
|
117 and add the following lines:: |
344 | 118 |
119 [hostsecurity] | |
522 | 120 hg.orthanc-server.com:fingerprints=sha256:6A:D9:B8:88:C2:96:F1:00:B1:5E:CF:80:BB:CC:23:C5:73:18:D1:7C:7A:7B:10:3E:62:1B:08:87:42:F1:1E:BF |
344 | 121 |
122 .. highlight:: bash | |
123 | |
124 For reference, here is the command that was used to generate this | |
514
55bd72f6df8a
update mercurial fingerprints
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
498
diff
changeset
|
125 SHA256 fingerprint (`click here for more information |
344 | 126 <https://stackoverflow.com/a/56579497/881731>`__):: |
127 | |
522 | 128 $ openssl s_client -servername hg.orthanc-server.com -connect hg.orthanc-server.com:443 \ |
129 < /dev/null 2>/dev/null | openssl x509 -fingerprint -sha256 -noout -in /dev/stdin | |
344 | 130 |
131 | |
339
c0a3cd1cabff
Accessing code repositories
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
132 Write access |
c0a3cd1cabff
Accessing code repositories
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
133 ^^^^^^^^^^^^ |
c0a3cd1cabff
Accessing code repositories
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
134 |
c0a3cd1cabff
Accessing code repositories
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
135 Only the core developers of Orthanc have direct write access to the |
342 | 136 Orthanc repositories (through SSH). Core developers can clone a |
137 repository with write access as follows:: | |
138 | |
362 | 139 $ hg clone ssh://hg@hg.orthanc-server.com/public/orthanc/ |
339
c0a3cd1cabff
Accessing code repositories
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
140 |
c0a3cd1cabff
Accessing code repositories
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
141 |
340 | 142 .. _hg-contributing: |
143 | |
339
c0a3cd1cabff
Accessing code repositories
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
144 Submitting code |
c0a3cd1cabff
Accessing code repositories
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
145 ^^^^^^^^^^^^^^^ |
c0a3cd1cabff
Accessing code repositories
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
146 |
c0a3cd1cabff
Accessing code repositories
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
147 We will of course be extremely grateful for receiving external code |
c0a3cd1cabff
Accessing code repositories
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
148 contributions to the Orthanc repositories! |
c0a3cd1cabff
Accessing code repositories
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
149 |
c0a3cd1cabff
Accessing code repositories
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
150 However, one of the weaknesses of our self-hosted infrastructure is |
c0a3cd1cabff
Accessing code repositories
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
151 that is does not support automation for `pull requests |
c0a3cd1cabff
Accessing code repositories
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
152 <https://en.wikipedia.org/wiki/Distributed_version_control#Pull_requests>`__. |
340 | 153 This section explains the `two accepted ways for communicating |
154 contributions | |
155 <https://www.mercurial-scm.org/wiki/CommunicatingChanges>`__: by | |
156 submitting a patch, or by exchanging a bundle. | |
339
c0a3cd1cabff
Accessing code repositories
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
157 |
c0a3cd1cabff
Accessing code repositories
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
158 Importantly, before any contribution can be accepted into the Orthanc |
c0a3cd1cabff
Accessing code repositories
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
159 repositories, its author must sign a :ref:`CLA <cla>`. This allows |
c0a3cd1cabff
Accessing code repositories
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
160 both the University Hospital of Liège and the Osimis company to act as |
c0a3cd1cabff
Accessing code repositories
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
161 the official guardians of the whole Orthanc ecosystem. |
c0a3cd1cabff
Accessing code repositories
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
162 |
361 | 163 Also, make sure to read our :ref:`FAQ if submitting code |
164 <submitting_code>`. | |
165 | |
339
c0a3cd1cabff
Accessing code repositories
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
166 |
340 | 167 .. _hg-patch: |
168 | |
169 Simple patch (import/export) | |
170 ............................ | |
339
c0a3cd1cabff
Accessing code repositories
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
171 |
c0a3cd1cabff
Accessing code repositories
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
172 .. highlight:: bash |
c0a3cd1cabff
Accessing code repositories
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
173 |
c0a3cd1cabff
Accessing code repositories
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
174 If you want to propose a simple contribution, the most direct way of |
c0a3cd1cabff
Accessing code repositories
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
175 passing it on the Orthanc community is by creating a **simple patch**. |
c0a3cd1cabff
Accessing code repositories
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
176 |
c0a3cd1cabff
Accessing code repositories
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
177 First make sure to pull the latest version of the code repository, |
c0a3cd1cabff
Accessing code repositories
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
178 then work on your modification in the ``default`` branch (i.e. in the |
c0a3cd1cabff
Accessing code repositories
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
179 mainline code):: |
c0a3cd1cabff
Accessing code repositories
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
180 |
c0a3cd1cabff
Accessing code repositories
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
181 $ hg pull |
c0a3cd1cabff
Accessing code repositories
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
182 $ hg up -c default |
c0a3cd1cabff
Accessing code repositories
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
183 [...make your modifications...] |
c0a3cd1cabff
Accessing code repositories
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
184 |
c0a3cd1cabff
Accessing code repositories
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
185 Once your contribution is done, here is how to export a patch:: |
c0a3cd1cabff
Accessing code repositories
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
186 |
c0a3cd1cabff
Accessing code repositories
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
187 $ hg export -r default > /tmp/contribution.patch |
c0a3cd1cabff
Accessing code repositories
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
188 |
c0a3cd1cabff
Accessing code repositories
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
189 Once the patch is ready, you can send the ``/tmp/contribution.patch`` |
c0a3cd1cabff
Accessing code repositories
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
190 file to the Orthanc community, e.g. by submitting it onto our official |
c0a3cd1cabff
Accessing code repositories
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
191 `discussion group |
c0a3cd1cabff
Accessing code repositories
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
192 <https://groups.google.com/forum/#!forum/orthanc-users>`__. The core |
c0a3cd1cabff
Accessing code repositories
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
193 developers would reintegrate such a patch by typing the following |
c0a3cd1cabff
Accessing code repositories
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
194 command on their side:: |
c0a3cd1cabff
Accessing code repositories
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
195 |
c0a3cd1cabff
Accessing code repositories
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
196 $ hg pull |
c0a3cd1cabff
Accessing code repositories
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
197 $ hg up -c default |
c0a3cd1cabff
Accessing code repositories
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
198 $ hg import /tmp/contribution.patch |
c0a3cd1cabff
Accessing code repositories
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
199 |
c0a3cd1cabff
Accessing code repositories
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
200 |
340 | 201 .. _hg-bundle: |
339
c0a3cd1cabff
Accessing code repositories
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
202 |
340 | 203 Exchanging a bundle |
204 ................... | |
205 | |
206 .. highlight:: bash | |
207 | |
208 If your contribution is made of several changesets (commits), you | |
209 should work in a dedicated branch, then submit a Mercurial bundle for | |
210 this branch. | |
211 | |
212 First make sure to pull the latest version of the code repository, | |
213 then create a branch, say ``my-user/my-fix``, that derives from the | |
214 ``default`` branch (which corresponds to the mainline code):: | |
215 | |
216 $ hg pull | |
217 $ hg up -c default | |
218 $ hg branch my-user/my-fix | |
339
c0a3cd1cabff
Accessing code repositories
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
219 |
340 | 220 WARNING: Please chose an unique, explicit name for your branch, and |
221 make sure that your username is included within for traceability! The | |
222 name ``my-user/my-fix`` is only here for the purpose of the example. | |
223 | |
224 You can then do all the modifications as required (including ``hg | |
225 add``, ``hg rm``, and ``hg commit``) in the branch | |
226 ``my-user/my-fix``. When you're done, create a Mercurial bundle that | |
227 gathers all your changes against the source repository as follows:: | |
228 | |
229 $ hg commit -m 'submitting my fix' | |
230 $ hg bundle /tmp/contribution.bundle https://hg.orthanc-server.com/orthanc | |
339
c0a3cd1cabff
Accessing code repositories
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
231 |
340 | 232 Obviously, make sure to replace |
233 ``https://hg.orthanc-server.com/orthanc`` by the location of the | |
234 source repository. | |
339
c0a3cd1cabff
Accessing code repositories
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
235 |
340 | 236 Finally, you can submit the file ``/tmp/contribution.bundle`` to the |
237 community, just like for simple patches. Note that this procedure | |
238 inherently corresponds to the manual creation of a pull request. | |
239 | |
240 The core developers would reintegrate such a bundle into the mainline | |
241 by typing the following commands on their side:: | |
242 | |
243 $ cd /tmp | |
362 | 244 $ hg clone https://hg.orthanc-server.com/orthanc/ |
340 | 245 $ cd /tmp/orthanc |
246 $ hg unbundle /tmp/contribution.bundle | |
247 $ hg up -c default | |
248 $ hg merge my-user/my-fix | |
249 | |
339
c0a3cd1cabff
Accessing code repositories
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
250 |
c0a3cd1cabff
Accessing code repositories
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
251 Issue tracker |
c0a3cd1cabff
Accessing code repositories
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
252 ------------- |
c0a3cd1cabff
Accessing code repositories
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
253 |
445
987fbbc2b59e
leaving bitbucket wrt. bug tracker
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
436
diff
changeset
|
254 The `official bug tracker <https://bugs.orthanc-server.com/>`__ of the |
987fbbc2b59e
leaving bitbucket wrt. bug tracker
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
436
diff
changeset
|
255 Orthanc project runs thanks to `Bugzilla |
987fbbc2b59e
leaving bitbucket wrt. bug tracker
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
436
diff
changeset
|
256 <https://en.wikipedia.org/wiki/Bugzilla>`__. |
987fbbc2b59e
leaving bitbucket wrt. bug tracker
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
436
diff
changeset
|
257 |
987fbbc2b59e
leaving bitbucket wrt. bug tracker
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
436
diff
changeset
|
258 We have done our best to automatically import most of the history |
987fbbc2b59e
leaving bitbucket wrt. bug tracker
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
436
diff
changeset
|
259 from the old BitBucket bug tracker. |
987fbbc2b59e
leaving bitbucket wrt. bug tracker
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
436
diff
changeset
|
260 |
987fbbc2b59e
leaving bitbucket wrt. bug tracker
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
436
diff
changeset
|
261 Before posting any issue, make sure to carefully, completely read the |
987fbbc2b59e
leaving bitbucket wrt. bug tracker
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
436
diff
changeset
|
262 :ref:`page about how to ask support <support>`. In particular, most |
987fbbc2b59e
leaving bitbucket wrt. bug tracker
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
436
diff
changeset
|
263 issues should first be discussed on the dedicated `discussion group |
987fbbc2b59e
leaving bitbucket wrt. bug tracker
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
436
diff
changeset
|
264 <https://groups.google.com/forum/#!forum/orthanc-users>`__ before |
987fbbc2b59e
leaving bitbucket wrt. bug tracker
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
436
diff
changeset
|
265 introducing a bug report. |