SlideShare una empresa de Scribd logo
1 de 20
Descargar para leer sin conexión
Bazaar Version Control
      http://bazaar-vcs.org
Why Bazaar?
• Lightweight and simple
• Python based thus x-platform
• Plugin architecture
• No dependancy on a centralised repo
• Copies of revisions locally and remotely
• Allows commits locally when offline
Set-up a versioned dir
    $ cd ~/bazaar
    $ bzr init demo


~/bazaar/demo is now set-up to be versioned
Let’s add a file
$ cd ~/bazaar/demo
$ vim test.css
$ bzr add
Let’s add a file
$ cd ~/bazaar/demo
$ vim test.css
$ bzr add
added test.css
First commit
$ bzr commit -m “my first commit”
First commit
$ bzr commit -m “my first commit”
added test.css
Committed revision 1.
Publish
Simply copy the directory to a webserver
Other people can take a branch by running:
$ bzr branch http://server.co.uk/branch/dir/
For read write share via SFTP.
Useful commands
bzr checkout - checks out branches.
bzr update - update the local files to match those in the repo.
bzr revert - reverts files back to a specific rev
bzr status - current status of modified, added and removed files
bzr log - the log of commits
bzr ignore - allows patterns of files to ignore .DS_Store!!
bzr uncommit - reverse a commit
bzr diff - provides a diff of revisions
Shared Repository
$ cd ~/bazaar/
$ bzr init-repo --no-trees sftp://server/path/to/
bzr/
$ bzr init sftp://server/path/to/bzr/bigmuffin
$ bzr checkout sftp://server/path/to/bzr/bigmuffin
remote
note: --no-trees prevents trees being created on
the remote repo.
Adding and committing
$ cp -R ~/projects/bigmuffin/* ~/bazaar/bigmuffin/
$ bzr add
$ bzr status
$ bzr commit -m “bigmuffin project files added”
Conflicts
A conflict is created when the merging algorithm cannot
make sense of the changes.
Should a conflict occur you will end up with several files
being created.
If the file with a conflict is style.css you will end up with:
styles.css
styles.css.BASE - The common base
styles.css.OTHER - The branch
styles.css.THIS - Your changes.
Resolving Conflicts
Compare styles.css.OTHER and
styles.css.THIS and manually rectify the
differences.
The merged file needs to be called styles.css
Make sure you delete styles.css.THIS
Then run:
$ bzr resolve file
Resolving Conflicts
Bazaar will automatically delete the other files
Macs have a really nice diff app for this which is included
with xcode.
It’s called FileMerge.
Branching & Merging
$ cd ~/bazaar/
$ bzr branch sftp://server/path/to/bzr/bigmuffin sftp://
server/path/to/bzr/myamazingfeature
$ bzr checkout sftp://server/path/to/bzr/
myamazingfeature amazingfeature
$ cd amazingfeature
$ cd ~/bazaar/bigmuffin
$ bzr merge ../amazingfeature
Plugins
Bazaar Email - a nice plugin that simply sends diffs of
commits to an email address of your choice.
Publish-bot - sends commit messages to irc
Commit selector - allows you to choose what files
you commit.
Points of interest
Mozilla took a look at bazaar for version control and
compared it with mecurial (http://www.selenic.com/
mercurial/wiki/) another Python based decentralised
VCS.
Their issue with bazaar was mainly around speed
but...
All of the points of speed have been a focus of the
Bazaar team since then and as a result subsequent
versions have increased dramtically in performance.
Points of interest
Bazaar is a canonical project the people behind
Ubuntu.
Launchpad.net is Canonical’s sourceforge. As a result
it’s file hosting is built around bazaar. Though a little
rough around the edges it shows promise.
Easter Egg
$ bzr rocks
Easter Egg
$ bzr rocks
It sure does!

Más contenido relacionado

Similar a Bazaar VCS Lightning Talk

Embracing Distributed Version Control
Embracing Distributed Version ControlEmbracing Distributed Version Control
Embracing Distributed Version Control
Nowell Strite
 

Similar a Bazaar VCS Lightning Talk (20)

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
 
Bazaar for Mere Mortals
Bazaar for Mere MortalsBazaar for Mere Mortals
Bazaar for Mere Mortals
 
Docker Compose Explained
Docker Compose ExplainedDocker Compose Explained
Docker Compose Explained
 
De-centralised Version Control with Bazaar
De-centralised Version Control with BazaarDe-centralised Version Control with Bazaar
De-centralised Version Control with Bazaar
 
Rails Engine | Modular application
Rails Engine | Modular applicationRails Engine | Modular application
Rails Engine | Modular application
 
How to Use the Command Line to Increase Speed of Development
How to Use the Command Line to Increase Speed of DevelopmentHow to Use the Command Line to Increase Speed of Development
How to Use the Command Line to Increase Speed of Development
 
Merb Slices
Merb SlicesMerb Slices
Merb Slices
 
WordPress Development Environments
WordPress Development Environments WordPress Development Environments
WordPress Development Environments
 
Version Control for Mere Mortals
Version Control for Mere MortalsVersion Control for Mere Mortals
Version Control for Mere Mortals
 
Geoserver GIS Mapping Solution
Geoserver GIS Mapping SolutionGeoserver GIS Mapping Solution
Geoserver GIS Mapping Solution
 
1- Learn Flexbox & CSS Grid / Environment setup
1- Learn Flexbox & CSS Grid / Environment setup1- Learn Flexbox & CSS Grid / Environment setup
1- Learn Flexbox & CSS Grid / Environment setup
 
How to Contribute Code to MySQL?
How to Contribute Code to MySQL?How to Contribute Code to MySQL?
How to Contribute Code to MySQL?
 
Git presentation
Git presentationGit presentation
Git presentation
 
UI Realigning & Refactoring by Jina Bolton
UI Realigning & Refactoring by Jina BoltonUI Realigning & Refactoring by Jina Bolton
UI Realigning & Refactoring by Jina Bolton
 
Scaling Development Environments with Docker
Scaling Development Environments with DockerScaling Development Environments with Docker
Scaling Development Environments with Docker
 
Getting Into Drupal 8 Configuration
Getting Into Drupal 8 ConfigurationGetting Into Drupal 8 Configuration
Getting Into Drupal 8 Configuration
 
Github - Git Training Slides: Foundations
Github - Git Training Slides: FoundationsGithub - Git Training Slides: Foundations
Github - Git Training Slides: Foundations
 
Docker, the Future of DevOps
Docker, the Future of DevOpsDocker, the Future of DevOps
Docker, the Future of DevOps
 
Embracing Distributed Version Control
Embracing Distributed Version ControlEmbracing Distributed Version Control
Embracing Distributed Version Control
 
Sbt, idea and eclipse
Sbt, idea and eclipseSbt, idea and eclipse
Sbt, idea and eclipse
 

Último

+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
?#DUbAI#??##{{(☎️+971_581248768%)**%*]'#abortion pills for sale in dubai@
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
panagenda
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Victor Rentea
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Victor Rentea
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
WSO2
 

Último (20)

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
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
Ransomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdfRansomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdf
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptx
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
 
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
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
 
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
 
CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In PakistanCNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistan
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024
 

Bazaar VCS Lightning Talk

  • 1. Bazaar Version Control http://bazaar-vcs.org
  • 2. Why Bazaar? • Lightweight and simple • Python based thus x-platform • Plugin architecture • No dependancy on a centralised repo • Copies of revisions locally and remotely • Allows commits locally when offline
  • 3. Set-up a versioned dir $ cd ~/bazaar $ bzr init demo ~/bazaar/demo is now set-up to be versioned
  • 4. Let’s add a file $ cd ~/bazaar/demo $ vim test.css $ bzr add
  • 5. Let’s add a file $ cd ~/bazaar/demo $ vim test.css $ bzr add added test.css
  • 6. First commit $ bzr commit -m “my first commit”
  • 7. First commit $ bzr commit -m “my first commit” added test.css Committed revision 1.
  • 8. Publish Simply copy the directory to a webserver Other people can take a branch by running: $ bzr branch http://server.co.uk/branch/dir/ For read write share via SFTP.
  • 9. Useful commands bzr checkout - checks out branches. bzr update - update the local files to match those in the repo. bzr revert - reverts files back to a specific rev bzr status - current status of modified, added and removed files bzr log - the log of commits bzr ignore - allows patterns of files to ignore .DS_Store!! bzr uncommit - reverse a commit bzr diff - provides a diff of revisions
  • 10. Shared Repository $ cd ~/bazaar/ $ bzr init-repo --no-trees sftp://server/path/to/ bzr/ $ bzr init sftp://server/path/to/bzr/bigmuffin $ bzr checkout sftp://server/path/to/bzr/bigmuffin remote note: --no-trees prevents trees being created on the remote repo.
  • 11. Adding and committing $ cp -R ~/projects/bigmuffin/* ~/bazaar/bigmuffin/ $ bzr add $ bzr status $ bzr commit -m “bigmuffin project files added”
  • 12. Conflicts A conflict is created when the merging algorithm cannot make sense of the changes. Should a conflict occur you will end up with several files being created. If the file with a conflict is style.css you will end up with: styles.css styles.css.BASE - The common base styles.css.OTHER - The branch styles.css.THIS - Your changes.
  • 13. Resolving Conflicts Compare styles.css.OTHER and styles.css.THIS and manually rectify the differences. The merged file needs to be called styles.css Make sure you delete styles.css.THIS Then run: $ bzr resolve file
  • 14. Resolving Conflicts Bazaar will automatically delete the other files Macs have a really nice diff app for this which is included with xcode. It’s called FileMerge.
  • 15. Branching & Merging $ cd ~/bazaar/ $ bzr branch sftp://server/path/to/bzr/bigmuffin sftp:// server/path/to/bzr/myamazingfeature $ bzr checkout sftp://server/path/to/bzr/ myamazingfeature amazingfeature $ cd amazingfeature $ cd ~/bazaar/bigmuffin $ bzr merge ../amazingfeature
  • 16. Plugins Bazaar Email - a nice plugin that simply sends diffs of commits to an email address of your choice. Publish-bot - sends commit messages to irc Commit selector - allows you to choose what files you commit.
  • 17. Points of interest Mozilla took a look at bazaar for version control and compared it with mecurial (http://www.selenic.com/ mercurial/wiki/) another Python based decentralised VCS. Their issue with bazaar was mainly around speed but... All of the points of speed have been a focus of the Bazaar team since then and as a result subsequent versions have increased dramtically in performance.
  • 18. Points of interest Bazaar is a canonical project the people behind Ubuntu. Launchpad.net is Canonical’s sourceforge. As a result it’s file hosting is built around bazaar. Though a little rough around the edges it shows promise.
  • 20. Easter Egg $ bzr rocks It sure does!