BazaarX Design Document

Welcome to the BazaarX Design Document. The purpose of this document is to detail the design of BazaarX, both from a user facing point of view and from an internal architecture point of view.

Architecture

BazaarX is essentially built up of 3 classes of controllers:

The Window Controller handles all the views that appear in a window. The View Controllers handle the main content of each window, such as Repositories, Branches, Working Tree, Log, Diff, Annotate, Shelf. The Sheet Controllers handle all the actions that can be performed on a view.

Each of these controllers should be as self contained as possible, asking the window controller for the current branch/repository/working tree and sending out a notification for any events (most likely completion). This makes development easier as everything in the app is loosely coupled.

Accessing Bzr & Data Caching

Access to bzr is handled through the Objective-bzr framework. All access to any bzr functions should be treated as an extremely expensive operation. As such there should be extensive caching of data and refreshes should occur on a background thread, so as not to block the UI.

Objective-bzr works in an asynchronous fashion, with a completion block passed into most methods. For more information visit the Objective-bzr project page

Controllers

The controllers in BazaarX are:

Repositories

When BazaarX is launched, the first thing visible is the repositories view. This shows all the repositories in a grid. You can add and remove repositories, modify them and view them. There are 2 special repositories for holding standalone branches and checkouts from remote repositories

Actions

Double clicking on an repository will slide the repository view out and slide in the branch list for that repository

Right clicking on a repository brings up a context menu:

Edit Repository brings up the add repository sheet with details filled in. Delete Repository deletes the reference to the repository.

Pressing ⌘-backspace will also delete the reference to the repository

Add Repository

This sheet handles the adding of an existing repository. As such just the location is required, but an optional icon can be added.

Create Repository (init-repository)

This sheet handles creating repositories. A location is required. The user can then choose a repository format (default is the default format for the installed version of bzr).

Branches

Lorem ipsum dolor sit amet, consectetur adipisicing elit

Branch Existing Branch

Create New Branch

Checkout

Bind

Unbind

Switch

Send

Export

Working Tree

Lorem ipsum dolor sit amet, consectetur adipisicing elit.

Add Files

Remove Files

New Folder

Commit Files

Uncommit

Update

Revert

Merge

Remerge

Resolve

Logs

Lorem ipsum dolor sit amet, consectetur adipisicing elit.

Diffs

Lorem ipsum dolor sit amet, consectetur adipisicing elit.

Annotations

Lorem ipsum dolor sit amet, consectetur adipisicing elit.

Shelf

Lorem ipsum dolor sit amet, consectetur adipisicing elit.