Development » History » Version 1
Redmine Admin, 01/04/2017 05:23 PM
1 | 1 | Redmine Admin | h1. Development |
---|---|---|---|
2 | |||
3 | h2. Collaboration platform for Lindat |
||
4 | |||
5 | Redmine (https://redmine.ms.mff.cuni.cz/) will be used as a collaboration platform for this project for the following reasons: |
||
6 | |||
7 | # most of the Lindat project collaboration is already being done on this platform |
||
8 | # searching across Lindat projects is useful |
||
9 | # no need to learn another collaboration platform |
||
10 | # full control over the system |
||
11 | |||
12 | h2. Source code repository |
||
13 | |||
14 | Source code repository of KonText is unfortunately Mercurial. As redmine currently supports only git and as git is used for most work on Lindat project, |
||
15 | Lindat KonText repository will be also a git repository. |
||
16 | |||
17 | Fork of ÚČNK KonText repository (the Lindat KonText) was created at https://bitbucket.org/ufal/lindat-kontext and this will be used as the base for local development. |
||
18 | The fork will remain as is and will be updated as needed. |
||
19 | |||
20 | Conversion to git repository gitolite@redmine.ms.mff.cuni.cz:lindat/lindat-services/lindat-services-kontext.git was done (see below) and this will be used for local |
||
21 | ÚFAL development. The development will be done in separate branches with @lindat-@ prefix as not to mix them with ÚČNK branches. |
||
22 | |||
23 | Development will follow the guidelines described here http://nvie.com/posts/a-successful-git-branching-model/. |
||
24 | |||
25 | These are are the newly created branches: |
||
26 | * lindat-master - stable branch for local installation |
||
27 | * lindat-develop - development branch for local installation that will be merged into lindat-master |
||
28 | * lindat-<bug|feature|task>_<redmine issue number> - feature branches that will be merged into lindat-develop branch |
||
29 | |||
30 | These branches will be pushed to BitBucket as needed or possibly on regular basis. |
||
31 | Branches need to be pushed to BitBucket under the namespace branches like this: |
||
32 | |||
33 | <pre> |
||
34 | git checkout lindat-master |
||
35 | git push bitbucket branches/lindat-master |
||
36 | </pre> |
||
37 | |||
38 | ÚČNK will be granted read-only access to our repository on BitBucket and incorporate our changes if interested. |
||
39 | |||
40 | *NOTE!* As the default main branch of ÚČNK KonText is not stable, the development of LINDAT KonText is currently based on the release-0.5.x branch. Thus the branches for development are as follows: |
||
41 | |||
42 | * lindat-release-0.5.x - stable branch for local installation |
||
43 | * lindat-release-0.5.x-develop - development branch for local installation that will be merged into lindat-release-0.5.x |
||
44 | * lindat-release-0.5.x-<bug|feature|task>_<redmine issue number> - feature branches that will be merged into lindat-lindat-release-0.5.x-develop branch |
||
45 | |||
46 | |||
47 | h2. Conversion of Mercurial repository to git |
||
48 | |||
49 | To convert the repository from Mercurial to git you need to install the following packages: |
||
50 | |||
51 | <pre> |
||
52 | aptitude install mercurial |
||
53 | </pre> |
||
54 | |||
55 | Install git-remote-hg: |
||
56 | <pre> |
||
57 | git clone https://github.com/felipec/git-remote-hg |
||
58 | </pre> |
||
59 | |||
60 | and add the @git-remote-hg@ to your @PATH@ environmental variable or symlink it to @$HOME/bin@. |
||
61 | |||
62 | And finally convert the repository: |
||
63 | |||
64 | <pre> |
||
65 | git clone hg::ssh://hg@bitbucket.org/ufal/lindat-kontext |
||
66 | cd lindat-kontext |
||
67 | git remote set-url origin gitolite@redmine.ms.mff.cuni.cz:lindat/lindat-services/lindat-services-kontext.git |
||
68 | git remote add bitbucket hg::ssh://hg@bitbucket.org/ufal/lindat-kontext |
||
69 | git remote update |
||
70 | git gc --aggressive |
||
71 | git push --force |
||
72 | git checkout -b lindat-master |
||
73 | git push origin lindat-master |
||
74 | git checkout -b lindat-develop |
||
75 | git push origin lindat-develop |
||
76 | </pre> |
||
77 | |||
78 | h2. Incorporating changes from ÚČNK |
||
79 | |||
80 | To incorporate changes from ÚČNK, we first need to merge then into our develop branch (or special integration testing branch based on develop) |
||
81 | as only the develop branch is then merged into our stable branch. There will be conflits (at least in the lib/version.oy file) |
||
82 | |||
83 | <pre> |
||
84 | git fetch bitbucket |
||
85 | git checkout lindat-release-0.5.x-develop |
||
86 | git merge bitbucket/branches/release-0.5.x |
||
87 | git commit |
||
88 | </pre> |
||
89 | |||
90 | To later incorporate changes into feature branches, just rebase on develop |
||
91 | |||
92 | <pre> |
||
93 | git fetch bitbucket |
||
94 | git checkout lindat-release-0.5.x-feature_327 |
||
95 | git rebase lindat-release-0.5.x-develop |
||
96 | git commit |
||
97 | </pre> |
||
98 | |||
99 | h2. Syncing BitBucket repository with ÚČNK |
||
100 | |||
101 | There are two options for syncing repositories on BitBucket |
||
102 | |||
103 | h3. Syncing from GUI |
||
104 | |||
105 | Go to https://bitbucket.org/ufal/lindat-kontext. As the repository is a fork of https://bitbucket.org/ucnk/kontext then if the LINDAT fork is behind the parent repository, small information dialog appears in the top right corner of the page with the option to sync the repositories. Note that this dialog is not displayed otherwise. |
||
106 | |||
107 | h3. Manual syncing from command line |
||
108 | |||
109 | Clone the original Lindat-Kontext mercurial repository from Bitbucket. |
||
110 | |||
111 | <pre> |
||
112 | hg clone ssh://hg@bitbucket.org/ufal/lindat-kontext |
||
113 | </pre> |
||
114 | |||
115 | Edit @lindat-kontext/.hg/hgrc@ and add ucnk entry to this file: |
||
116 | |||
117 | <pre> |
||
118 | [paths] |
||
119 | default = ssh://hg@bitbucket.org/ufal/lindat-kontext |
||
120 | ucnk = ssh://hg@bitbucket.org/ucnk/kontext |
||
121 | </pre> |
||
122 | |||
123 | Perform synchronization: |
||
124 | |||
125 | <pre> |
||
126 | cd lindat-kontext |
||
127 | hg pull -u ucnk && hg push |
||
128 | </pre> |
||
129 | |||
130 | h2. Git submodule |
||
131 | |||
132 | LINDAT KonText uses git submodule for dependency on LINDAT Common Theme. Thus it is necessary to perform |
||
133 | |||
134 | <pre> |
||
135 | git submodule update |
||
136 | </pre> |
||
137 | |||
138 | if the LINDAT Common Theme changes. |