Rev 5778: (jelmer) Two trivial fixes for bzrlib.tree and bzrlib.workingtree. (Jelmer in file:///home/pqm/archives/thelove/bzr/%2Btrunk/

Canonical.com Patch Queue Manager pqm at pqm.ubuntu.com
Mon Apr 11 02:01:09 UTC 2011


At file:///home/pqm/archives/thelove/bzr/%2Btrunk/

------------------------------------------------------------
revno: 5778 [merge]
revision-id: pqm at pqm.ubuntu.com-20110411020101-orzxkwkibj496n91
parent: pqm at pqm.ubuntu.com-20110409012042-1c0hnd2ryglf85y3
parent: jelmer at samba.org-20110409151609-kfa15lm18q5rc4nt
committer: Canonical.com Patch Queue Manager <pqm at pqm.ubuntu.com>
branch nick: +trunk
timestamp: Mon 2011-04-11 02:01:01 +0000
message:
  (jelmer) Two trivial fixes for bzrlib.tree and bzrlib.workingtree. (Jelmer
   Vernooij)
modified:
  bzrlib/tests/per_workingtree/test_commit.py test_commit.py-20060421013633-1610ec2331c8190f
  bzrlib/tree.py                 tree.py-20050309040759-9d5f2496be663e77
  bzrlib/workingtree.py          workingtree.py-20050511021032-29b6ec0a681e02e3
=== modified file 'bzrlib/tests/per_workingtree/test_commit.py'
--- a/bzrlib/tests/per_workingtree/test_commit.py	2010-09-14 08:14:22 +0000
+++ b/bzrlib/tests/per_workingtree/test_commit.py	2011-04-09 02:07:50 +0000
@@ -15,7 +15,6 @@
 # along with this program; if not, write to the Free Software
 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
 
-from cStringIO import StringIO
 import os
 
 from bzrlib import (
@@ -27,17 +26,8 @@
     osutils,
     revision as _mod_revision,
     ui,
-    uncommit,
-    workingtree,
     )
-from bzrlib.errors import (NotBranchError, NotVersionedError,
-                           UnsupportedOperation)
-from bzrlib.osutils import pathjoin, getcwd
-from bzrlib.tests import TestCase
 from bzrlib.tests.per_workingtree import TestCaseWithWorkingTree
-from bzrlib.trace import mutter
-from bzrlib.workingtree import (TreeEntry, TreeDirectory, TreeFile, TreeLink,
-                                WorkingTree)
 from bzrlib.tests.testui import ProgressRecordingUIFactory
 
 

=== modified file 'bzrlib/tree.py'
--- a/bzrlib/tree.py	2011-04-08 09:54:43 +0000
+++ b/bzrlib/tree.py	2011-04-09 15:16:09 +0000
@@ -294,6 +294,15 @@
         """
         return osutils.split_lines(self.get_file_text(file_id, path))
 
+    def get_file_sha1(self, file_id, path=None):
+        """Return the SHA1 file for a file.
+
+        :param file_id: The handle for this file.
+        :param path: The path that this file can be found at.
+            These must point to the same object.
+        """
+        raise NotImplementedError(self.get_file_sha1)
+
     def get_file_mtime(self, file_id, path=None):
         """Return the modification time for a file.
 
@@ -315,6 +324,15 @@
     def get_file_by_path(self, path):
         return self.get_file(self._inventory.path2id(path), path)
 
+    def is_executable(self, file_id, path=None):
+        """Check if a file is executable.
+
+        :param file_id: The handle for this file.
+        :param path: The path that this file can be found at.
+            These must point to the same object.
+        """
+        raise NotImplementedError(self.is_executable)
+
     def iter_files_bytes(self, desired_files):
         """Iterate through file contents.
 

=== modified file 'bzrlib/workingtree.py'
--- a/bzrlib/workingtree.py	2011-04-08 09:54:43 +0000
+++ b/bzrlib/workingtree.py	2011-04-09 15:08:16 +0000
@@ -639,10 +639,6 @@
         """Return the id of this trees root"""
         return self._inventory.root.file_id
 
-    def _get_store_filename(self, file_id):
-        ## XXX: badly named; this is not in the store at all
-        return self.abspath(self.id2path(file_id))
-
     @needs_read_lock
     def clone(self, to_bzrdir, revision_id=None):
         """Duplicate this working tree into to_bzr, including all state.




More information about the bazaar-commits mailing list