Rev 383: Support merge-upstream in treeless repositories. in http://people.canonical.com/~robertc/baz2.0/plugins/builddeb/trunk

Robert Collins robertc at robertcollins.net
Sun Nov 22 03:40:43 GMT 2009


At http://people.canonical.com/~robertc/baz2.0/plugins/builddeb/trunk

------------------------------------------------------------
revno: 383
revision-id: robertc at robertcollins.net-20091122034042-f9mhkmgvlfjjr3f1
parent: robertc at robertcollins.net-20091122031740-5ltc06vsc8zm2z7l
committer: Robert Collins <robertc at robertcollins.net>
branch nick: trunk
timestamp: Sun 2009-11-22 14:40:42 +1100
message:
  Support merge-upstream in treeless repositories.
=== modified file 'import_dsc.py'
--- a/import_dsc.py	2009-11-11 06:22:42 +0000
+++ b/import_dsc.py	2009-11-22 03:40:42 +0000
@@ -54,6 +54,7 @@
         AlreadyBranchError,
         BzrCommandError,
         NotBranchError,
+        NoWorkingTree,
         )
 from bzrlib.export import export
 from bzrlib.osutils import file_iterator, isdir, basename, splitpath
@@ -1551,7 +1552,11 @@
         dir_to = self.branch.bzrdir.sprout(to_location,
                 revision_id=upstream_tip,
                 accelerator_tree=self.tree)
-        self.upstream_tree = dir_to.open_workingtree()
+        try:
+            self.upstream_tree = dir_to.open_workingtree()
+        except NoWorkingTree:
+            # Handle shared treeless repo's.
+            self.upstream_tree = dir_to.create_workingtree()
         self.upstream_branch = self.upstream_tree.branch
 
     _extract_upstream_tree = extract_upstream_tree




More information about the bazaar-commits mailing list