123
124
return revision.NULL_REVISION
124
125
return self.mapping.revision_id_foreign_to_bzr(self.head)
127
def create_checkout(self, to_location, revision_id=None,
128
lightweight=False, accelerator_tree=None, hardlink=False):
130
raise LightWeightCheckoutsNotSupported()
131
return self._create_heavyweight_checkout(to_location, revision_id, hardlink)
133
def _create_heavyweight_checkout(self, to_location, revision_id=None,
135
"""Create a new heavyweight checkout of this branch.
137
:param to_location: URL of location to create the new checkout in.
138
:param revision_id: Revision that should be the tip of the checkout.
139
:param hardlink: Whether to hardlink
140
:return: WorkingTree object of checkout.
142
checkout_branch = BzrDir.create_branch_convenience(
143
to_location, force_new_tree=False, format=get_rich_root_format())
144
checkout = checkout_branch.bzrdir
145
checkout_branch.bind(self)
146
# pull up to the specified revision_id to set the initial
147
# branch tip correctly, and seed it with history.
148
checkout_branch.pull(self, stop_revision=revision_id)
149
return checkout.create_workingtree(revision_id, hardlink=hardlink)
126
151
def _make_tags(self):
127
152
return GitTagDict(self)