~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

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

  • Committer: Aaron Bentley
  • Date: 2005-09-21 15:33:23 UTC
  • mto: (1185.1.37)
  • mto: This revision was merged to the branch mainline in revision 1390.
  • Revision ID: abentley@panoramicfeedback.com-20050921153323-5db674d572d7649d
Fixed bug in distance-from-root graph operation

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.