Correct version for recent bzrlib fix.
authorW. Trevor King <wking@drexel.edu>
Tue, 22 Feb 2011 23:54:57 +0000 (18:54 -0500)
committerChris Ball <cjb@laptop.org>
Fri, 25 Feb 2011 16:23:23 +0000 (11:23 -0500)
Rather than guessing from the output of `bzr tags`, I actually looked
in the realease notes and tracked the removal of run_direct() to
2.2b2, which is confirmed by the r5146 patch itself:

bzr.dev $ ./bzr log -p -n 0 -r 5146 | grep -1 deprec
+
+    @deprecated_method(deprecated_in((2, 2, 0)))
     def run_direct(self, *args, **kwargs):
--
    +
    +    @deprecated_method(deprecated_in((2, 2, 0)))
         def run_direct(self, *args, **kwargs):

libbe/storage/vcs/bzr.py

index f426612ddf2595dcdd1e7d0a0436c78e7498fbd8..a00e3ac03b67af42b7dc838938bc756f028bf036 100644 (file)
@@ -136,7 +136,7 @@ class Bzr(base.VCS):
         cmd = bzrlib.builtins.cmd_root()
         cmd.outf = StringIO.StringIO()
         cmd.run(filename=path)
-        if self.version_cmp(2,3,0) < 0:
+        if self.version_cmp(2,2,0) < 0:
             cmd.cleanup_now()
         return cmd.outf.getvalue().rstrip('\n')
 
@@ -144,7 +144,7 @@ class Bzr(base.VCS):
         cmd = bzrlib.builtins.cmd_init()
         cmd.outf = StringIO.StringIO()
         cmd.run(location=path)
-        if self.version_cmp(2,3,0) < 0:
+        if self.version_cmp(2,2,0) < 0:
             cmd.cleanup_now()
 
     def _vcs_destroy(self):
@@ -157,7 +157,7 @@ class Bzr(base.VCS):
         cmd = bzrlib.builtins.cmd_add()
         cmd.outf = StringIO.StringIO()
         cmd.run(file_list=[path], file_ids_from=self.repo)
-        if self.version_cmp(2,3,0) < 0:
+        if self.version_cmp(2,2,0) < 0:
             cmd.cleanup_now()
 
     def _vcs_exists(self, path, revision=None):
@@ -173,7 +173,7 @@ class Bzr(base.VCS):
         cmd = bzrlib.builtins.cmd_remove()
         cmd.outf = StringIO.StringIO()
         cmd.run(file_list=[path], file_deletion_strategy='force')
-        if self.version_cmp(2,3,0) < 0:
+        if self.version_cmp(2,2,0) < 0:
             cmd.cleanup_now()
 
     def _vcs_update(self, path):
@@ -210,7 +210,7 @@ class Bzr(base.VCS):
             if self.version_cmp(2,0,0) < 0:
                 cmd.outf = sys.stdout
                 sys.stdout = stdout
-            if self.version_cmp(2,3,0) < 0:
+            if self.version_cmp(2,2,0) < 0:
                 cmd.cleanup_now()
         return cmd.outf.getvalue()
 
@@ -247,7 +247,7 @@ class Bzr(base.VCS):
                 raise base.InvalidPath(path, root=self.repo, revision=revision)
             raise
         finally:
-            if self.version_cmp(2,3,0) < 0:
+            if self.version_cmp(2,2,0) < 0:
                 cmd.cleanup_now()
         children = cmd.outf.getvalue().rstrip('\n').splitlines()
         children = [self._u_rel_path(c, path) for c in children]
@@ -270,7 +270,7 @@ class Bzr(base.VCS):
             raise
         finally:
             os.chdir(cwd)
-            if self.version_cmp(2,3,0) < 0:
+            if self.version_cmp(2,2,0) < 0:
                 cmd.cleanup_now()
         return self._vcs_revision_id(-1)
 
@@ -278,7 +278,7 @@ class Bzr(base.VCS):
         cmd = bzrlib.builtins.cmd_revno()
         cmd.outf = StringIO.StringIO()
         cmd.run(location=self.repo)
-        if self.version_cmp(2,3,0) < 0:
+        if self.version_cmp(2,2,0) < 0:
             cmd.cleanup_now()
         current_revision = int(cmd.outf.getvalue())
         if index > current_revision or index < -current_revision:
@@ -298,7 +298,7 @@ class Bzr(base.VCS):
             status = cmd.run(revision=revision, file_list=[self.repo])
         finally:
             sys.stdout = stdout
-            if self.version_cmp(2,3,0) < 0:
+            if self.version_cmp(2,2,0) < 0:
                 cmd.cleanup_now()
         assert status in [0,1], "Invalid status %d" % status
         return cmd.outf.getvalue()