Diff for "Code/UploadingABranch"

Not logged in - Log In / Register

Differences between revisions 2 and 12 (spanning 10 versions)
Revision 2 as of 2008-09-08 14:44:30
Size: 6165
Editor: 92-237-59-186
Comment: Work in progress
Revision 12 as of 2008-10-10 11:06:35
Size: 4825
Editor: 92-237-59-186
Comment:
Deletions are marked like this. Additions are marked like this.
Line 17: Line 17:
<<Anchor(registering)>>
Line 19: Line 20:
First up, you need to tell Launchpad about your branch. Visit [[https://code.launchpad.net/people/+me/+addbranch|your branch registration page]] and follow the on-screen instructions. First up, tell Launchpad about your branch. Visit [[https://code.launchpad.net/people/+me/+addbranch|your branch registration page]] and follow the on-screen instructions.
Line 30: Line 31:
'''Tip:''' you can also [[Code/UploadingABranch#pushing-without-registering|push your branch to Launchpad without first registering it]].

<<Anchor(first-push)>>
Line 40: Line 44:
Replace ```your-id``` with your Launchpad id - e.g. ''matthew.revell'' rather than your email address.

On your new branch's overview page, you'll see the Bazaar command you need to issue in order to push your branch up to Launchpad.

Open up a terminal and enter:

{{{
$ bzr launchpad-login your-username
}}}

'''Note:''' The username you need to use in place of ''your-username'' is your Launchpad username. This isn't the email address you use to log into Launchpad but is instead the final portion of the URL of [[https://launchpad.net/people/+me|your profile page]].
Replace ```your-id``` with the unique portion of your Launchpad profile page's URLd - e.g. ''matthew.revell'' - rather than your email address.
Line 60: Line 54:
'''Note:''' You only need to add ``use-existing-dir`` the first time that you push to a newly registered branch. '''Note:''' You only need to add ``use-existing-dir`` the first time that you push to a branch that you've first registered in the UI. [[Code/UploadingABranch#pushing-without-registering|See below for details on pushing a branch without first registering it]].
Line 62: Line 56:
Bazaar will now push your up to Launchpad. Give it a minute or two, then refresh your branch's overview page and you'll see the branch's most recent commits, as well as information about the format of your branch. Bazaar will now push your branch up to Launchpad. Give it a minute or two, then refresh your branch's overview page and you'll see the branch's most recent commits, as well as information about the format of your branch.
Line 64: Line 58:
Your branch is now public: anyone can make their own copy, work on that copy on their local machine and, if they choose, push their new branch back up to Launchpad.
Line 65: Line 60:
<<Anchor(pushing-without-registering)>>
=== Pushing without first registering ===
Line 66: Line 63:
Once you're more familiar with hosting your Bazaar branches on Launchpad, you can save time by pushing branches up without first registering them in the UI. All you need is to first work out what the branch address should be.
Line 67: Line 65:
For example:
Line 68: Line 67:
{{{
$ bzr push lp:~matthew.revell/bzr/bzr-experimental-docs
}}}
Line 69: Line 71:
Launchpad will see that you're pushing a new branch and register it for your automatically.
Line 70: Line 73:
== Pushing subsequent changes to Launchpad ==
Line 71: Line 75:
Now, when you work on your code, all you need to do is commit changes to your local branch using ``bzr commit -m "Commit message"``.
Line 72: Line 77:
You only need to push your changes up to Launchpad when you want to make them public.
Line 73: Line 79:
 [[https://code.launchpad.net/people+me|your code overview page]] and click the ''Register a branch'' button. = Mirroring a branch that's hosted elsewhere =
Line 75: Line 81:
If you prefer to host your branch elsewhere, but still want to make it available in Launchpad, you can ask Launchpad to mirror it.
Line 76: Line 83:
You can use Launchpad to host Bazaar branches of your code and, optionally, associate them with projects. Setting up a branch mirror is similar to registering a hosted branch, except you supply the URL to your branch and Launchpad make regular copies.
Line 78: Line 85:
Launchpad offers a directory of and hosting serivce for fraee software code. = Next steps =
Line 80: Line 87:
Using Launchpad, you can host Bazaar branches of code and, optionally, associate them with projects. You can also make your code available through Launchpad by mirroring it from elsewhere on the internet or by asking Launchpad to import it into a Bazaar branch from a Subversion or CVS repository.



Use the first two paragraphs to summarise all the important points about this article.

Tell the reader if this is the information they need as soon as possible.

= Instructional text =

Where appropriate, use step by step instructions:

'''Step 1:''' Give concise and unambiguous instructions.

'''Step 2:''' Try not to state the obvious, unless you're writing for a novice user.

{i} '''Note:''' Highlight important information with a note.

'''Step 3:''' Use a well cropped screen shot if it will help orient the reader. Don't let the screen shot replace instructional text: not everyone can see your screen shot. Don't worry about borders or annotation for small, cropped screen shots such as this.

{{attachment:screen-shot.png}}

{i} '''Warning:''' If you're about to tell the reader to delete or otherwise change something that would be hard to restore, warn them.


== Full screen shots ==

||<tablestyle="float:right; font-size: 0.8em; width:30%; background:#F1F1ED; margin: 0 0 1em 1em;" style="padding:0.5em;">{{attachment:proj-announce.png}}||
||<style="text-align: center;">'''Describe the screen shot here'''||

Some screen shots will be better placed to the right of your text. As they're not placed directly below the text that they support, use a border and short description.

Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aliquam sagittis. Aliquam eros dui, scelerisque id, consequat in, accumsan vitae, pede. Suspendisse neque ligula, scelerisque ac, mattis ut, aliquam quis, odio.

Proin nunc nisi, fringilla ac, congue ac, luctus eu, lacus. Maecenas ac purus. Cras felis metus, ultricies non, euismod ac, accumsan eleifend, leo. Quisque imperdiet tempus tellus.

Ut euismod, diam nec adipiscing interdum, tortor orci fringilla nisi, vel blandit erat magna at nisi. Fusce hendrerit odio non metus. Mauris nisl massa, dapibus id, feugiat quis, blandit a, quam. Integer tincidunt feugiat nunc. Curabitur iaculis egestas elit. Nam imperdiet suscipit odio.
If you need to work on the same branch of code with a group of people, you can [[Code/TeamBranches|create a team branch]].

DRAFT: this page is a work in progress. Please seek further help or check the wiki index for a complete page on this topic.

Overview

Just as it's easy to create your own Bazaar branch of code that's registered in Launchpad, you can also host your code on Launchpad. It's free and means that your code is:

  • available for anyone else to download and work with
  • publicly associated with the project it relates to
  • ready to take part in public merge requests and code review.

The easiest way to get your code on Launchpad is to push your branch using Bazaar. Alternatively, Launchpad can mirror a Bazaar branch that's hosted elsewhere on the internet or convert existing Subversion and CVS repositories into Bazaar branches.

Pushing your Bazaar branch to Launchpad

Registering your branch in Launchpad

First up, tell Launchpad about your branch. Visit your branch registration page and follow the on-screen instructions.

Note: if you haven't already, you should read our guide to creating your own branch.

You should leave most of the options on the branch registration page at their default setting, other than:

  • Project: choose whichever project your code is a branch of

  • Branch type: choose Hosted as you want to host your branch on Launchpad.

Once you've clicked the Register branch button, you're ready to push your code up to Launchpad.

Tip: you can also push your branch to Launchpad without first registering it.

Making the first push

branch-update.png

Before you do anything else, you need to tell Launchpad who you are and then ask Bazaar to log into Launchpad using your account. If you haven't already, register your SSH key with Launchpad. Next, open up a terminal and enter:

$ bzr launchpad-login your-id

Replace your-id with the unique portion of your Launchpad profile page's URLd - e.g. matthew.revell - rather than your email address.

If your login is successful, Bazaar will give you no message.

Now, copy the Update this branch: command from your branch's overview page and paste it in your terminal. Before hit Enter, add --use-existing-dir to the command, so it looks something like this:

$ bzr push lp:~your-username/project-name/branch-name --use-existing-dir

Note: You only need to add use-existing-dir the first time that you push to a branch that you've first registered in the UI. See below for details on pushing a branch without first registering it.

Bazaar will now push your branch up to Launchpad. Give it a minute or two, then refresh your branch's overview page and you'll see the branch's most recent commits, as well as information about the format of your branch.

Your branch is now public: anyone can make their own copy, work on that copy on their local machine and, if they choose, push their new branch back up to Launchpad.

Pushing without first registering

Once you're more familiar with hosting your Bazaar branches on Launchpad, you can save time by pushing branches up without first registering them in the UI. All you need is to first work out what the branch address should be.

For example:

$ bzr push lp:~matthew.revell/bzr/bzr-experimental-docs

Launchpad will see that you're pushing a new branch and register it for your automatically.

Pushing subsequent changes to Launchpad

Now, when you work on your code, all you need to do is commit changes to your local branch using bzr commit -m "Commit message".

You only need to push your changes up to Launchpad when you want to make them public.

Mirroring a branch that's hosted elsewhere

If you prefer to host your branch elsewhere, but still want to make it available in Launchpad, you can ask Launchpad to mirror it.

Setting up a branch mirror is similar to registering a hosted branch, except you supply the URL to your branch and Launchpad make regular copies.

Next steps

If you need to work on the same branch of code with a group of people, you can create a team branch.

Code/UploadingABranch (last edited 2016-04-30 09:51:08 by cjwatson)