Package: bzr-loom / 2.2.0-5

BzrBranch5.patch Patch series | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
Description: BzrBranch5 has moved in bzr 2.6
Origin: http://bazaar.launchpad.net/~bzr-loom-devs/bzr-loom/trunk/revision/160
Bug: https://bugs.launchpad.net/ubuntu/+source/bzr-loom/+bug/1025030

Index: bzr-loom/branch.py
===================================================================
--- bzr-loom.orig/branch.py	2012-09-26 22:24:18.315432000 -0400
+++ bzr-loom/branch.py	2012-09-26 22:24:43.783109139 -0400
@@ -53,6 +53,12 @@
 EMPTY_REVISION = 'empty:'
 
 
+try:
+    from bzrlib.branchfmt.fullhistory import BzrBranch5, BzrBranchFormat5
+except ImportError:
+    from bzrlib.branch import BzrBranch5, BzrBranchFormat5
+
+
 def create_thread(loom, thread_name):
     """Create a thread in the branch loom called thread."""
     require_loom_branch(loom)
@@ -88,7 +94,7 @@
             raise AlreadyLoom(branch)
         try:
             format = {
-                bzrlib.branch.BzrBranchFormat5: BzrBranchLoomFormat1,
+                BzrBranchFormat5: BzrBranchLoomFormat1,
                 bzrlib.branch.BzrBranchFormat6: BzrBranchLoomFormat6,
                 bzrlib.branch.BzrBranchFormat7: BzrBranchLoomFormat7,
             }[branch._format.__class__]()
@@ -744,7 +750,7 @@
         return bzrlib.branch.Branch.hooks['post_push']
 
 
-class LoomBranch(LoomSupport, bzrlib.branch.BzrBranch5):
+class LoomBranch(LoomSupport, BzrBranch5):
     """The Loom branch.
     
     A mixin is used as the easiest migration path to support branch6. A
@@ -844,7 +850,7 @@
 
 
 
-class BzrBranchLoomFormat1(LoomFormatMixin, bzrlib.branch.BzrBranchFormat5):
+class BzrBranchLoomFormat1(LoomFormatMixin, BzrBranchFormat5):
     """Loom's first format.
 
     This format is an extension to BzrBranchFormat5 with the following changes:
@@ -859,7 +865,7 @@
     def _branch_class(self):
         return LoomBranch
 
-    _parent_classs = bzrlib.branch.BzrBranchFormat5
+    _parent_classs = BzrBranchFormat5
 
     @classmethod
     def get_format_string(cls):