~ubuntu-branches/ubuntu/lucid/bzr/lucid-proposed

« back to all changes in this revision

Viewing changes to bzrlib/doc/api/branch.txt

  • Committer: Bazaar Package Importer
  • Author(s): Jeff Bailey
  • Date: 2006-03-20 08:31:00 UTC
  • mfrom: (1.1.2 upstream)
  • mto: This revision was merged to the branch mainline in revision 4.
  • Revision ID: james.westby@ubuntu.com-20060320083100-ovdi2ssuw0epcx8s
Tags: 0.8~200603200831-0ubuntu1
* Snapshot uploaded to Dapper at Martin Pool's request.

* Disable testsuite for upload.  Fakeroot and the testsuite don't
  play along.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
The Branch API in bzrlib provides creation and management of Branches.
 
2
 
 
3
A Branch represents a series of commits and merges carried out by a user.
 
4
 
 
5
Branches are created by BzrDir's:
 
6
 
 
7
   >>> from bzrlib.bzrdir import ScratchDir
 
8
   >>> from bzrlib.branch import Branch
 
9
   >>> dir = ScratchDir()
 
10
   >>> new_branch = dir.create_branch()
 
11
 
 
12
 
 
13
Existing Branches can be opened directly:
 
14
 
 
15
   >>> another_instance = Branch.open(dir.transport.clone('..').base)
 
16
 
 
17
or via the BzrDir:
 
18
 
 
19
   >>> still_the_same_branch = dir.open_branch()
 
20
 
 
21
 
 
22
A branch has a history of revisions on it:
 
23
 
 
24
   >>> new_branch.revision_history()
 
25
   []
 
26
 
 
27
 
 
28
We need to write some more documentation, showing
 
29
push and pull operations. Cloning might also be nice.