sahana sharing your work with others

14
Bzr & LaunchPad: Sharing Your Work with Others 3 July 2010, Sahana Camp Fran Boon [email protected]

Upload: aidiq

Post on 06-May-2015

547 views

Category:

Documents


0 download

TRANSCRIPT

  • 1.Bzr & LaunchPad: Sharing Your Work with Others 3 July 2010, Sahana Camp Fran Boon [email_address]

2. Sharing your work with others

  • Distributed Version Control: bzr
  • Branches hosted on LaunchPad
  • Merge Early, Merge Often

3. Branches LaunchPad Merge proposal Trunk Local Branch Server Your Branch bzr merge bzr push bzr pull 4. LP: Public/Private Key

  • Linux/Mac:
    • ssh-keygen-trsa
  • Windows:
    • puttygen.exe
    • Generate
    • Move mouse to generate entropy
    • Do NOT close window

5. 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

6. 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

7. 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

8. 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)

9. 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.BASEversion of the file where both trees agreed
  • xxx.THISversion of the file inthisbranch
  • xxx.OTHERversion of the file inotherbranch
  • bzr resolve filename
  • KDiff3is a utility which can do a 3-way Diff.

10. Subscribe to Branch

  • Merge team selected
  • All users should subscribe to the Merge teams branch
  • Merge team should subscribe to all other branches

11. 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

12. Merge Proposal

  • https://code.launchpad.net/~userid/sahana-eden/winner/+register-merge
  • Target Branch:
    • Other
    • Choose look for the winners userid

13. Branches LaunchPad Merge proposal Trunk Local Branch Server Your Branch bzr merge bzr push bzr pull 14. End