Rev 5625: (jelmer) Various more fixes in preparation of moving the weave formats into in file:///home/pqm/archives/thelove/bzr/%2Btrunk/
Canonical.com Patch Queue Manager
pqm at pqm.ubuntu.com
Wed Jan 19 23:00:13 UTC 2011
At file:///home/pqm/archives/thelove/bzr/%2Btrunk/
------------------------------------------------------------
revno: 5625 [merge]
revision-id: pqm at pqm.ubuntu.com-20110119230012-e23ge97fqrvej4b1
parent: pqm at pqm.ubuntu.com-20110119202257-1fi3v53uhzsvacci
parent: jelmer at samba.org-20110119200912-dm3hbp7dxqg7isbp
committer: Canonical.com Patch Queue Manager <pqm at pqm.ubuntu.com>
branch nick: +trunk
timestamp: Wed 2011-01-19 23:00:12 +0000
message:
(jelmer) Various more fixes in preparation of moving the weave formats into
a plugin. (Jelmer Vernooij)
modified:
bzrlib/reconcile.py reweave_inventory.py-20051108164726-1e5e0934febac06e
bzrlib/repository.py rev_storage.py-20051111201905-119e9401e46257e3
bzrlib/tests/blackbox/test_upgrade.py test_upgrade.py-20060120060132-b41e5ed2f886ad28
bzrlib/tests/per_workingtree/test_smart_add.py test_smart_add.py-20070215175752-9s5mxoz8aqpd80fm-1
bzrlib/tests/per_workingtree/test_workingtree.py test_workingtree.py-20060203003124-817757d3e31444fb
bzrlib/tests/test_weave.py testknit.py-20050627023648-9833cc5562ffb785
bzrlib/workingtree.py workingtree.py-20050511021032-29b6ec0a681e02e3
=== modified file 'bzrlib/reconcile.py'
--- a/bzrlib/reconcile.py 2010-12-02 10:41:05 +0000
+++ b/bzrlib/reconcile.py 2011-01-19 19:54:46 +0000
@@ -224,8 +224,6 @@
only data-loss causing issues (!self.thorough) or all issues
(self.thorough) are treated as requiring the reweave.
"""
- # local because needing to know about WeaveFile is a wart we want to hide
- from bzrlib.weave import WeaveFile, Weave
transaction = self.repo.get_transaction()
self.pb.update('Reading inventory data')
self.inventory = self.repo.inventories
=== modified file 'bzrlib/repository.py'
--- a/bzrlib/repository.py 2011-01-14 17:18:23 +0000
+++ b/bzrlib/repository.py 2011-01-19 23:00:12 +0000
@@ -52,7 +52,6 @@
from bzrlib.testament import Testament
""")
-import sys
from bzrlib import (
errors,
registry,
=== modified file 'bzrlib/tests/blackbox/test_upgrade.py'
--- a/bzrlib/tests/blackbox/test_upgrade.py 2011-01-13 15:54:03 +0000
+++ b/bzrlib/tests/blackbox/test_upgrade.py 2011-01-19 19:58:16 +0000
@@ -222,6 +222,7 @@
bzrdir.BzrDirMetaFormat1))
self.assertTrue(t.has(backup_dir2))
+
class SFTPTests(TestCaseWithSFTPServer):
"""Tests for upgrade over sftp."""
=== modified file 'bzrlib/tests/per_workingtree/test_smart_add.py'
--- a/bzrlib/tests/per_workingtree/test_smart_add.py 2010-11-02 22:23:40 +0000
+++ b/bzrlib/tests/per_workingtree/test_smart_add.py 2011-01-19 20:04:23 +0000
@@ -301,10 +301,9 @@
def test_accessible_explicit(self):
osutils.normalized_filename = osutils._accessible_normalized_filename
- if isinstance(self.workingtree_format, workingtree.WorkingTreeFormat2):
+ if self.workingtree_format.requires_normalized_unicode_filenames:
self.expectFailure(
- 'With WorkingTreeFormat2, smart_add requires'
- ' normalized unicode filenames',
+ 'Working tree format smart_add requires normalized unicode filenames',
self.assertRaises, errors.NoSuchFile,
self.wt.smart_add, [u'a\u030a'])
else:
@@ -317,10 +316,9 @@
def test_accessible_implicit(self):
osutils.normalized_filename = osutils._accessible_normalized_filename
- if isinstance(self.workingtree_format, workingtree.WorkingTreeFormat2):
+ if self.workingtree_format.requires_normalized_unicode_filenames:
self.expectFailure(
- 'With WorkingTreeFormat2, smart_add requires'
- ' normalized unicode filenames',
+ 'Working tree format smart_add requires normalized unicode filenames',
self.assertRaises, errors.NoSuchFile,
self.wt.smart_add, [])
else:
=== modified file 'bzrlib/tests/per_workingtree/test_workingtree.py'
--- a/bzrlib/tests/per_workingtree/test_workingtree.py 2011-01-12 01:01:53 +0000
+++ b/bzrlib/tests/per_workingtree/test_workingtree.py 2011-01-19 20:05:11 +0000
@@ -42,7 +42,6 @@
TreeFile,
TreeLink,
WorkingTree,
- WorkingTree2,
)
from bzrlib.conflicts import ConflictList, TextConflict, ContentsConflict
@@ -924,8 +923,6 @@
else:
case_sensitive = True
tree = self.make_branch_and_tree('test')
- if tree.__class__ == WorkingTree2:
- raise TestSkipped('WorkingTree2 is not supported')
self.assertEqual(case_sensitive, tree.case_sensitive)
def test_all_file_ids_with_missing(self):
=== modified file 'bzrlib/tests/test_weave.py'
--- a/bzrlib/tests/test_weave.py 2011-01-12 01:01:53 +0000
+++ b/bzrlib/tests/test_weave.py 2011-01-19 20:09:12 +0000
@@ -64,6 +64,7 @@
class WeaveContains(TestBase):
"""Weave __contains__ operator"""
+
def runTest(self):
k = Weave(get_scope=lambda:None)
self.assertFalse('foo' in k)
@@ -72,11 +73,13 @@
class Easy(TestBase):
+
def runTest(self):
k = Weave()
class AnnotateOne(TestBase):
+
def runTest(self):
k = Weave()
k.add_lines('text0', [], TEXT_0)
@@ -86,6 +89,7 @@
class InvalidAdd(TestBase):
"""Try to use invalid version number during add."""
+
def runTest(self):
k = Weave()
@@ -107,6 +111,7 @@
class InvalidRepeatedAdd(TestBase):
+
def runTest(self):
k = Weave()
k.add_lines('basis', [], TEXT_0)
@@ -533,6 +538,7 @@
class Merge(TestBase):
"""Storage of versions that merge diverged parents"""
+
def runTest(self):
k = Weave()
@@ -649,6 +655,7 @@
class JoinWeavesTests(TestBase):
+
def setUp(self):
super(JoinWeavesTests, self).setUp()
self.weave1 = Weave()
=== modified file 'bzrlib/workingtree.py'
--- a/bzrlib/workingtree.py 2011-01-13 02:05:17 +0000
+++ b/bzrlib/workingtree.py 2011-01-19 20:04:23 +0000
@@ -2858,6 +2858,8 @@
upgrade_recommended = False
+ requires_normalized_unicode_filenames = False
+
@classmethod
def find_format(klass, a_bzrdir):
"""Return the format for the working tree object in a_bzrdir."""
@@ -2928,6 +2930,8 @@
upgrade_recommended = True
+ requires_normalized_unicode_filenames = True
+
def get_format_description(self):
"""See WorkingTreeFormat.get_format_description()."""
return "Working tree format 2"
More information about the bazaar-commits
mailing list