summaryrefslogtreecommitdiff
path: root/branch_updater.py
diff options
context:
space:
mode:
authorIan Clatworthy <ian.clatworthy@canonical.com>2009-08-07 17:04:04 +1000
committerIan Clatworthy <ian.clatworthy@canonical.com>2009-08-07 17:04:04 +1000
commit6ccfafd741236531d467261314d8943edbc3e6e8 (patch)
tree3b72cca24c446d3912491ee30b7e6e6448868b8a /branch_updater.py
parent2a49250f4da96baa2451737b2f57058f7a8223c3 (diff)
downloadbzr-fastimport-6ccfafd741236531d467261314d8943edbc3e6e8.tar.gz
Smarter selection of branch format based on shared repository format
Diffstat (limited to 'branch_updater.py')
-rw-r--r--branch_updater.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/branch_updater.py b/branch_updater.py
index 36e9d93..6a8436d 100644
--- a/branch_updater.py
+++ b/branch_updater.py
@@ -41,6 +41,8 @@ class BranchUpdater(object):
self.last_ref = last_ref
self.tags = tags
self.name_mapper = branch_mapper.BranchMapper()
+ self._branch_format = \
+ helpers.best_format_for_objects_in_a_repository(repo)
def update(self):
"""Update the Bazaar branches and tips matching the heads.
@@ -127,7 +129,8 @@ class BranchUpdater(object):
try:
return bzrdir.BzrDir.open(location).open_branch()
except errors.NotBranchError, ex:
- return bzrdir.BzrDir.create_branch_convenience(location)
+ return bzrdir.BzrDir.create_branch_convenience(location,
+ format=self._branch_format)
def _update_branch(self, br, last_mark):
"""Update a branch with last revision and tag information.