SlideShare uma empresa Scribd logo
1 de 31
Baixar para ler offline
Introduction to Bazaar




       adaptive version control



                   
Who am I?

       Tim Penhey
           http://how­bazaar.blogspot.com
           https://launchpad.net/~thumper
       Currently employed by Canonical
           http://canonical.com
       Work on Launchpad integrating Bazaar
           https://launchpad.net/launchpad­bazaar


                                    
Version Control is Good




    ”Those who cannot learn from history
          are doomed to repeat it”
           ­­ George Santayana




                      
Because this sucks

    $ cp myfile.txt myfile.txt.20090120
    $ ls myfile*
    myfile.txt.bak
    myfile.txt
    myfile.txt.20090120
    myfile.txt.20081218


                              
Older Version Control Systems

       SCCS
       RCS
       CVS
       Subversion
       SourceSafe (the less said about this the better)
       Perforce


                                
Distributed is Better

       Sometimes you cannot reach the central server
           e.g. A laptop on the move
       Should still be able to record changes in a 
        meaningful manner
       A local history is available




                                   
Which trunk is true?

       If everyone has a local copy of the project, 
        who's copy is the ”true trunk”?
       Projects that use distributed version control use 
        social convention




                                
Bazaar Concepts

       Branches
       Revisions
       Repositories
       Working Trees
       Formats




                            
What is a branch?

       A line of development
       Common to use feature branches
           this is where each feature is developed in its own 
            branch
       Lives in a directory on the filesystem
           all branches are addressable with a URI
           web or filesystem addressable


                                    
What is a revision?

       A revision is a collection of modifications
           e.g. an applied patch
           e.g. updated foo.c and foo.h
       Has a committer
           The person who called `bzr commit`
       May have a different author
           Allows work to be attributed to someone else
       Has a unique identifier (revision id)
                                     
What is a branch?

       A pointer to a tip revision
           a revision has one parent for a simple commit
           a revision has multiple parents for merges
       A directed acyclic graph of revisions
           and you though graph theory had no practical 
            applications




                                    
What is a repository?

       a set of revisions




                              
What is a working tree?

       The actual source files that you look at and 
        interact with




                                
What is a format?

       Each 'object' in Bazaar has a disk format
       Formats allow for a smooth upgrade path
       Developers knew that they weren't perfect and 
        planned for future improvements
       `bzr upgrade` used to move to newer shiney 
        formats



                               
Simple Example

    $ cd my­project
    $ bzr init
    $ bzr add
    added hello.txt
    $ bzr commit
    Committed revision 1.


                             
Sharing your work

       The push command pushes your work to a 
        different location
           bzr push ~/public_html/my­project
       Bazaar remembers this location so next time all 
        you need to do is:
           bzr push




                                   
Collaborating

       Get someone else's work
           bzr branch http://example.com/fooix/feature­x
       Merge it in with your work
           bzr merge ../feature­x
           (you don't actually need to get it first, you can just 
            merge in the remote branch)
       Commit – bzr doesn't auto commit
       Enjoy distributed goodness
                                      
Launchpad




         
Launchpad

       Bazaar hosting
           Code reviews
       Managing projects and teams
       Bug tracking
       Translations
       Personal Package Archives (PPAs)


                             
Sharing with Launchpad

       Register
       Add an SSH key
       Push up a branch related to a project:
           bzr push lp:~user­name/project­name/branch­name
       Push up a branch of unrelated stuff:
           bzr push lp:~user­name/+junk/branch­name



                                  
Projects in Launchpad

       Projects can specify a main branch
           bzr branch lp:project­name
       Projects can have multiple series
           bzr branch lp:bzr/1.10
           bzr branch lp:bzr/1.11




                                      
Bazaar Goodness




            
bzr shelve

       Works on uncommitted work by default
           Can refer to historical changes 
       Puts changes on a shelf
           (a directory out of the way)
       Can either put all changes '­a' flag, or 
        interactively choose changes
       unshelve brings the changes back

                                     
Plug­ins

       Extensibility through plug­ins
       Can add new commands or modify existing 
        ones
           bzr­svn – Interact with Subversion
           bzr­email – Send emails of changes
           bzrtools – Extra useful commands
       Can even add new formats
           bzr­loom – Work with a stack of lightweight 
            branches
                                    
Loggerhead




          
Familiarity

       Commands that relate clearly to other VCSs
           blame (annotate)
           commit
           log
           update
           status




                                
Sensible ignored files

       By default 
           *.a, *.o, *.py[co], *.so, *.sw[nop], *~, .#*, [#]*#
       More can be added easily
           bzr ignore *.dll
       Project specific ignores are stored in .bzrignore
       Just because something is ignored, doesn't 
        mean it can't be added

                                       
Aliases

    $ bzr alias
    bzr alias commit=”commit ­­strict”
    bzr alias ll=”log ­­line ­r ­10..­1
    bzr alias unalias=”alias ­­remove”




                                 
Well tested

       Development follows test driven development 
        practices – and has done from the start
       All new code needs test coverage
       Over 10,000 tests
       All tests are run on every attempted merge into 
        trunk



                               
Other misc bits

       Clear API
           Useful when writing plug­ins
       Tool integration through XML interface
       It just works
       Doesn't get in the way




                                    
Bazaar's Curse

       Too adaptive?
       Local repository or remote repository
       Bound or unbound branches
       Lightweight / heavyweight checkouts
       Repositories with or without working trees




                               

Mais conteúdo relacionado

Semelhante a Introduction to Bazaar

Using Wordpress 2009 04 29
Using Wordpress 2009 04 29Using Wordpress 2009 04 29
Using Wordpress 2009 04 29Matthew Baya
 
Peer Code Review: In a Nutshell and The Tantric Team: Getting Your Automated ...
Peer Code Review: In a Nutshell and The Tantric Team: Getting Your Automated ...Peer Code Review: In a Nutshell and The Tantric Team: Getting Your Automated ...
Peer Code Review: In a Nutshell and The Tantric Team: Getting Your Automated ...Atlassian
 
eZ Platform Cloud and eZ Launchpad: Don’t Host, Don’t Deploy, Don’t Install—J...
eZ Platform Cloud and eZ Launchpad: Don’t Host, Don’t Deploy, Don’t Install—J...eZ Platform Cloud and eZ Launchpad: Don’t Host, Don’t Deploy, Don’t Install—J...
eZ Platform Cloud and eZ Launchpad: Don’t Host, Don’t Deploy, Don’t Install—J...eZ Systems
 
eZ Platform Cloud and eZ Launchpad: Don’t Host, Don’t Deploy, Don’t Install—J...
eZ Platform Cloud and eZ Launchpad: Don’t Host, Don’t Deploy, Don’t Install—J...eZ Platform Cloud and eZ Launchpad: Don’t Host, Don’t Deploy, Don’t Install—J...
eZ Platform Cloud and eZ Launchpad: Don’t Host, Don’t Deploy, Don’t Install—J...Sébastien Morel
 
Blueprint talk at Open Hackday London 2009
Blueprint talk at Open Hackday London 2009Blueprint talk at Open Hackday London 2009
Blueprint talk at Open Hackday London 2009Ricardo Varela
 
Catalyst - refactor large apps with it and have fun!
Catalyst - refactor large apps with it and have fun!Catalyst - refactor large apps with it and have fun!
Catalyst - refactor large apps with it and have fun!mold
 
Getting started with open mobile development on the Openmoko platform
Getting started with open mobile development on the Openmoko platformGetting started with open mobile development on the Openmoko platform
Getting started with open mobile development on the Openmoko platformJean-Michel Bouffard
 
Search As A Service
Search As A ServiceSearch As A Service
Search As A ServiceMarkus Wolff
 
Merb Slices
Merb SlicesMerb Slices
Merb Sliceshassox
 
ruote stockholm 2008
ruote stockholm 2008ruote stockholm 2008
ruote stockholm 2008John Mettraux
 
Systems Automation with Puppet
Systems Automation with PuppetSystems Automation with Puppet
Systems Automation with Puppetelliando dias
 
Version Control for mere and freelance mortals
Version Control for mere and freelance mortalsVersion Control for mere and freelance mortals
Version Control for mere and freelance mortalsEmma Jane Hogbin Westby
 
Automatisation in development and testing - within budget
Automatisation in development and testing - within budgetAutomatisation in development and testing - within budget
Automatisation in development and testing - within budgetDavid Lukac
 
Becoming a Git Master - Nicola Paolucci
Becoming a Git Master - Nicola PaolucciBecoming a Git Master - Nicola Paolucci
Becoming a Git Master - Nicola PaolucciAtlassian
 
Practical project automation
Practical project automationPractical project automation
Practical project automationReinout van Rees
 

Semelhante a Introduction to Bazaar (20)

Using Wordpress 2009 04 29
Using Wordpress 2009 04 29Using Wordpress 2009 04 29
Using Wordpress 2009 04 29
 
Peer Code Review: In a Nutshell and The Tantric Team: Getting Your Automated ...
Peer Code Review: In a Nutshell and The Tantric Team: Getting Your Automated ...Peer Code Review: In a Nutshell and The Tantric Team: Getting Your Automated ...
Peer Code Review: In a Nutshell and The Tantric Team: Getting Your Automated ...
 
eZ Platform Cloud and eZ Launchpad: Don’t Host, Don’t Deploy, Don’t Install—J...
eZ Platform Cloud and eZ Launchpad: Don’t Host, Don’t Deploy, Don’t Install—J...eZ Platform Cloud and eZ Launchpad: Don’t Host, Don’t Deploy, Don’t Install—J...
eZ Platform Cloud and eZ Launchpad: Don’t Host, Don’t Deploy, Don’t Install—J...
 
eZ Platform Cloud and eZ Launchpad: Don’t Host, Don’t Deploy, Don’t Install—J...
eZ Platform Cloud and eZ Launchpad: Don’t Host, Don’t Deploy, Don’t Install—J...eZ Platform Cloud and eZ Launchpad: Don’t Host, Don’t Deploy, Don’t Install—J...
eZ Platform Cloud and eZ Launchpad: Don’t Host, Don’t Deploy, Don’t Install—J...
 
Blueprint talk at Open Hackday London 2009
Blueprint talk at Open Hackday London 2009Blueprint talk at Open Hackday London 2009
Blueprint talk at Open Hackday London 2009
 
Catalyst - refactor large apps with it and have fun!
Catalyst - refactor large apps with it and have fun!Catalyst - refactor large apps with it and have fun!
Catalyst - refactor large apps with it and have fun!
 
HTML Parsing With Hpricot
HTML Parsing With HpricotHTML Parsing With Hpricot
HTML Parsing With Hpricot
 
Getting started with open mobile development on the Openmoko platform
Getting started with open mobile development on the Openmoko platformGetting started with open mobile development on the Openmoko platform
Getting started with open mobile development on the Openmoko platform
 
Search As A Service
Search As A ServiceSearch As A Service
Search As A Service
 
Vidoop CouchDB Talk
Vidoop CouchDB TalkVidoop CouchDB Talk
Vidoop CouchDB Talk
 
Merb Slices
Merb SlicesMerb Slices
Merb Slices
 
Ruby on Rails
Ruby on RailsRuby on Rails
Ruby on Rails
 
ruote stockholm 2008
ruote stockholm 2008ruote stockholm 2008
ruote stockholm 2008
 
Systems Automation with Puppet
Systems Automation with PuppetSystems Automation with Puppet
Systems Automation with Puppet
 
Magee Dday2 Fixing App Performance Italiano
Magee Dday2 Fixing App Performance ItalianoMagee Dday2 Fixing App Performance Italiano
Magee Dday2 Fixing App Performance Italiano
 
Version Control for mere and freelance mortals
Version Control for mere and freelance mortalsVersion Control for mere and freelance mortals
Version Control for mere and freelance mortals
 
Automatisation in development and testing - within budget
Automatisation in development and testing - within budgetAutomatisation in development and testing - within budget
Automatisation in development and testing - within budget
 
Becoming a Git Master - Nicola Paolucci
Becoming a Git Master - Nicola PaolucciBecoming a Git Master - Nicola Paolucci
Becoming a Git Master - Nicola Paolucci
 
Practical project automation
Practical project automationPractical project automation
Practical project automation
 
Os Furlong
Os FurlongOs Furlong
Os Furlong
 

Último

Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessPixlogix Infotech
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024Results
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfEnterprise Knowledge
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...apidays
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Igalia
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfsudhanshuwaghmare1
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxKatpro Technologies
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024The Digital Insurer
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...Neo4j
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEarley Information Science
 

Último (20)

Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your Business
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
 

Introduction to Bazaar

  • 1. Introduction to Bazaar adaptive version control    
  • 2. Who am I?  Tim Penhey  http://how­bazaar.blogspot.com  https://launchpad.net/~thumper  Currently employed by Canonical  http://canonical.com  Work on Launchpad integrating Bazaar  https://launchpad.net/launchpad­bazaar    
  • 3. Version Control is Good ”Those who cannot learn from history are doomed to repeat it” ­­ George Santayana    
  • 4. Because this sucks $ cp myfile.txt myfile.txt.20090120 $ ls myfile* myfile.txt.bak myfile.txt myfile.txt.20090120 myfile.txt.20081218    
  • 5. Older Version Control Systems  SCCS  RCS  CVS  Subversion  SourceSafe (the less said about this the better)  Perforce    
  • 6. Distributed is Better  Sometimes you cannot reach the central server  e.g. A laptop on the move  Should still be able to record changes in a  meaningful manner  A local history is available    
  • 7. Which trunk is true?  If everyone has a local copy of the project,  who's copy is the ”true trunk”?  Projects that use distributed version control use  social convention    
  • 8. Bazaar Concepts  Branches  Revisions  Repositories  Working Trees  Formats    
  • 9. What is a branch?  A line of development  Common to use feature branches  this is where each feature is developed in its own  branch  Lives in a directory on the filesystem  all branches are addressable with a URI  web or filesystem addressable    
  • 10. What is a revision?  A revision is a collection of modifications  e.g. an applied patch  e.g. updated foo.c and foo.h  Has a committer  The person who called `bzr commit`  May have a different author  Allows work to be attributed to someone else  Has a unique identifier (revision id)    
  • 11. What is a branch?  A pointer to a tip revision  a revision has one parent for a simple commit  a revision has multiple parents for merges  A directed acyclic graph of revisions  and you though graph theory had no practical  applications    
  • 12. What is a repository?  a set of revisions    
  • 13. What is a working tree?  The actual source files that you look at and  interact with    
  • 14. What is a format?  Each 'object' in Bazaar has a disk format  Formats allow for a smooth upgrade path  Developers knew that they weren't perfect and  planned for future improvements  `bzr upgrade` used to move to newer shiney  formats    
  • 15. Simple Example $ cd my­project $ bzr init $ bzr add added hello.txt $ bzr commit Committed revision 1.    
  • 16. Sharing your work  The push command pushes your work to a  different location  bzr push ~/public_html/my­project  Bazaar remembers this location so next time all  you need to do is:  bzr push    
  • 17. Collaborating  Get someone else's work  bzr branch http://example.com/fooix/feature­x  Merge it in with your work  bzr merge ../feature­x  (you don't actually need to get it first, you can just  merge in the remote branch)  Commit – bzr doesn't auto commit  Enjoy distributed goodness    
  • 19. Launchpad  Bazaar hosting  Code reviews  Managing projects and teams  Bug tracking  Translations  Personal Package Archives (PPAs)    
  • 20. Sharing with Launchpad  Register  Add an SSH key  Push up a branch related to a project:  bzr push lp:~user­name/project­name/branch­name  Push up a branch of unrelated stuff:  bzr push lp:~user­name/+junk/branch­name    
  • 21. Projects in Launchpad  Projects can specify a main branch  bzr branch lp:project­name  Projects can have multiple series  bzr branch lp:bzr/1.10  bzr branch lp:bzr/1.11    
  • 23. bzr shelve  Works on uncommitted work by default  Can refer to historical changes   Puts changes on a shelf  (a directory out of the way)  Can either put all changes '­a' flag, or  interactively choose changes  unshelve brings the changes back    
  • 24. Plug­ins  Extensibility through plug­ins  Can add new commands or modify existing  ones  bzr­svn – Interact with Subversion  bzr­email – Send emails of changes  bzrtools – Extra useful commands  Can even add new formats  bzr­loom – Work with a stack of lightweight  branches    
  • 26. Familiarity  Commands that relate clearly to other VCSs  blame (annotate)  commit  log  update  status    
  • 27. Sensible ignored files  By default   *.a, *.o, *.py[co], *.so, *.sw[nop], *~, .#*, [#]*#  More can be added easily  bzr ignore *.dll  Project specific ignores are stored in .bzrignore  Just because something is ignored, doesn't  mean it can't be added    
  • 28. Aliases $ bzr alias bzr alias commit=”commit ­­strict” bzr alias ll=”log ­­line ­r ­10..­1 bzr alias unalias=”alias ­­remove”    
  • 29. Well tested  Development follows test driven development  practices – and has done from the start  All new code needs test coverage  Over 10,000 tests  All tests are run on every attempted merge into  trunk    
  • 30. Other misc bits  Clear API  Useful when writing plug­ins  Tool integration through XML interface  It just works  Doesn't get in the way    
  • 31. Bazaar's Curse  Too adaptive?  Local repository or remote repository  Bound or unbound branches  Lightweight / heavyweight checkouts  Repositories with or without working trees