Drizzle Wiki
Mshadle (talk | contribs)
No edit summary
 
(12 intermediate revisions by 5 users not shown)
Line 1: Line 1:
  +
{{ HeadingA|[http://drizzle.org/wiki/Contributing_Code The Drizzle Wiki has moved! Click here for the new page.] }}
  +
<br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/>
  +
<br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/>
  +
__NOTOC__
  +
 
= Pre-requisites =
 
= Pre-requisites =
   
You need [https://launchpad.net/bazaar Bazaar]
+
You need [https://launchpad.net/bazaar Bazaar] for revision control.
   
 
= Login Setup =
 
= Login Setup =
Line 13: Line 18:
 
* Register yourself
 
* Register yourself
   
bzr launchpad-login [your id]
+
bzr launchpad-login [yourloginid]
   
 
= Getting the code =
 
= Getting the code =
Line 19: Line 24:
 
You should prepare a directory to keep bzr work in
 
You should prepare a directory to keep bzr work in
   
  +
mkdir $repo # where $repos is some directory (ex: ~/repos)
mkdir /some/working/dir
 
  +
cd $repo
bzr init-repo /some/working/dir
+
bzr init-repo drizzle
   
 
You should first create a clean repo.
 
You should first create a clean repo.
   
 
bzr branch lp:drizzle trunk
cd /some/working/dir
 
bzr branch lp:drizzle
 
   
 
You can see the current history with:
 
You can see the current history with:
   
  +
cd $drizzle-repo # ex: ~/repos/drizzle
cd /some/working/dir
 
cd drizzle
+
cd trunk
 
bzr log | more
 
bzr log | more
   
 
You can now create a working copy of the clean repo
 
You can now create a working copy of the clean repo
   
 
cd $drizzle-repo
cd /some/working/dir
 
bzr branch drizzle drizzle-mypatch-example
+
bzr branch trunk drizzle-fix-bugNNNNNN
cd drizzle-mypatch-example
+
cd drizzle-fix-bugNNNNNN
   
NOTE: Use a more descriptive name then my-patch-example
+
NOTE: Use descriptive names such as drizzle-fix-bugNNNNNN (where NNNNNN is the bug # of course).
   
 
You should now [[Compiling|Compile Drizzle]].
 
You should now [[Compiling|Compile Drizzle]].
Line 46: Line 51:
 
With a working version, you can commence making changes in your new branch, committing code regularly to your local working copy.
 
With a working version, you can commence making changes in your new branch, committing code regularly to your local working copy.
 
 
  +
cd $drizzle-repo/drizzle-fix-bugNNNNNN
cd /some/working/dir
 
cd drizzle-mypatch-example
 
 
# Make Changes
 
# Make Changes
bzr commit
+
bzr commit -m "Merge comment"
 
   
 
Prior to publishing your completed work, you need update your local copy of the trunk, and then merge any changes into your working branch.
 
Prior to publishing your completed work, you need update your local copy of the trunk, and then merge any changes into your working branch.
Line 58: Line 61:
 
Update your local trunk.
 
Update your local trunk.
   
cd /some/working/dir
+
cd $drizzle-repo
cd drizzle
+
cd trunk
 
bzr pull
 
bzr pull
   
 
Updating your local branch.
 
Updating your local branch.
   
  +
cd $drizzle-repo
cd /some/working/dir
 
cd drizzle-mypatch-example
+
cd drizzle-fix-bugNNNNNN
bzr pull
+
bzr merge ../trunk
  +
bzr commit -m "Merged from trunk"
   
 
Verify differences carefully
 
Verify differences carefully
Line 76: Line 80:
 
When all changes are merged and your changes are all consistent you can push your branch to LaunchPad
 
When all changes are merged and your changes are all consistent you can push your branch to LaunchPad
   
  +
cd $drizzle-repos/$your-branch # where $your-branch is the branch you want to push (ex: drizzle-bugNNNN)
bzr push lp:~[yourloginid]/drizzle/[branch-name]
+
bzr push lp:~[yourloginid]/drizzle/$your-branch
   
 
= Propose branch =
 
= Propose branch =
 
 
On your Launchpad Code page https : //code.launchpad.net/~[yourloginid]/drizzle/[branch-name] click the '''Propose for merging into another branch''' link to p ropose branch to the maintainers to be merged into the main trunk.
+
On your Launchpad Code page https : //code.launchpad.net/~[yourloginid]/drizzle/[branch-name] click the '''Propose for merging into another branch''' link to propose branch to the maintainers to be merged into the main trunk.
  +
  +
[[Category:Development]]
  +
  +
[[it:Scrivere del codice]]

Latest revision as of 06:03, 17 November 2008

The Drizzle Wiki has moved! Click here for the new page.
























Pre-requisites[]

You need Bazaar for revision control.

Login Setup[]

  • Get a launchpad account at https://launchpad.net/+login
  • When logged in, setup your SSH keys
    • Click your name (top right corner)
    • Click Change Details link (upper right)
    • Click SSH Keys button (middle of page)
    • Upload your public SSH key (How do I get a public key?)
  • Register yourself
bzr launchpad-login [yourloginid]

Getting the code[]

You should prepare a directory to keep bzr work in

mkdir $repo # where $repos is some directory (ex: ~/repos)
cd $repo
bzr init-repo drizzle

You should first create a clean repo.

bzr branch lp:drizzle trunk

You can see the current history with:

cd $drizzle-repo # ex: ~/repos/drizzle
cd trunk
bzr log | more

You can now create a working copy of the clean repo

cd $drizzle-repo
bzr branch trunk drizzle-fix-bugNNNNNN
cd drizzle-fix-bugNNNNNN

NOTE: Use descriptive names such as drizzle-fix-bugNNNNNN (where NNNNNN is the bug # of course).

You should now Compile Drizzle.

Adding your contribution[]

With a working version, you can commence making changes in your new branch, committing code regularly to your local working copy.

cd $drizzle-repo/drizzle-fix-bugNNNNNN
# Make Changes
bzr commit -m "Merge comment"

Prior to publishing your completed work, you need update your local copy of the trunk, and then merge any changes into your working branch.

Merging recent changes[]

Update your local trunk.

cd $drizzle-repo 
cd trunk
bzr pull   

Updating your local branch.

cd $drizzle-repo
cd drizzle-fix-bugNNNNNN
bzr merge ../trunk
bzr commit -m "Merged from trunk"

Verify differences carefully

bzr diff

Publish your branch[]

When all changes are merged and your changes are all consistent you can push your branch to LaunchPad

cd $drizzle-repos/$your-branch # where $your-branch is the branch you want to push (ex: drizzle-bugNNNN)
bzr push lp:~[yourloginid]/drizzle/$your-branch

Propose branch[]

On your Launchpad Code page https : //code.launchpad.net/~[yourloginid]/drizzle/[branch-name] click the Propose for merging into another branch link to propose branch to the maintainers to be merged into the main trunk.