Merge lp:~elementary-apps/pantheon-terminal/hacking-doc into lp:~elementary-apps/pantheon-terminal/trunk

Proposed by David Gomes
Status: Merged
Approved by: Akshay Shekher
Approved revision: 514
Merged at revision: 514
Proposed branch: lp:~elementary-apps/pantheon-terminal/hacking-doc
Merge into: lp:~elementary-apps/pantheon-terminal/trunk
Diff against target: 226 lines (+222/-0)
1 file modified
HACKING (+222/-0)
To merge this branch: bzr merge lp:~elementary-apps/pantheon-terminal/hacking-doc
Reviewer Review Type Date Requested Status
Akshay Shekher (community) Approve
Review via email: mp+183143@code.launchpad.net

Commit message

Added a HACKING document.

Description of the change

Added an HACKING file.

To post a comment you must log in.
Revision history for this message
Akshay Shekher (voldyman) wrote :

Fixy line 10 rest is good.

review: Needs Fixing
514. By David Gomes

Fixed PPA link.

Revision history for this message
Akshay Shekher (voldyman) wrote :

Looks good.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== added file 'HACKING'
--- HACKING 1970-01-01 00:00:00 +0000
+++ HACKING 2013-08-30 12:58:30 +0000
@@ -0,0 +1,222 @@
1====== Pantheon Terminal - Contribute ======
2
3====== Testing the latest build ======
4
5Get daily builds on Launchpad for Ubuntu 12.04 and later.
6
7 https://launchpad.net/~elementary-os/+archive/daily
8
9====== Join IRC chat rooms ======
10
11Join #elementary-dev on Freenode (irc.freenode.net).
12
13====== Contribute without touching code ======
14
15Go through problem reports and check unconfirmed bugs or those lacking
16information and mark any duplicates you spot.
17
18 http://bugs.launchpad.net/pantheon-terminal
19
20Help getting Pantheon Terminal translated in your language!
21
22 https://translations.launchpad.net/pantheon-terminal
23
24Answer questions.
25
26 https://answers.launchpad.net/pantheon-terminal
27
28====== Check out the sources ======
29
30 bzr branch lp:pantheon-terminal
31
32The development trunk (master, tip) is the latest iteration of the next
33release. Browse it online and look for other branches at:
34
35 http://code.launchpad.net/pantheon-terminal
36
37====== Build the code ======
38
39Prepare the source and compile:
40 mkdir build
41 cd build/
42 cmake .. -DCMAKE_INSTALL_PREFIX=/usr
43 make
44
45Run Pantheon Terminal:
46 ./pantheon-terminal # from build/
47
48====== Important: Keep fixes for different bugs in different branches ======
49
50Branches that contain patches to fix more than one bug will be rejected, and
51you will be asked to supply a separate branch for every bug fix. However,
52this doesn't apply to patches that are indivisible by nature, and that
53fix multiple bugs.
54
55The reasons to work in this way are the following:
56
57If one of the bugs targeted by your branch is correctly fixed, but one of the
58other bugs is incorrectly fixed or needs corrections, the branch won't be
59accepted until everything looks ok for all bugs. This causes an unnecessary
60delay for the bugs that where fixed correctly.
61
62Suppose your branch was accepted for merging in the main one. Later, it is
63discovered that your branch introduces faulty behavior. The standard course of
64action for these situations is to revert the merge that introduced that faulty
65behavior. This will cause that all of your fixes are reverted (even the ones
66that didn't cause problems) because there was no way of discriminating between
67them. If a separate branch for each bug fixed existed, only the offending one
68would have been reverted, and not all of them.
69
70Be sure to understand this, and avoid a headache later!
71
72====== Coding style ======
73
74Pantheon Terminal's source code in general follows the elementary Code Style.
75In fact, you can read more about it here:
76
77 http://elementaryos.org/docs/code/code-style
78
79====== Committing code ======
80
81Make a branch which will contain your changes for fixing bug 123456:
82
83 bzr branch lp:pantheon-terminal fix-123456
84
85Tell Bazaar your name if you haven't yet:
86
87 bzr whoami "Real Name <email@address>"
88
89See what you did so far:
90
91 bzr diff
92 bzr diff | less
93
94Get an overview of changed and new files:
95
96 bzr status
97
98Add new files, move/ rename or delete:
99
100 bzr add FILENAME
101 bzr mv OLDFILENAME NEWFILENAME
102 bzr rm FILENAME
103
104Note: 'bzr add' should be used only when new source or data files are added
105to Pantheon Terminal's source directory.
106
107After making your changes, you need to commit your work as a new revision.
108
109 bzr commit
110
111Bazaar will open the default text editor (in most systems, nano) where you
112will write the commit message, save the document, and close it. Bazaar will
113use the commit message as commentary for the new revision, so it should be
114a concise summary of what you did.
115
116To change Bazaar's text editor, add the following line to Bazaar's
117configuration file (usually located at ~/.bazaar/bazaar.conf):
118
119 editor = your_text_editor_here
120
121For example:
122
123 editor = gedit
124
125Commit your changes in small increments. It is better to keep different
126changes in different commits.
127
128If a commit fixes a reported bug in Launchpad, it is useful to make a
129reference to that bug report when committing:
130
131 bzr commit --fixes lp:123456
132
133Did you make changes to more than one file, but don't want to commit the
134changes of all of them? You can specify which files you want to commit:
135
136 bzr commit file1 file2
137
138To see the last 5 revisions in the current branch:
139
140 bzr log -l5
141 bzr log -l5 -p | less
142
143In the case you committed something wrong or want to ammend it:
144
145 bzr uncommit
146
147If you want to revert all the changes made after the last revision:
148
149 bzr revert
150
151Remember to keep your branch updated:
152
153 bzr pull
154
155As a general rule of thumb, 'bzr help COMMAND' gives you an explanation of any
156command and 'bzr help commands' lists all available commands.
157
158====== Push proposed changes ======
159
160If you haven't yet, https://launchpad.net/~/+editsshkeys check that Launchpad
161has your SSH key - you can create an SSH key with Passwords and Keys aka
162Seahorse or 'ssh-keygen -t rsa' - and use 'bzr launchpad-login' to make
163youself known to bzr locally.
164
165If you checked out trunk, and commited your patch(es), just push it under your
166username in Launchpad and you can propose it for merging into trunk. This will
167automatically request a review from other developers who can then comment on
168it and provide feedback.
169
170 bzr push lp:~USERNAME/pantheon-terminal/fix-123456
171 bzr lp-open
172
173The last command will open a summary of the current branch in your web
174browser. There, you will be able to propose it for merging into trunk.
175Your branch will be reviewed by another developer. At this stage, you may be
176notified that changes need to be made to your branch, so keep an eye on your
177email inbox!
178After the branch is approved by the reviewer, it will get merged into the main
179project's source code.
180
181
182What happens to all the branches?
183
184Leave the branches alone, approved branches are cleared automatically by
185Launchpad.
186
187For larger feature branches, use the team in Launchpad to allow other
188developers to work on the code with you.
189
190What if I want to help out on an existing merge request that I can't push to?
191
192 bzr branch lp:~OTHERPERSON/pantheon-terminal/fix-123456
193 cd fix-123456
194 # make commits
195 bzr push lp:~USERNAME/pantheon-terminal/fix-123456
196 bzr lp-open
197
198And in the Launchpad web overview of your branch, propose your branch for
199merging into lp:~OTHERPERSON/pantheon-terminal/fix-123456
200
201Updating a branch that may be out of sync with trunk:
202
203 bzr pull
204 bzr: ERROR: These branches have diverged
205 bzr merge lp:pantheon-terminal
206 # Hand-edit conflicting changes
207 bzr resolve FILENAME
208 # If any conflicts remain continue fixing
209 bzr commit -m 'Merge changes from lp:pantheon-terminal'
210
211Save a little bandwidth, branch from an existing local copy that you keep
212around:
213
214 bzr branch lp:pantheon-terminal pantheon-terminal
215 bzr branch pantheon-terminal/ pantheon-terminal-fix-123456
216 cd pantheon-terminal-fix-123456
217 bzr pull lp:pantheon-terminal
218
219====== License ======
220
221This document and the Pantheon Terminal project are licensed under the
222GPL Version 3.

Subscribers

People subscribed via source and target branches