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

Subscribers

People subscribed via source and target branches