Rev 91: Better fix ? in file:///net/bigmamac/Volumes/home/vila/.bazaar/plugins/loom/

Vincent Ladeuil v.ladeuil+lp at free.fr
Fri Dec 19 14:10:38 GMT 2008


At file:///net/bigmamac/Volumes/home/vila/.bazaar/plugins/loom/

------------------------------------------------------------
revno: 91
revision-id: v.ladeuil+lp at free.fr-20081219141038-7indqxgtswyv1f38
parent: v.ladeuil+lp at free.fr-20081218130511-061kxb9f2im27bt4
committer: Vincent Ladeuil <v.ladeuil+lp at free.fr>
branch nick: loom
timestamp: Fri 2008-12-19 15:10:38 +0100
message:
  Better fix ?
  
  * branch.py:
  (LoomSupport.clone): According to Andrew, it's wrong to force the
  format onto the to_bzrdir, instead, that should be left to the
  to_bzrdir to decide. While fixing the failing test, that looks a
  bit radical...
  (LoomSupport.get_stacked_on_url, LoomSupport.set_stacked_on_url):
  Deleted, wrong belief, loom *are* stackable, at least loom7.
  (LoomBranch7): Fix typos in doc string.
  (LoomFormatMixin.supports_stacking): Deleted, same reason: loom
  *are* stackable, at least loom7.
-------------- next part --------------
=== modified file 'branch.py'
--- a/branch.py	2008-12-18 13:05:11 +0000
+++ b/branch.py	2008-12-19 14:10:38 +0000
@@ -226,17 +226,6 @@
         raise bzrlib.errors.UpgradeRequired(self.base)
 
     @needs_read_lock
-    def clone(self, to_bzrdir, revision_id=None):
-        """Clone the branch into to_bzrdir.
-        
-        This differs from the base clone by cloning the loom and 
-        setting the current nick to the top of the loom.
-        """
-        result = self._format.initialize(to_bzrdir)
-        self.copy_content_into(result, revision_id=revision_id)
-        return result
-
-    @needs_read_lock
     def copy_content_into(self, destination, revision_id=None):
         # XXX: hint for bzrlib - break this into two routines, one for
         # copying the last-rev pointer, one for copying parent etc.
@@ -602,12 +591,6 @@
                     self.record_thread(self.nick, lastrev)
         super(LoomSupport, self).unlock()
 
-    def get_stacked_on_url(self):
-        raise bzrlib.errors.UnstackableBranchFormat(self._format, self.base)
-
-    def set_stacked_on_url(self, url):
-        raise bzrlib.errors.UnstackableBranchFormat(self._format, self.base)
-
 
 class _Puller(object):
 
@@ -771,10 +754,10 @@
 
 
 class LoomBranch7(LoomSupport, bzrlib.branch.BzrBranch7):
-    """Branch6 Loom branch.
+    """Branch7 Loom branch.
 
     A mixin is used as the easiest migration path to support branch7.
-    A rewrite would be preferable, but a stackable loom format is needed
+    A rewrite would be preferable, but a stackable loom format was needed
     quickly.
     """
 
@@ -839,10 +822,6 @@
         state_stream.seek(0)
         branch._transport.put_file('last-loom', state_stream)
 
-    def supports_stacking(self):
-        """True if this format records a stacked-on branch."""
-        return False
-
 
 class BzrBranchLoomFormat1(LoomFormatMixin, bzrlib.branch.BzrBranchFormat5):
     """Loom's first format.



More information about the bazaar-commits mailing list