bzr - the bazaar source revision control system
DESCRIPTION
Slides of my talk about Bazaar at phpDay in Verona, Italy: http://www.phpday.it/site/phpday-2009/calendario-conferenze/canale-developers/bzr-the-bazaar-source-revision-control-system/TRANSCRIPT
![Page 1: bzr - The Bazaar source revision control system](https://reader034.vdocuments.us/reader034/viewer/2022042623/540561c68d7f729b768b4ca8/html5/thumbnails/1.jpg)
bzr - The Bazaar source revision bzr - The Bazaar source revision control systemcontrol system
Lenz GrimmerLenz Grimmer
![Page 2: bzr - The Bazaar source revision control system](https://reader034.vdocuments.us/reader034/viewer/2022042623/540561c68d7f729b768b4ca8/html5/thumbnails/2.jpg)
Agenda
● Introduction to DVCS● Features of Bazaar● Terminology● Workflows, Commands, Examples● Related Tools / Links
![Page 3: bzr - The Bazaar source revision control system](https://reader034.vdocuments.us/reader034/viewer/2022042623/540561c68d7f729b768b4ca8/html5/thumbnails/3.jpg)
DVCS: Concepts
● No central instance● Every branch a full copy (incl. History)● Disconnected operation● Easy to create new branches● Merging of revisions from other repos● Multi-Protocol support (http, SSH, SMTP,
local filesystem)
![Page 4: bzr - The Bazaar source revision control system](https://reader034.vdocuments.us/reader034/viewer/2022042623/540561c68d7f729b768b4ca8/html5/thumbnails/4.jpg)
DVCS: Benefits
● Empowering developers: local commits
● Encourage experimenting● Easy collaboration: sharing and
merging● Patches don't bit-rot
![Page 5: bzr - The Bazaar source revision control system](https://reader034.vdocuments.us/reader034/viewer/2022042623/540561c68d7f729b768b4ca8/html5/thumbnails/5.jpg)
DVCS: Benefits (2)
● Parallel development of new features
● Maintaining/tracking local modifications
● Faster: local operations vs. Network● Every branch is a full backup
![Page 6: bzr - The Bazaar source revision control system](https://reader034.vdocuments.us/reader034/viewer/2022042623/540561c68d7f729b768b4ca8/html5/thumbnails/6.jpg)
Bazaar: Features
● http://bazaar-vcs.org/● Multi-platform (Python)● Ease of use:
5 commands to get started● Command Aliases
(builtin & user-defined)● Well-documented● Commandline help
![Page 7: bzr - The Bazaar source revision control system](https://reader034.vdocuments.us/reader034/viewer/2022042623/540561c68d7f729b768b4ca8/html5/thumbnails/7.jpg)
Bazaar: Features (2)
● Centralized and decentralized workflows● Shared repositories to save space● No clutter: one single .bzr directory● Various transport protocols (ssh, http, sftp,
ftp, smtp)● Extensive test suite included
![Page 8: bzr - The Bazaar source revision control system](https://reader034.vdocuments.us/reader034/viewer/2022042623/540561c68d7f729b768b4ca8/html5/thumbnails/8.jpg)
Bazaar: Features (3)
● Smart merging● Renamed files and directories retain
history● Supports other VCSs (svn, hg, git)● Hooks and Scripts● Plugins (e.g. GUI extensions)● Unicode file names● Many 3rd-Party tools
![Page 9: bzr - The Bazaar source revision control system](https://reader034.vdocuments.us/reader034/viewer/2022042623/540561c68d7f729b768b4ca8/html5/thumbnails/9.jpg)
Launchpad
● http://launchpad.net/● Project / code hosting● Mailing lists / Answers (FAQs)● Bug tracking / Blueprints● Translations● Tight integration with Bazaar
![Page 10: bzr - The Bazaar source revision control system](https://reader034.vdocuments.us/reader034/viewer/2022042623/540561c68d7f729b768b4ca8/html5/thumbnails/10.jpg)
Bazaar: Terminology
● Revision● Snapshot of a tree of files/directories● Includes Metadata (date, author, comment,
parent revisions)● Can be exported
● Working Tree● Version-controlled directory● Contains editable files and directories
![Page 11: bzr - The Bazaar source revision control system](https://reader034.vdocuments.us/reader034/viewer/2022042623/540561c68d7f729b768b4ca8/html5/thumbnails/11.jpg)
Bazaar: Terminology (cont.)
● Branch● An ordered series of revisions● Can be split (cloned) and merged back together● Checkouts
● Repository● A store of revisions● Default: one repository/branch● Shared repositories to save space and improve
performance
![Page 12: bzr - The Bazaar source revision control system](https://reader034.vdocuments.us/reader034/viewer/2022042623/540561c68d7f729b768b4ca8/html5/thumbnails/12.jpg)
General Syntax
bzr [global opts] command [opts] [args]
![Page 13: bzr - The Bazaar source revision control system](https://reader034.vdocuments.us/reader034/viewer/2022042623/540561c68d7f729b768b4ca8/html5/thumbnails/13.jpg)
Getting Help
bzr help <command>bzr help commandsbzr help topics
![Page 14: bzr - The Bazaar source revision control system](https://reader034.vdocuments.us/reader034/viewer/2022042623/540561c68d7f729b768b4ca8/html5/thumbnails/14.jpg)
Solo Workflow
● Create project● Commit changes● Review/browse
history● Package release● Apply new changes● Rinse & Repeat
![Page 15: bzr - The Bazaar source revision control system](https://reader034.vdocuments.us/reader034/viewer/2022042623/540561c68d7f729b768b4ca8/html5/thumbnails/15.jpg)
Initializing a Repository
bzr init <directory>
![Page 16: bzr - The Bazaar source revision control system](https://reader034.vdocuments.us/reader034/viewer/2022042623/540561c68d7f729b768b4ca8/html5/thumbnails/16.jpg)
Adding/Modifying Files
bzr add <files>bzr diff <files>
![Page 17: bzr - The Bazaar source revision control system](https://reader034.vdocuments.us/reader034/viewer/2022042623/540561c68d7f729b768b4ca8/html5/thumbnails/17.jpg)
Commiting Changes
bzr commit <files>bzr gcommitbzr qcommit
![Page 18: bzr - The Bazaar source revision control system](https://reader034.vdocuments.us/reader034/viewer/2022042623/540561c68d7f729b768b4ca8/html5/thumbnails/18.jpg)
Looking at revision history
bzr logbzr diff
bzr visualize
![Page 19: bzr - The Bazaar source revision control system](https://reader034.vdocuments.us/reader034/viewer/2022042623/540561c68d7f729b768b4ca8/html5/thumbnails/19.jpg)
bzr visualize
![Page 20: bzr - The Bazaar source revision control system](https://reader034.vdocuments.us/reader034/viewer/2022042623/540561c68d7f729b768b4ca8/html5/thumbnails/20.jpg)
Screenshot: bzr gannotate
![Page 21: bzr - The Bazaar source revision control system](https://reader034.vdocuments.us/reader034/viewer/2022042623/540561c68d7f729b768b4ca8/html5/thumbnails/21.jpg)
Pair programming
Create repository
Branch
HackHackCommitPull and merge
Commit
Developer A Developer BPush, pull, merge
![Page 22: bzr - The Bazaar source revision control system](https://reader034.vdocuments.us/reader034/viewer/2022042623/540561c68d7f729b768b4ca8/html5/thumbnails/22.jpg)
Branching
bzr branch FROM TO
![Page 23: bzr - The Bazaar source revision control system](https://reader034.vdocuments.us/reader034/viewer/2022042623/540561c68d7f729b768b4ca8/html5/thumbnails/23.jpg)
Publishing changes
bzr pushbzr send
![Page 24: bzr - The Bazaar source revision control system](https://reader034.vdocuments.us/reader034/viewer/2022042623/540561c68d7f729b768b4ca8/html5/thumbnails/24.jpg)
Retrieving updates
bzr pullbzr merge
bzr missing
![Page 25: bzr - The Bazaar source revision control system](https://reader034.vdocuments.us/reader034/viewer/2022042623/540561c68d7f729b768b4ca8/html5/thumbnails/25.jpg)
Centralized Workflow
CheckoutUpdate/Merge
CheckoutCentral repository
Commit
Developer A
Developer B
Commit
![Page 26: bzr - The Bazaar source revision control system](https://reader034.vdocuments.us/reader034/viewer/2022042623/540561c68d7f729b768b4ca8/html5/thumbnails/26.jpg)
Code deployment
Upstreamproject
Live site
Branch Hack
Commit
MergePush
Upstream project Local deployment
![Page 27: bzr - The Bazaar source revision control system](https://reader034.vdocuments.us/reader034/viewer/2022042623/540561c68d7f729b768b4ca8/html5/thumbnails/27.jpg)
Central Branch & Gatekeer
Central repository Gatekeeper
Developer A Developer B
Branch, Merge,Pull
Edit, Commit,Push
Merge, ReviewPush
Edit, Commit,Push
![Page 28: bzr - The Bazaar source revision control system](https://reader034.vdocuments.us/reader034/viewer/2022042623/540561c68d7f729b768b4ca8/html5/thumbnails/28.jpg)
Related tools / Links
● Project Home Page: http://bazaar-vcs.org/● LaunchPad: https://launchpad.net● #bzr on irc.freenode.net● Planet Bazaar: http://planet.bazaar-vcs.org/● BundleBuggy:
http://code.aaronbentley.com/bundlebuggy/● PQM (Patch Queue Management):
https://launchpad.net/pqm
![Page 29: bzr - The Bazaar source revision control system](https://reader034.vdocuments.us/reader034/viewer/2022042623/540561c68d7f729b768b4ca8/html5/thumbnails/29.jpg)
Q & A
Questions, Comments?
![Page 31: bzr - The Bazaar source revision control system](https://reader034.vdocuments.us/reader034/viewer/2022042623/540561c68d7f729b768b4ca8/html5/thumbnails/31.jpg)
bzr vs. git (biased)
● http://bazaar-vcs.org/BzrVsGit● Native Windows support and installer● Direct support for more workflows● Directories are branches, shared repositories● Simpler revision objects● No automatic merge & commit● User-friendly UI, familiar commands● Better asynchronous sharing using merge
directives