• Share
  • Email
  • Embed
  • Like
  • Save
  • Private Content
Sahana   sharing your work with others

Sahana sharing your work with others






Total Views
Views on SlideShare
Embed Views



0 Embeds 0

No embeds



Upload Details

Uploaded via as Microsoft PowerPoint

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
Post Comment
Edit your comment
  • Distributed Version Control allows faster development with more flexible options for sharing code between developers. Variant of famous Open Source phrase “Release Early, Release Often”
  • Normally you work in a local branch on your PC. You Merge changes in regularly from Trunk. You Push your changes to your branch on LaunchPad You Pull from LaunchPad to update your server sites
  • Required for LaunchPad: https://help.launchpad.net/YourAccount/CreatingAnSSHKeyPair No need to create a new one if you already have one http://the.earth.li/~sgtatham/putty/latest/x86/puttygen.exe
  • NB If Cygwin is installed then use the .ssh folder in your cygwin folder Windows Explorer cannot create folders which start with a dot, so need to create in the shell Save the files to the .ssh directory created NB Do Not just ‘Save Private Key’ as this will not work.
  • Copy/Paste from textbox rather than saved Public Key to avoid having to trim down to just what’s needed.
  • https://help.launchpad.net/Code/UploadingABranch
  • http://kdiff3.sourceforge.net

Sahana   sharing your work with others Sahana sharing your work with others Presentation Transcript

  • Bzr & LaunchPad: Sharing Your Work with Others 3 July 2010, Sahana Camp Fran Boon [email_address]
  • Sharing your work with others
    • Distributed Version Control: bzr
    • Branches hosted on LaunchPad
    • “ Merge Early, Merge Often”
  • Branches LaunchPad Merge proposal Trunk Local Branch Server Your Branch bzr merge bzr push bzr pull
  • LP: Public/Private Key
    • Linux/Mac:
      • ssh-keygen -t rsa
    • Windows:
      • puttygen.exe
      • Generate
      • Move mouse to generate entropy
      • Do NOT close window
  • LP: Public/Private Key
    • Windows:
    • c:
      • Windows XP:
    • cd "Documents and Settings"USERNAME%
    • Windows 7:
    • cd UsersUSERNAME%
    • md .ssh
      • Save Public Key: id_rsa.pub
      • Conversion menu | Export OpenSSH Key: id_rsa
  • Register an account on LP
    • https://login.launchpad.net/+new_account
    • Add Public Key
    • https://launchpad.net/people/+me/+editsshkeys
    • Windows:
      • Copy/Paste from PuttyGen textbox
    • Linux:
      • ~/.ssh/id_rsa.pub
  • Push a branch to LP
    • bzr launchpad-login userid
    • cd web2py/applications/eden
    • bzr add && bzr remove && bzr commit
    • bzr push lp:~userid/sahana-eden/test
  • Merge with a branch on LP
    • cd web2py/applications/eden
    • bzr merge lp:~winner/sahana-eden/test
    • See changes:
    • bzr diff
    • Back-out:
    • bzr revert (filename)
  • Resolve Conflicts
    • If a file has been edited in the same place in different ways by 2 different people, then a Conflict occurs.
    • Bzr creates 3 versions of the conflicted file:
    • xxx.BASE version of the file where both trees agreed
    • xxx.THIS version of the file in this branch
    • xxx.OTHER version of the file in other branch
    • bzr resolve filename
    • KDiff3 is a utility which can do a 3-way Diff.
  • Subscribe to Branch
    • Merge team selected
    • All users should subscribe to the Merge team’s branch
    • Merge team should subscribe to all other branches
  • Pull a new branch from LP
    • cd web2py/applications
    • bzr pull lp:~winner/sahana-eden/test winner
    • cd winner
    • (make changes)
    • bzr add && bzr remove && bzr commit
    • bzr push lp:~userid/sahana-eden/winner
  • Merge Proposal
    • https://code.launchpad.net/~userid/sahana-eden/winner/+register-merge
    • Target Branch:
      • Other
      • Choose – look for the winner’s userid
  • Branches LaunchPad Merge proposal Trunk Local Branch Server Your Branch bzr merge bzr push bzr pull
  • End