Download - De-centralised Version Control with Bazaar
![Page 1: De-centralised Version Control with Bazaar](https://reader037.vdocuments.us/reader037/viewer/2022103114/55549b19b4c905fd608b468a/html5/thumbnails/1.jpg)
Bazaar Version ControlStuart Colville and Andrew Phillipo
![Page 2: De-centralised Version Control with Bazaar](https://reader037.vdocuments.us/reader037/viewer/2022103114/55549b19b4c905fd608b468a/html5/thumbnails/2.jpg)
Version Control Software
A way to keep a multiple revisions of a single resource without creating copies
Undo either short or long term
Audit-trail of who did what and when
Access to details of why a change was made
Tools to help teams of developers work on a single code baseX
![Page 3: De-centralised Version Control with Bazaar](https://reader037.vdocuments.us/reader037/viewer/2022103114/55549b19b4c905fd608b468a/html5/thumbnails/3.jpg)
History of Version Control Systems
“Those who cannot remember the past are condemned to repeat it.” - George Santanya
![Page 4: De-centralised Version Control with Bazaar](https://reader037.vdocuments.us/reader037/viewer/2022103114/55549b19b4c905fd608b468a/html5/thumbnails/4.jpg)
SCCS - Source Code Control System
The first Version Control System, built during the 70s
Was dominant until RCS was released
SCCS had no concept of branching
Internal file format is still used today by Bitkeeper and TeamWare
Tools still available to access the SCCS format
![Page 5: De-centralised Version Control with Bazaar](https://reader037.vdocuments.us/reader037/viewer/2022103114/55549b19b4c905fd608b468a/html5/thumbnails/5.jpg)
RCS - Revision Control System
Built During the 80s as “a better SCCS”
Only knows about revisions of single files
Supports branching, badly
“RCS automates the storing, retrieval, logging, identification, and merging of revisions.” - GNU RCS homepage
![Page 6: De-centralised Version Control with Bazaar](https://reader037.vdocuments.us/reader037/viewer/2022103114/55549b19b4c905fd608b468a/html5/thumbnails/6.jpg)
CVS - Concurrent Versioning System
Originally based upon RCS (for managing sets of files/projects) in the late 80s, by Dick Grune and later rewritten by Brian Berliner
Only files are versioned, no symlinks or directories
No direct moving/renaming capability
Branching and merging can be a world of pain
Allows control over who can commit
Stable, well supported infrastructure and tools
![Page 7: De-centralised Version Control with Bazaar](https://reader037.vdocuments.us/reader037/viewer/2022103114/55549b19b4c905fd608b468a/html5/thumbnails/7.jpg)
HTTP://FLICKR.COM/PHOTOS/EECUE/91518838/
![Page 8: De-centralised Version Control with Bazaar](https://reader037.vdocuments.us/reader037/viewer/2022103114/55549b19b4c905fd608b468a/html5/thumbnails/8.jpg)
SVN - SubversionProject start by collab.net in 2000
Built to improve on CVS
Atomic commits
Allows renaming/moving of assets
Language bindings for all common programming languages
![Page 9: De-centralised Version Control with Bazaar](https://reader037.vdocuments.us/reader037/viewer/2022103114/55549b19b4c905fd608b468a/html5/thumbnails/9.jpg)
What do you look for in a revision control system?
Stability
Easy to use
Doesn’t get in the way of me developing my stuff
Flexibility
Extensible
![Page 10: De-centralised Version Control with Bazaar](https://reader037.vdocuments.us/reader037/viewer/2022103114/55549b19b4c905fd608b468a/html5/thumbnails/10.jpg)
Introduction to BazaarEasy to branch and smarter merging
First-class renaming capabilities
No server software needed - “Batteries included”
Designed with usability, ease of use in mind
Cross platform: Linux, BSD, OSX, Windows
Flexible and extensible, with a full plug-in system
![Page 11: De-centralised Version Control with Bazaar](https://reader037.vdocuments.us/reader037/viewer/2022103114/55549b19b4c905fd608b468a/html5/thumbnails/11.jpg)
BAZAAR DOESN’T GET IN THE WAY
![Page 12: De-centralised Version Control with Bazaar](https://reader037.vdocuments.us/reader037/viewer/2022103114/55549b19b4c905fd608b468a/html5/thumbnails/12.jpg)
Bazaar Workflows
![Page 13: De-centralised Version Control with Bazaar](https://reader037.vdocuments.us/reader037/viewer/2022103114/55549b19b4c905fd608b468a/html5/thumbnails/13.jpg)
Workflows: Solo
As simple as pick a directory and tell bazaar to start versioning it
No server/database setup
Sharing with other developers is easy, should it be needed
Let’s look at an example...
![Page 14: De-centralised Version Control with Bazaar](https://reader037.vdocuments.us/reader037/viewer/2022103114/55549b19b4c905fd608b468a/html5/thumbnails/14.jpg)
Set-up a versioned dir$ cd ~/bazaar/demo
$ bzr init
~/bazaar/demo is now set-up to be versioned
![Page 15: De-centralised Version Control with Bazaar](https://reader037.vdocuments.us/reader037/viewer/2022103114/55549b19b4c905fd608b468a/html5/thumbnails/15.jpg)
Let’s add a file$ vim test.css
$ bzr add
![Page 16: De-centralised Version Control with Bazaar](https://reader037.vdocuments.us/reader037/viewer/2022103114/55549b19b4c905fd608b468a/html5/thumbnails/16.jpg)
Let’s add a file$ vim test.css
$ bzr add
added test.css
![Page 17: De-centralised Version Control with Bazaar](https://reader037.vdocuments.us/reader037/viewer/2022103114/55549b19b4c905fd608b468a/html5/thumbnails/17.jpg)
First commit$ bzr commit -m “my first commit”
![Page 18: De-centralised Version Control with Bazaar](https://reader037.vdocuments.us/reader037/viewer/2022103114/55549b19b4c905fd608b468a/html5/thumbnails/18.jpg)
First commit$ bzr commit -m “my first commit”
added test.css
Committed revision 1.
![Page 19: De-centralised Version Control with Bazaar](https://reader037.vdocuments.us/reader037/viewer/2022103114/55549b19b4c905fd608b468a/html5/thumbnails/19.jpg)
Workflows: Partner
![Page 20: De-centralised Version Control with Bazaar](https://reader037.vdocuments.us/reader037/viewer/2022103114/55549b19b4c905fd608b468a/html5/thumbnails/20.jpg)
Workflows: Centralised
![Page 21: De-centralised Version Control with Bazaar](https://reader037.vdocuments.us/reader037/viewer/2022103114/55549b19b4c905fd608b468a/html5/thumbnails/21.jpg)
Workflows: Local Commit
![Page 22: De-centralised Version Control with Bazaar](https://reader037.vdocuments.us/reader037/viewer/2022103114/55549b19b4c905fd608b468a/html5/thumbnails/22.jpg)
Workflows: Shared
![Page 23: De-centralised Version Control with Bazaar](https://reader037.vdocuments.us/reader037/viewer/2022103114/55549b19b4c905fd608b468a/html5/thumbnails/23.jpg)
Workflows: Gatekeeper
![Page 24: De-centralised Version Control with Bazaar](https://reader037.vdocuments.us/reader037/viewer/2022103114/55549b19b4c905fd608b468a/html5/thumbnails/24.jpg)
Workflows: PQM
![Page 25: De-centralised Version Control with Bazaar](https://reader037.vdocuments.us/reader037/viewer/2022103114/55549b19b4c905fd608b468a/html5/thumbnails/25.jpg)
Why use Distributed VCS in tandem with Centralised Version Control?
Company policy requires the use of a centralised system
Development with centralised VCS is harder
A modern VCS brings more advanced merging
Reduction in developer suicide rate
![Page 26: De-centralised Version Control with Bazaar](https://reader037.vdocuments.us/reader037/viewer/2022103114/55549b19b4c905fd608b468a/html5/thumbnails/26.jpg)
Using Distributed VCS in tandem with Centralised Version Control
Keeping history:
Tailor is a tool that can convert between many different rcs http://progetti.arstecnica.it/tailor
CVSPSImport converts directly from CVS http://bazaar-vcs.org/CVSPSImport
Ignore history and take current set of files
Faster but obviously you lose access to older history
![Page 27: De-centralised Version Control with Bazaar](https://reader037.vdocuments.us/reader037/viewer/2022103114/55549b19b4c905fd608b468a/html5/thumbnails/27.jpg)
![Page 28: De-centralised Version Control with Bazaar](https://reader037.vdocuments.us/reader037/viewer/2022103114/55549b19b4c905fd608b468a/html5/thumbnails/28.jpg)
Launchpad.net
Similar to sourceforge with 100% less CVS
Tightly integrated with Bazaar - though import from other VCS is possible
Removes the barriers to contributing open-source development
Bug tracking, FAQ, Documentation and translation management
![Page 29: De-centralised Version Control with Bazaar](https://reader037.vdocuments.us/reader037/viewer/2022103114/55549b19b4c905fd608b468a/html5/thumbnails/29.jpg)
Launchpad Example
Bazaar-email is a simple plug-in that uses the post-commit hooks in bazaar to mail diffs
To contribute back to the project I raised bugs for trivial issues found using the plug-in
A developer fixed one of these issues and submitted a branch linked to the bug
To add this to trunk the maintainer can simply carry out a merge
![Page 30: De-centralised Version Control with Bazaar](https://reader037.vdocuments.us/reader037/viewer/2022103114/55549b19b4c905fd608b468a/html5/thumbnails/30.jpg)
Launchpad Bug fix process
Branch the trunk/main branch
Make + test the fix
Push the fix back to launchpad and associate it with the bug number
bzr push sftp://[email protected]/~user/project/branch
The maintainer can then merge the fix into the trunk
![Page 31: De-centralised Version Control with Bazaar](https://reader037.vdocuments.us/reader037/viewer/2022103114/55549b19b4c905fd608b468a/html5/thumbnails/31.jpg)
Adding a feature to a project
Branch the trunk/main branch
Merged pending bugfixes
Develop the feature
Push to launchpad
bzr push sftp://[email protected]/~user/project/branch
Raise merge request
![Page 32: De-centralised Version Control with Bazaar](https://reader037.vdocuments.us/reader037/viewer/2022103114/55549b19b4c905fd608b468a/html5/thumbnails/32.jpg)
![Page 33: De-centralised Version Control with Bazaar](https://reader037.vdocuments.us/reader037/viewer/2022103114/55549b19b4c905fd608b468a/html5/thumbnails/33.jpg)
Let’s hack on something
![Page 34: De-centralised Version Control with Bazaar](https://reader037.vdocuments.us/reader037/viewer/2022103114/55549b19b4c905fd608b468a/html5/thumbnails/34.jpg)
Conclusion
Version control has come a long way
De-centralisation is the future!
First-class merging makes this all possible
Development should never be constrained by the version control system you use
![Page 35: De-centralised Version Control with Bazaar](https://reader037.vdocuments.us/reader037/viewer/2022103114/55549b19b4c905fd608b468a/html5/thumbnails/35.jpg)
Questions?
That’s all folks!http://bazaar-vcs.org/