Rev 1427: Rename FakeVersionedFiles -> VirtualVersionedFiles. in http://people.samba.org/bzr/jelmer/bzr-svn/trunk
Jelmer Vernooij
jelmer at samba.org
Thu Jul 3 18:40:01 BST 2008
At http://people.samba.org/bzr/jelmer/bzr-svn/trunk
------------------------------------------------------------
revno: 1427
revision-id: jelmer at samba.org-20080703173958-z5y00jn963j3absk
parent: jelmer at samba.org-20080703165719-b3s0p68pmq57rdyk
committer: Jelmer Vernooij <jelmer at samba.org>
branch nick: 0.4
timestamp: Thu 2008-07-03 19:39:58 +0200
message:
Rename FakeVersionedFiles -> VirtualVersionedFiles.
modified:
repository.py repository.py-20060306123302-1f8c5069b3fe0265
tests/test_versionedfiles.py test_versionedfiles.-20080626153242-v0c6uolklpux67a1-1
versionedfiles.py versionedfiles.py-20080626134117-j8g0ntz1pj228iox-1
=== modified file 'repository.py'
--- a/repository.py 2008-07-01 19:36:27 +0000
+++ b/repository.py 2008-07-03 17:39:58 +0000
@@ -48,8 +48,8 @@
from bzrlib.plugins.svn.svk import (SVN_PROP_SVK_MERGE, svk_features_merged_since,
parse_svk_feature)
from bzrlib.plugins.svn.tree import SvnRevisionTree
-from bzrlib.plugins.svn.versionedfiles import (SvnTexts, FakeRevisionTexts,
- FakeInventoryTexts, FakeSignatureTexts)
+from bzrlib.plugins.svn.versionedfiles import (SvnTexts, VirtualRevisionTexts,
+ VirtualInventoryTexts, VirtualSignatureTexts)
import urllib
def full_paths(find_children, paths, bp, from_bp, from_rev):
@@ -165,9 +165,9 @@
Repository.__init__(self, SvnRepositoryFormat(), bzrdir, control_files)
self.texts = SvnTexts(self)
- self.revisions = FakeRevisionTexts(self)
- self.inventories = FakeInventoryTexts(self)
- self.signatures = FakeSignatureTexts(self)
+ self.revisions = VirtualRevisionTexts(self)
+ self.inventories = VirtualInventoryTexts(self)
+ self.signatures = VirtualSignatureTexts(self)
self._cached_revnum = None
self._lock_mode = None
self._lock_count = 0
=== modified file 'tests/test_versionedfiles.py'
--- a/tests/test_versionedfiles.py 2008-06-29 02:46:13 +0000
+++ b/tests/test_versionedfiles.py 2008-07-03 17:39:58 +0000
@@ -17,9 +17,9 @@
from bzrlib.graph import DictParentsProvider
from bzrlib.tests import TestCase
-from bzrlib.plugins.svn.versionedfiles import (SvnTexts, FakeRevisionTexts,
- FakeInventoryTexts, FakeSignatureTexts,
- FakeVersionedFiles)
+from bzrlib.plugins.svn.versionedfiles import (SvnTexts, VirtualRevisionTexts,
+ VirtualInventoryTexts, VirtualSignatureTexts,
+ VirtualVersionedFiles)
class BasicSvnTextsTests:
@@ -44,7 +44,7 @@
self.texts = SvnTexts(self)
-class FakeTextsTests(TestCase,BasicSvnTextsTests):
+class VirtualTextsTests(TestCase,BasicSvnTextsTests):
def get_parent_map(self, keys):
return DictParentsProvider(self.parent_map).get_parent_map(keys)
@@ -70,18 +70,18 @@
self.assertEquals("FOO", record.get_bytes_as("fulltext"))
def setUp(self):
- self.texts = FakeVersionedFiles(self.get_parent_map, self.get_lines)
-
-
-class FakeRevisionTextsTests(TestCase,BasicSvnTextsTests):
+ self.texts = VirtualVersionedFiles(self.get_parent_map, self.get_lines)
+
+
+class VirtualRevisionTextsTests(TestCase,BasicSvnTextsTests):
def setUp(self):
- self.texts = FakeRevisionTexts(self)
+ self.texts = VirtualRevisionTexts(self)
def get_parent_map(self, keys):
raise NotImplementedError
-class FakeInventoryTextsTests(TestCase,BasicSvnTextsTests):
+class VirtualInventoryTextsTests(TestCase,BasicSvnTextsTests):
def get_inventory_xml(self, key):
return "FOO"
@@ -89,15 +89,15 @@
return {("A",): (("B",))}
def setUp(self):
- self.texts = FakeInventoryTexts(self)
+ self.texts = VirtualInventoryTexts(self)
def test_get_sha1s(self):
self.assertEquals({("A",): osutils.sha_strings(["FOO"])}, self.texts.get_sha1s([("A",)]))
-class FakeSignatureTextsTests(TestCase,BasicSvnTextsTests):
+class VirtualSignatureTextsTests(TestCase,BasicSvnTextsTests):
def setUp(self):
- self.texts = FakeSignatureTexts(self)
+ self.texts = VirtualSignatureTexts(self)
def get_parent_map(self, keys):
raise NotImplementedError
=== modified file 'versionedfiles.py'
--- a/versionedfiles.py 2008-07-01 13:40:07 +0000
+++ b/versionedfiles.py 2008-07-03 17:39:58 +0000
@@ -73,9 +73,9 @@
# TODO: annotate, get_sha1s, iter_lines_added_or_present_in_keys, keys
-class FakeVersionedFiles(VersionedFiles):
+class VirtualVersionedFiles(VersionedFiles):
def mutter(self, text, *args):
- if "fakevf" in debug.debug_flags:
+ if "virtualvf" in debug.debug_flags:
mutter(text, *args)
def __init__(self, get_parent_map, get_lines):
@@ -115,11 +115,11 @@
yield AbsentContentFactory((k,))
-class FakeRevisionTexts(FakeVersionedFiles):
- """Fake revisions backend."""
+class VirtualRevisionTexts(VirtualVersionedFiles):
+ """Virtual revisions backend."""
def __init__(self, repository):
self.repository = repository
- super(FakeRevisionTexts, self).__init__(self.repository.get_parent_map, self.get_lines)
+ super(VirtualRevisionTexts, self).__init__(self.repository.get_parent_map, self.get_lines)
def get_lines(self, key):
self.mutter("get revision text(%r)", key)
@@ -128,11 +128,11 @@
# TODO: annotate, iter_lines_added_or_present_in_keys, keys
-class FakeInventoryTexts(FakeVersionedFiles):
- """Fake inventories backend."""
+class VirtualInventoryTexts(VirtualVersionedFiles):
+ """Virtual inventories backend."""
def __init__(self, repository):
self.repository = repository
- super(FakeInventoryTexts, self).__init__(self.repository.get_parent_map, self.get_lines)
+ super(VirtualInventoryTexts, self).__init__(self.repository.get_parent_map, self.get_lines)
def get_lines(self, key):
return osutils.split_lines(self.repository.get_inventory_xml(key))
@@ -140,11 +140,11 @@
# TODO: annotate, iter_lines_added_or_present_in_keys, keys
-class FakeSignatureTexts(FakeVersionedFiles):
- """Fake signatures backend."""
+class VirtualSignatureTexts(VirtualVersionedFiles):
+ """Virtual signatures backend."""
def __init__(self, repository):
self.repository = repository
- super(FakeSignatureTexts, self).__init__(self.repository.get_parent_map, self.get_lines)
+ super(VirtualSignatureTexts, self).__init__(self.repository.get_parent_map, self.get_lines)
def get_lines(self, key):
return osutils.split_lines(self.repository.get_signature_text(key))
More information about the bazaar-commits
mailing list