Difference between revisions of "How to commit to launchpad"

From OpenPetra Wiki
Jump to navigation Jump to search
Line 5: Line 5:
 
* Create a public and private key on launchpad. This is explained [https://help.launchpad.net/YourAccount/CreatingAnSSHKeyPair here]. It is quite important to execute pageant and to load the private key into pageant.
 
* Create a public and private key on launchpad. This is explained [https://help.launchpad.net/YourAccount/CreatingAnSSHKeyPair here]. It is quite important to execute pageant and to load the private key into pageant.
  
* In your bazaar, you need to tell your launchpad username, on the command line run <code>bzr launchpad-login USERNAME</code>. I have not found a place in the GUI to do this.
+
* In your bazaar, you need to tell your launchpad username, on the command line run <code>bzr launchpad-login USERNAME</code>. You can do this in the GUI as well, in the menu Bazaar / All Commands / category Launchpad, Command launchpad-login, and enter your launchpad id as the parameter.
  
* Do a checkout of OpenPetra from <code>http://bzr.openpetra.org:8008/openpetra/trunk</code> (or  if you are working on the website, <code>http://bzr.openpetra.org:8008/website/trunk</code>). You need to get a full checkout, ie. NOT a light-weight checkout, since that would not allow you to switch later, somehow a lock would be required on the source repository. If you're using the bazaar command line, change to your bazaar directory and execute eg.
+
* then go to https://code.launchpad.net/openpetraorg/+addbranch to create a new branch. It will have the url <code>lp:~USERNAME/openpetraorg/BRANCH_NAME</code>
  bzr checkout http://bzr.openpetra.org:8008/website/trunk D:\openPetra.org-Files3\bzr\website-launchpad\trunk
 
  
* In your local working tree, push to Launchpad which will create a new branch there: <code>lp:~USERNAME/openpetraorg/BRANCH_NAME</code>, eg. <code>lp:~jomammele/openpetraorg/website-spanish</code>.
+
* Do a checkout now from that url <code>lp:~USERNAME/openpetraorg/BRANCH_NAME</code>
If the corresponding button is not visible then execute the following command:
 
  bzr push lp:~jomammele/openpetraorg/template-changes_110811
 
 
 
* Then you do a new  your local working tree to <code>lp:~USERNAME/openpetraorg/BRANCH_NAME</code>. This means that all your future commits will go to your branch at Launchpad. If the corresponding button is not visible then execute the following command:
 
  bzr switch lp:~jomammele/openpetraorg/template-changes_110811
 
 
 
* It seems, you might get a permission error when switching from trunk hosted at the openpetra bzr server. This only happens for people that have an SSH account on our server, but no permissions for trunk. The mistake happened in the URL: you chose the bzr:ssh url, instead of http. Workaround: now just get a new checkout directly of your launchpad branch, with the url that you have pushed to.
 
  
 
* Now you can add files and change existing files, and commit them to your branch at Launchpad.
 
* Now you can add files and change existing files, and commit them to your branch at Launchpad.

Revision as of 11:30, 21 October 2011

If you don't have write privileges on bzr.openpetra.org you can also commit to launchpad. This can be done the following way:

  • First get an account on Launchpad, which is a service provided by the company Canonical, who develop Ubuntu and Bazaar: https://login.launchpad.net/+new_account
  • Create a public and private key on launchpad. This is explained here. It is quite important to execute pageant and to load the private key into pageant.
  • In your bazaar, you need to tell your launchpad username, on the command line run bzr launchpad-login USERNAME. You can do this in the GUI as well, in the menu Bazaar / All Commands / category Launchpad, Command launchpad-login, and enter your launchpad id as the parameter.
  • Do a checkout now from that url lp:~USERNAME/openpetraorg/BRANCH_NAME
  • Now you can add files and change existing files, and commit them to your branch at Launchpad.
  • If you want your changes to be merged into the OpenPetra bzr, tell a core developer the URL of your branch. It is recommended to have small branches for each feature that you want to go upstream. You will not be able to reuse a branch, after it has been merged into openpetra trunk, since we want to avoid criss cross merges etc.

If you get an unlock error-message execute a

 bzr break-lock bzr+ssh://bazaar.launchpad.net/~jomammele/openpetraorg/website-spanish/