Interacting with Bazaar

The most straightforward way to interact with Bazaar is the command-line interface. In this book, we will cover both the command-line interface and Bazaar Explorer, which is the official graphical user interface, but keep in mind that the latter is still beta status.

Using the command-line interface

A good way to confirm that the installation was successful is checking the version. Open a terminal application, such as DOS prompt in Windows or terminal in other operating systems and run the following command:

$ bzr version

The output should look something similar to the following:

Bazaar (bzr) 2.5.0
 Python interpreter: /usr/bin/python 2.6.6
 Python standard library: /usr/lib/python2.6
 Platform: Linux-3.2.0-2-amd64-x86_64-with-debian-wheezy-sid
 bzrlib: /usr/lib/python2.7/dist-packages/bzrlib
 Bazaar configuration: /home/jack/.bazaar
 Bazaar log file: /home/jack/.bzr.log

Copyright 2005-2012 Canonical Ltd.
http://bazaar.canonical.com/

bzr comes with ABSOLUTELY NO WARRANTY. bzr is free software, and
you may use, modify and redistribute it under the terms of the GNU
General Public License version 2 or later.

Bazaar is part of the GNU Project to produce a free operating system.

In addition to the version number, the command prints other useful information, such as the location of the Python interpreter used, the Bazaar libraries (bzrlib), and the user's configuration directory.

Using the graphical user interface

The graphical user interface is called Bazaar Explorer. It is included in the explorer plugin. In all the systems, you can start Bazaar Explorer using the following command:

$ bzr explorer

In Windows, another way to launch Bazaar Explorer is from Program Files | Bazaar | Bazaar Explorer.

Bazaar Explorer will open with the Welcome view as follows:

Using the graphical user interface

The top part is a toolbar with buttons to perform the most common version control operations. The main part of the screen shows some typical operations you might want to perform, such as open existing projects, start a new project, or customize Bazaar. All of these options will be explained in the next chapter; for now, we just wanted to confirm that it works.

Bazaar Explorer is similar to a regular file explorer, except that it is specialized for viewing Bazaar project directories. When you open an existing Bazaar project, the Working Tree panel on the right looks just like a regular file explorer, showing the list of files and subdirectories in the project:

Using the graphical user interface

In addition, the Status column in the Working Tree panel and the left panel indicates files that have not been added to version control yet (nonversioned), or files that have been modified since the last recorded revision.

Note

The "working tree" is the main method to interact with Bazaar and perform the various version control operations on a project. This concept will be explained in detail in the next chapter.

One of the nice features of Bazaar Explorer is the graphical visualization of differences in text files, for example:

Using the graphical user interface

Another very practical use case is browsing the change history, with the various branches of the project presented in a nicely formatted way:

Using the graphical user interface

Using the two user interfaces together

You can perform the most common operations with whichever interface, but each will have some advantages and disadvantages depending upon the situation. In general, the command-line interface can be faster and more efficient when you are already familiar with Bazaar's commands. On the other hand, typically for viewing operations such as browsing or searching in the history, or comparing revisions, Bazaar Explorer is often more practical. In this way, the two user interfaces complement each other.

Throughout this book, we will focus more on the command-line interface, mainly for the sake of clarity. Command-line expressions tend to be more accurate and unambiguous in general. For this reason, understanding the command-line interface is essential, while the graphical user interface is optional.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
13.59.141.75