Add new comment
Using The Bazaar Version Control System (VCS) On Debian EtchUsing The Bazaar Version Control System (VCS) On Debian EtchVersion 1.0 Bazaar is a distributed version control system (VCS) available under the GPL; it's similar to Subversion (svn). Bazaar is sponsored by Canonical, Ltd., the company that develops the Ubuntu Linux distribution, and therefore the Ubuntu project is the most prominent user of Bazaar. This article explains how to set up and use Bazaar on a Debian Etch system, and how to configure an SFTP-/HTTP server to host your Bazaar repository. I do not issue any guarantee that this will work for you!
1 Preliminary NoteIn this tutorial I will use two Debian Etch systems:
I'll use the username falko on both systems. Most Bazaar usage examples are taken from this guide: http://doc.bazaar-vcs.org/latest/en/mini-tutorial/index.html, but in addition to that this guide explains exactly how to install SFTP and lighttpd on the server and Bazaar on the workstation to make the Bazaar experience a little bit smoother for not-so-experienced Linux users.
2 Installing SFTP And Lighttpd On The Serverserver: (All the steps in this chapter have to be done as the root user!) Let's install SFTP and lighttpd on the server: apt-get install ssh openssh-server lighttpd Next we create a user account - falko in this case - that uses the /usr/lib/sftp-server shell instead of /bin/bash or any other shell: useradd -m -s /usr/lib/sftp-server falko This creates the user falko with the home directory /home/falko. Assign a password to falko: passwd falko Then make /usr/lib/sftp-server a valid login shell by adding it to /etc/shells: echo '/usr/lib/sftp-server' >> /etc/shells Now I create the directory /home/falko/public_html which will be lighttpd's document root and will contain our Bazaar repository: mkdir /home/falko/public_html To tell lighttpd that the document root has changed to /home/falko/public_html, open /etc/lighttpd/lighttpd.conf and modify the server.document-root line: vi /etc/lighttpd/lighttpd.conf
Restart lighttpd afterwards: /etc/init.d/lighttpd restart
3 Installing Bazaar On The Workstationworkstation: Run the following command as root: apt-get install bzr python-paramiko If you don't already have a normal user account on the workstation, create one now: useradd -m -s /bin/bash falko passwd falko
4 Using Bazaarworkstation: Now log in as the normal user, or, if you are logged in as root, run su falko to become the normal user (in this case falko). Then go to your home directory: cd ~ The following examples are more or less taken from http://doc.bazaar-vcs.org/latest/en/mini-tutorial/index.html. First, tell Bazaar who you are: bzr whoami "Falko Timme <ft@example.com>" Check that Bazaar has correctly stored your identity: bzr whoami falko@server1:~$ bzr whoami Now let's create a test directory with some test files: mkdir myproject The myproject directory is the base folder for our software project that we want to manage with Bazaar. It's important that you run all bzr commands in that directory! If you are not sure in which directory you are, run pwd Bazaar must initialize itself in the project directory: bzr init This creates some hidden files that Bazaar needs to manage your project. You can see the hidden folder .bzr in the myproject directory when you run ls -la falko@server1:~/myproject$ ls -la Now run bzr add to make all files/directories in the myproject folder versioned. The output is as follows: falko@server1:~/myproject$ bzr add Next add the files/directories to your branch (with a small comment so that you know what this commit is about): bzr commit -m "Initial import" The output is as follows: falko@server1:~/myproject$ bzr commit -m "Initial import" Now let's modify the (yet empty) file test1.txt: vi test1.txt
Run bzr diff and Bazaar will show you the changes: falko@server1:~/myproject$ bzr diff To commit the changes (again with a comment), run bzr commit -m "Added first line of text" falko@server1:~/myproject$ bzr commit -m "Added first line of text" The command bzr log displays a history of the latest actions: falko@server1:~/myproject$ bzr log
Reply |





print: 
Recent comments
2 hours 25 min ago
4 hours 8 min ago
6 hours 33 min ago
6 hours 39 min ago
11 hours 13 min ago
13 hours 14 min ago
16 hours 38 min ago
18 hours 44 min ago
18 hours 55 min ago
21 hours 22 min ago