File: HACKING

package info (click to toggle)
ark 4%3A16.08.3-2
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 3,420 kB
  • sloc: cpp: 12,818; xml: 400; ansic: 244; sh: 25; makefile: 8
file content (92 lines) | stat: -rw-r--r-- 3,757 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
== Coding Style ==
Ark follows the kdelibs/Qt coding style. For more information about them,
please see:

 - https://community.kde.org/Policies/Kdelibs_Coding_Style
 - http://wiki.qt.io/Qt_Coding_Style
 - http://wiki.qt.io/Coding_Conventions

== Sending patches ==
To send patches for Ark, you can choose one of the following:

1. Use KDE's Phabricator at <https://phabricator.kde.org>.
   The diff should be created against the Ark repository.
2. Use git's send-email command and send
   it to the kde-utils-devel@kde.org mailing list.

If you already have a KDE commit account, it is still preferrable to contact
the maintainer instead of committing directly, at least to be a good citizen
and especially so that git mistakes are not made (see the `Using git' section).

== Using git ==
The development model adopted by Ark is simple and rely on git's easy merging
and branching capabilities.  If in doubt, do not hesitate to ask!

First of all, you should do your work in a separate branch, and each commit
should be as atomic as possible.  This way, if you are asked to make changes to
them, the rest of your work is not disturbed and you can easily rebase.

New features are committed to the `master` branch, respecting KDE's Release
Schedule policies.  This means the soft and hard freeze periods must be
respected, as well as the string freeze policy.

Bug fixes are committed to the latest stable branch (for example, `Applications/16.04`),
which is then merged into the `master` branch.  Do *NOT* cherry-pick commits
into multiple branches! It makes following history unnecessarily harder for no
reason.

### How to merge stable in master

To merge the stable branch into `master`, the following steps can be followed:

   $ git checkout Applications/16.04 # Whatever the stable branch is
   $ # hack, hack, hack
   $ # commit
   $ git checkout master
   $ git merge --log --edit -s recursive -Xours Applications/16.04

Do not worry if unrelated commits (such as translation ones made by KDE's
translation infrastructure) are also merged: translation commits are
automatically reverted when needed, and other commits being merged should be
bug fixes by definition.

The merge command above will try to automatically resolve conflicts by
preferring the version of master. This is usually good, for example a conflict
often happens on the `KDE_APPLICATIONS_VERSION_XXX` variables in the root
CMakeLists.txt file. On the stable branch you will find something like:

    set (KDE_APPLICATIONS_VERSION_MAJOR "16")
    set (KDE_APPLICATIONS_VERSION_MINOR "04")
    set (KDE_APPLICATIONS_VERSION_MICRO "02")

while on master you will find something like:

    set (KDE_APPLICATIONS_VERSION_MAJOR "16")
    set (KDE_APPLICATIONS_VERSION_MINOR "07")
    set (KDE_APPLICATIONS_VERSION_MICRO "70")

In this example, the `ours` strategy option will pick the master version,
which is what we want. However, when a more complex conflict happens,
the `ours` option might fail to autoresolve the conflict and might leave
the working tree in a weird state. You should *always* check what the merge
actually did by using (after the merge):

    $ git diff origin/HEAD HEAD

If the diff output is not what you expect, you can reset the merge with:

    $ git reset --hard origin/HEAD

Then you can do a simple merge which will *not* resolve conflicts:

    $ git merge Applications/16.04

and finally resolve all conflicts by hand.

### Pushing your changes

When you are ready to push your commits to the remote repository,
you may need to update your local branch first.
Do *NOT* create unnecessary merge commits with
`git pull`, as these commits are completely avoidable and make following
history harder. Instead, you should *rebase* first (`git pull --rebase`).