-=[ Mr. Bumblebee ]=-
_Indonesia_
ó
î:ïNc @@ sn d Z d d l m Z d d l m Z m Z m Z m Z m Z d e f d „ ƒ YZ
d e f d „ ƒ YZ d S( s5 Utility for create branches with particular contents.i ( t absolute_import( t
controldirt committ errorst
memorytreet revisiont
BranchBuilderc B@ s‰ e Z d Z d
d
d
d „ Z d
e d „ Z d
d
d „ Z e d „ Z d „ Z d „ Z
d
d
e d
d
d
d „ Z d „ Z d „ Z
RS( s A BranchBuilder aids creating Branches with particular shapes.
The expected way to use BranchBuilder is to construct a
BranchBuilder on the transport you want your branch on, and then call
appropriate build_ methods on it to get the shape of history you want.
This is meant as a helper for the test suite, not as a general class for
real data.
For instance:
>>> from bzrlib.transport.memory import MemoryTransport
>>> builder = BranchBuilder(MemoryTransport("memory:///"))
>>> builder.start_series()
>>> builder.build_snapshot('rev-id', None, [
... ('add', ('', 'root-id', 'directory', '')),
... ('add', ('filename', 'f-id', 'file', 'content\n'))])
'rev-id'
>>> builder.build_snapshot('rev2-id', ['rev-id'],
... [('modify', ('f-id', 'new-content\n'))])
'rev2-id'
>>> builder.finish_series()
>>> branch = builder.get_branch()
:ivar _tree: This is a private member which is not meant to be modified by
users of this class. While a 'series' is in progress, it should hold a
MemoryTree with the contents of the last commit (ready to be modified
by the next build_snapshot command) with a held write lock. Outside of
a series in progress, it should be None.
c C@ s× | d k rN | d k r' t d ƒ ‚ n | d k rB t d ƒ ‚ n | | _ n| | j d ƒ sm | j d ƒ n | d k r‚ d } n t | t ƒ r¦ t j j | ƒ } n t j
j | j d | d t
ƒ| _ d | _ d S( s Construct a BranchBuilder on transport.
:param transport: The transport the branch should be created on.
If the path of the transport does not exist but its parent does
it will be created.
:param format: Either a BzrDirFormat, or the name of a format in the
controldir format registry for the branch to be built.
:param branch: An already constructed branch to use. This param is
mutually exclusive with the transport and format params.
s/ branch and format kwargs are mutually exclusives2 branch and transport kwargs are mutually exclusivet .t defaultt formatt force_new_treeN( t Nonet AssertionErrort _brancht hast mkdirt
isinstancet strR t format_registryt make_bzrdirt
ControlDirt create_branch_conveniencet baset Falset _tree( t selft transportR t branch( ( s8 /usr/lib/python2.7/dist-packages/bzrlib/branchbuilder.pyt __init__>