Setup bazaar over SSH server

From Notes_Wiki
Revision as of 04:46, 13 November 2012 by Saurabh (talk | contribs) (Created page with "=Setup bazaar over SSH server= To setup bazaar over SSH use: #First ensure that all users who are going to use the repository are in same user group. #Enable SSH to machine b...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Setup bazaar over SSH server

To setup bazaar over SSH use:

  1. First ensure that all users who are going to use the repository are in same user group.
  2. Enable SSH to machine by all users of this group
  3. Create a folder for storing bzr repository. Ideally folder should be located in common location such as '/opt/bzr' and not in some users home folder. To create folder use command 'bzr init-repo <folder_name>'
  4. Create a branch for working using command 'bzr init <repository_folder>/<branch_name>'
  5. Change permisssion on repository folder using 'chgrp -R <group_name> <folder_name>'


Using setup repository as central repository

Users can use configure bazaar repository as central repository. In this case users can use 'update' and 'commit' option to take changes from the central repository or to submit changes at central repository. In this case all commits would require access to central repository server. Steps for doing this are:

  1. Checkout bazaar branch using:
    bzr checkout bzr+ssh://<ssh_username>@<machine_ip_or_name><branch_path>
  2. Make changes to central repository using:
    touch a
    bzr add a
    bzr commit -m "Added a for testing"
  3. Take updates from central repository using:
    bzr up

Note that a warning 'This transport does not update the working tree of: bzr+ssh://saurabh@vlead/home/saurabh/bzrtest/branch1/. See 'bzr help working-trees' for more information.' may appear. This just means that on central repository server 'bzr up' should be run to make bazaar repository on central server up-to-date, if someone is going to work directly on central repository.


Using setup repository in decentralized manner

Bazaar supports decentralized development using local commits, push and pull mechanism same as git. To use bazaar repository in decentralized manner use:

  1. Clone bazaar repository using:
    bzr clone bzr+ssh://<ssh_username>@<machine_ip_or_name><branch_path>
  2. Make local changes to repository using
    touch a
    bzr add a
    bzr commit -m "Added a for testing"
  3. Push changes to central repository using
    bzr push bzr+ssh://<ssh_username>@<machine_ip_or_name><branch_path>
  4. Pull updates from central repository using
    bzr pull bzr+ssh://<ssh_username>@<machine_ip_or_name><branch_path>