Rev 4811: merge the 'minor' changes. in http://bazaar.launchpad.net/~jameinel/bzr/2.1.0b4-win32-accepted
John Arbash Meinel
john at arbash-meinel.com
Wed Nov 18 16:08:34 GMT 2009
At http://bazaar.launchpad.net/~jameinel/bzr/2.1.0b4-win32-accepted
------------------------------------------------------------
revno: 4811 [merge]
revision-id: john at arbash-meinel.com-20091118160827-39riegxus1zihosi
parent: john at arbash-meinel.com-20091118154955-rkx53mni9jwh6kxx
parent: john at arbash-meinel.com-20091118160149-8qjuw8ugae3av2vg
committer: John Arbash Meinel <john at arbash-meinel.com>
branch nick: 2.1.0b4-win32-accepted
timestamp: Wed 2009-11-18 10:08:27 -0600
message:
merge the 'minor' changes.
modified:
bzrlib/tests/test_osutils.py test_osutils.py-20051201224856-e48ee24c12182989
bzrlib/tests/test_repository.py test_repository.py-20060131075918-65c555b881612f4d
bzrlib/tests/test_transform.py test_transaction.py-20060105172520-b3ffb3946550e6c4
-------------- next part --------------
=== modified file 'bzrlib/tests/test_osutils.py'
--- a/bzrlib/tests/test_osutils.py 2009-11-10 07:01:56 +0000
+++ b/bzrlib/tests/test_osutils.py 2009-11-18 15:57:39 +0000
@@ -58,10 +58,6 @@
return s
-def _fs_enc_to_unicode(s):
- return s.decode(osutils._fs_enc)
-
-
def _utf8_to_unicode(s):
return s.decode('UTF-8')
@@ -87,12 +83,10 @@
if test__walkdirs_win32.Win32ReadDirFeature.available():
try:
from bzrlib import _walkdirs_win32
- # TODO: check on windows, it may be that we need to use/add
- # safe_unicode instead of _fs_enc_to_unicode
scenarios.append(
('win32',
dict(_dir_reader_class=_walkdirs_win32.Win32ReadDir,
- _native_to_unicode=_fs_enc_to_unicode)))
+ _native_to_unicode=_already_unicode)))
except ImportError:
pass
return scenarios
@@ -1631,7 +1625,7 @@
text = 'test\r\nwith\nall\rpossible line endings\r\n'
self.build_tree_contents([('foo', text)])
expected_sha = osutils.sha_string(text)
- f = open('foo')
+ f = open('foo', 'rb')
self.addCleanup(f.close)
size, sha = osutils.size_sha_file(f)
self.assertEqual(38, size)
=== modified file 'bzrlib/tests/test_repository.py'
--- a/bzrlib/tests/test_repository.py 2009-09-15 01:52:34 +0000
+++ b/bzrlib/tests/test_repository.py 2009-11-08 23:59:07 +0000
@@ -24,6 +24,7 @@
from stat import S_ISDIR
from StringIO import StringIO
+import sys
import bzrlib
from bzrlib.errors import (NotBranchError,
@@ -252,7 +253,14 @@
tree = control.create_workingtree()
tree.add(['foo'], ['Foo:Bar'], ['file'])
tree.put_file_bytes_non_atomic('Foo:Bar', 'content\n')
- tree.commit('first post', rev_id='first')
+ try:
+ tree.commit('first post', rev_id='first')
+ except errors.IllegalPath:
+ if sys.platform != 'win32':
+ raise
+ self.knownFailure('Foo:Bar cannot be used as a file-id on windows'
+ ' in repo format 7')
+ return
self.assertEqualDiff(
'# bzr weave file v5\n'
'i\n'
=== modified file 'bzrlib/tests/test_transform.py'
--- a/bzrlib/tests/test_transform.py 2009-11-10 19:40:13 +0000
+++ b/bzrlib/tests/test_transform.py 2009-11-18 16:01:49 +0000
@@ -1951,14 +1951,16 @@
branch, tt = self.get_branch_and_transform()
tt.new_file('file', tt.root, 'contents', 'file-id')
trans_id = tt.new_directory('dir', tt.root, 'dir-id')
- tt.new_symlink('symlink', trans_id, 'target', 'symlink-id')
+ if SymlinkFeature.available():
+ tt.new_symlink('symlink', trans_id, 'target', 'symlink-id')
rev = tt.commit(branch, 'message')
tree = branch.basis_tree()
self.assertEqual('file', tree.id2path('file-id'))
self.assertEqual('contents', tree.get_file_text('file-id'))
self.assertEqual('dir', tree.id2path('dir-id'))
- self.assertEqual('dir/symlink', tree.id2path('symlink-id'))
- self.assertEqual('target', tree.get_symlink_target('symlink-id'))
+ if SymlinkFeature.available():
+ self.assertEqual('dir/symlink', tree.id2path('symlink-id'))
+ self.assertEqual('target', tree.get_symlink_target('symlink-id'))
def test_add_unversioned(self):
branch, tt = self.get_branch_and_transform()
@@ -2454,8 +2456,6 @@
self.assertEqual(('missing', None, None, None), summary)
def test_file_content_summary_executable(self):
- if not osutils.supports_executable():
- raise TestNotApplicable()
preview = self.get_empty_preview()
path_id = preview.new_file('path', preview.root, 'contents', 'path-id')
preview.set_executability(True, path_id)
@@ -2754,6 +2754,7 @@
branch = self.make_branch('any')
tree = branch.repository.revision_tree(_mod_revision.NULL_REVISION)
tt = TransformPreview(tree)
+ self.addCleanup(tt.finalize)
foo_id = tt.new_directory('', ROOT_PARENT)
bar_id = tt.new_file(u'\u1234bar', foo_id, 'contents')
limbo_path = tt._limbo_name(bar_id)
More information about the bazaar-commits
mailing list