Rev 5701: (jelmer) Move is_control_filename() from Tree to MutableTree. (Jelmer in file:///home/pqm/archives/thelove/bzr/%2Btrunk/
Canonical.com Patch Queue Manager
pqm at pqm.ubuntu.com
Mon Mar 7 14:41:48 UTC 2011
At file:///home/pqm/archives/thelove/bzr/%2Btrunk/
------------------------------------------------------------
revno: 5701 [merge]
revision-id: pqm at pqm.ubuntu.com-20110307144146-xknzwbyjeaf9msr9
parent: pqm at pqm.ubuntu.com-20110306230216-1grz5vqxuq6z1jc8
parent: jelmer at samba.org-20110306181047-j3ychbs20m297tyf
committer: Canonical.com Patch Queue Manager <pqm at pqm.ubuntu.com>
branch nick: +trunk
timestamp: Mon 2011-03-07 14:41:46 +0000
message:
(jelmer) Move is_control_filename() from Tree to MutableTree. (Jelmer
Vernooij)
modified:
bzrlib/memorytree.py memorytree.py-20060906023413-4wlkalbdpsxi2r4y-1
bzrlib/mutabletree.py mutabletree.py-20060906023413-4wlkalbdpsxi2r4y-2
bzrlib/tree.py tree.py-20050309040759-9d5f2496be663e77
bzrlib/workingtree.py workingtree.py-20050511021032-29b6ec0a681e02e3
=== modified file 'bzrlib/memorytree.py'
--- a/bzrlib/memorytree.py 2010-04-30 11:03:59 +0000
+++ b/bzrlib/memorytree.py 2011-03-06 18:10:47 +0000
@@ -49,6 +49,10 @@
self._locks = 0
self._lock_mode = None
+ def is_control_filename(self, filename):
+ # Memory tree doesn't have any control filenames
+ return False
+
@needs_tree_write_lock
def _add(self, files, ids, kinds):
"""See MutableTree._add."""
=== modified file 'bzrlib/mutabletree.py'
--- a/bzrlib/mutabletree.py 2011-01-10 22:20:12 +0000
+++ b/bzrlib/mutabletree.py 2011-03-06 18:10:47 +0000
@@ -80,6 +80,18 @@
# used on media which doesn't differentiate the case of names.
self.case_sensitive = True
+ def is_control_filename(self, filename):
+ """True if filename is the name of a control file in this tree.
+
+ :param filename: A filename within the tree. This is a relative path
+ from the root of this tree.
+
+ This is true IF and ONLY IF the filename is part of the meta data
+ that bzr controls in this tree. I.E. a random .bzr directory placed
+ on disk will not be a control file for this tree.
+ """
+ raise NotImplementedError(self.is_control_filename)
+
@needs_tree_write_lock
def add(self, files, ids=None, kinds=None):
"""Add paths to the set of versioned paths.
=== modified file 'bzrlib/tree.py'
--- a/bzrlib/tree.py 2011-02-19 17:37:45 +0000
+++ b/bzrlib/tree.py 2011-03-06 18:10:47 +0000
@@ -157,18 +157,6 @@
"""
return self.inventory.id2path(file_id)
- def is_control_filename(self, filename):
- """True if filename is the name of a control file in this tree.
-
- :param filename: A filename within the tree. This is a relative path
- from the root of this tree.
-
- This is true IF and ONLY IF the filename is part of the meta data
- that bzr controls in this tree. I.E. a random .bzr directory placed
- on disk will not be a control file for this tree.
- """
- return self.bzrdir.is_control_filename(filename)
-
@needs_read_lock
def iter_entries_by_dir(self, specific_file_ids=None, yield_parents=False):
"""Walk the tree in 'by_dir' order.
=== modified file 'bzrlib/workingtree.py'
--- a/bzrlib/workingtree.py 2011-03-03 11:32:03 +0000
+++ b/bzrlib/workingtree.py 2011-03-06 18:10:47 +0000
@@ -254,6 +254,18 @@
def control_transport(self):
return self._transport
+ def is_control_filename(self, filename):
+ """True if filename is the name of a control file in this tree.
+
+ :param filename: A filename within the tree. This is a relative path
+ from the root of this tree.
+
+ This is true IF and ONLY IF the filename is part of the meta data
+ that bzr controls in this tree. I.E. a random .bzr directory placed
+ on disk will not be a control file for this tree.
+ """
+ return self.bzrdir.is_control_filename(filename)
+
def _detect_case_handling(self):
wt_trans = self.bzrdir.get_workingtree_transport(None)
try:
More information about the bazaar-commits
mailing list