Rev 2852: Fix #141382 by comparing real paths and various OSX fixes in file:///home/pqm/archives/thelove/bzr/%2Btrunk/
Canonical.com Patch Queue Manager
pqm at pqm.ubuntu.com
Mon Sep 24 11:27:47 BST 2007
At file:///home/pqm/archives/thelove/bzr/%2Btrunk/
------------------------------------------------------------
revno: 2852
revision-id: pqm at pqm.ubuntu.com-20070924102745-ohorpye5tifec1q3
parent: pqm at pqm.ubuntu.com-20070924042807-nfjwj1voh6a8zddf
parent: v.ladeuil+lp at free.fr-20070924094148-jqyqvapf3keqdcfx
committer: Canonical.com Patch Queue Manager <pqm at pqm.ubuntu.com>
branch nick: +trunk
timestamp: Mon 2007-09-24 11:27:45 +0100
message:
Fix #141382 by comparing real paths and various OSX fixes
modified:
NEWS NEWS-20050323055033-4e00b5db738777ff
bzrlib/tests/__init__.py selftest.py-20050531073622-8d0e3c8845c97a64
bzrlib/tests/blackbox/test_too_much.py blackbox.py-20050620052131-a7370d756399f615
bzrlib/tests/test_bundle.py test.py-20050630184834-092aa401ab9f039c
bzrlib/tests/test_plugins.py plugins.py-20050622075746-32002b55e5e943e9
bzrlib/tests/test_selftest.py test_selftest.py-20051202044319-c110a115d8c0456a
bzrlib/tests/test_sftp_transport.py testsftp.py-20051027032739-247570325fec7e7e
------------------------------------------------------------
revno: 2851.1.1
merged: v.ladeuil+lp at free.fr-20070924094148-jqyqvapf3keqdcfx
parent: pqm at pqm.ubuntu.com-20070924042807-nfjwj1voh6a8zddf
parent: v.ladeuil+lp at free.fr-20070924094001-k8z6tlxnlcimvg5a
committer: Vincent Ladeuil <v.ladeuil+lp at free.fr>
branch nick: trunk
timestamp: Mon 2007-09-24 11:41:48 +0200
message:
Fix #141382 by comparing real paths and various OSX fixes
------------------------------------------------------------
revno: 2823.1.14
merged: v.ladeuil+lp at free.fr-20070924094001-k8z6tlxnlcimvg5a
parent: v.ladeuil+lp at free.fr-20070924085356-g7mx4wdj2np35j37
committer: Vincent Ladeuil <v.ladeuil+lp at free.fr>
branch nick: osx.clean
timestamp: Mon 2007-09-24 11:40:01 +0200
message:
Fix 141382 by comparing real paths.
* bzrlib/tests/test_sftp_transport.py:
(SFTPTransportTestRelative.test__remote_path): Use
assertIsSameRealPath.
------------------------------------------------------------
revno: 2823.1.13
merged: v.ladeuil+lp at free.fr-20070924085356-g7mx4wdj2np35j37
parent: v.ladeuil+lp at free.fr-20070924084931-cce6o30w898zxs3z
parent: pqm at pqm.ubuntu.com-20070924042807-nfjwj1voh6a8zddf
committer: Vincent Ladeuil <v.ladeuil+lp at free.fr>
branch nick: osx.clean
timestamp: Mon 2007-09-24 10:53:56 +0200
message:
Merge bzr.dev
------------------------------------------------------------
revno: 2823.1.12
merged: v.ladeuil+lp at free.fr-20070924084931-cce6o30w898zxs3z
parent: v.ladeuil+lp at free.fr-20070924084635-j9jaa8543zsjs7x7
committer: Vincent Ladeuil <v.ladeuil+lp at free.fr>
branch nick: osx.clean
timestamp: Mon 2007-09-24 10:49:31 +0200
message:
NEWS should be in alphabetical order.
------------------------------------------------------------
revno: 2823.1.11
merged: v.ladeuil+lp at free.fr-20070924084635-j9jaa8543zsjs7x7
parent: v.ladeuil+lp at free.fr-20070923171824-1nyy7et3vuj96szg
committer: Vincent Ladeuil <v.ladeuil+lp at free.fr>
branch nick: osx.clean
timestamp: Mon 2007-09-24 10:46:35 +0200
message:
Review feedback.
* bzrlib/tests/test_sftp_transport.py:
(SFTPTransportTestRelative.test__remote_path): Add comment to
knownFailure.
* bzrlib/tests/test_bundle.py:
(BundleTester.test_unicode_bundle): Associate bug 141438 to
knownFailure.
* bzrlib/tests/__init__.py:
(TestCase.assertIsSameRealPath): Show apparent paths in addition
to real paths.
------------------------------------------------------------
revno: 2823.1.10
merged: v.ladeuil+lp at free.fr-20070923171824-1nyy7et3vuj96szg
parent: v.ladeuil+lp at free.fr-20070920130159-1y6ey6oy9v6vuzql
parent: pqm at pqm.ubuntu.com-20070922170226-ex2ydmlyboaoj87c
committer: Vincent Ladeuil <v.ladeuil+lp at free.fr>
branch nick: osx.clean
timestamp: Sun 2007-09-23 19:18:24 +0200
message:
merge bzr.dev
------------------------------------------------------------
revno: 2823.1.9
merged: v.ladeuil+lp at free.fr-20070920130159-1y6ey6oy9v6vuzql
parent: v.ladeuil+lp at free.fr-20070920130129-ke3z09tj0dzqy1oq
parent: pqm at pqm.ubuntu.com-20070920125023-upjqmzln7mjtvj1h
committer: Vincent Ladeuil <v.ladeuil+lp at free.fr>
branch nick: osx.pass.test.suite
timestamp: Thu 2007-09-20 15:01:59 +0200
message:
Merge bzr.dev
------------------------------------------------------------
revno: 2823.1.8
merged: v.ladeuil+lp at free.fr-20070920130129-ke3z09tj0dzqy1oq
parent: v.ladeuil+lp at free.fr-20070920111637-ks0vnmps8xmpzm3h
committer: Vincent Ladeuil <v.ladeuil+lp at free.fr>
branch nick: osx.pass.test.suite
timestamp: Thu 2007-09-20 15:01:29 +0200
message:
Rewrite expected failure message
------------------------------------------------------------
revno: 2823.1.7
merged: v.ladeuil+lp at free.fr-20070920111637-ks0vnmps8xmpzm3h
parent: v.ladeuil+lp at free.fr-20070918081400-fx11853zky2twa97
parent: pqm at pqm.ubuntu.com-20070920110135-652zsvb2su692bie
committer: Vincent Ladeuil <v.ladeuil+lp at free.fr>
branch nick: osx.pass.test.suite
timestamp: Thu 2007-09-20 13:16:37 +0200
message:
Merge bzr.dev
------------------------------------------------------------
revno: 2823.1.6
merged: v.ladeuil+lp at free.fr-20070918081400-fx11853zky2twa97
parent: v.ladeuil+lp at free.fr-20070917210847-hneglal34t75toin
committer: Vincent Ladeuil <v.ladeuil+lp at free.fr>
branch nick: osx.pass.test.suite
timestamp: Tue 2007-09-18 10:14:00 +0200
message:
Redo minor fix.
* bzrlib/tests/blackbox/test_too_much.py:
(OldTests.test_bzr): Use assertIsSameRealPath.
------------------------------------------------------------
revno: 2823.1.5
merged: v.ladeuil+lp at free.fr-20070917210847-hneglal34t75toin
parent: v.ladeuil+lp at free.fr-20070917123431-065warglku51y822
parent: pqm at pqm.ubuntu.com-20070917205427-yt8z43qj0756so3p
committer: Vincent Ladeuil <v.ladeuil+lp at free.fr>
branch nick: osx.pass.test.suite
timestamp: Mon 2007-09-17 23:08:47 +0200
message:
Merge bzr.dev.
------------------------------------------------------------
revno: 2823.1.4
merged: v.ladeuil+lp at free.fr-20070917123431-065warglku51y822
parent: v.ladeuil+lp at free.fr-20070915110822-qamlabd07hmima6i
committer: Vincent Ladeuil <v.ladeuil+lp at free.fr>
branch nick: osx.pass.test.suite
timestamp: Mon 2007-09-17 14:34:31 +0200
message:
Use assertIsSameRealPath to avoid OSX aliasing (specifically /tmp
-> /private/tmp).
* bzrlib/tests/__init__.py:
(TestCase.assertIsSameRealPath): New method resolving symlinks
before comparing paths.
* bzrlib/tests/test_selftest.py:
(TestTestCaseInTempDir.test_home_is_not_working,
TestTestCaseWithMemoryTransport.test_home_is_non_existant_dir_under_root,
TestTestCaseWithMemoryTransport.test_cwd_is_TEST_ROOT): Use
assertIsSameRealPath.
* bzrlib/tests/test_plugins.py:
(TestPlugins.test_trivial_plugin_get_path): Use assertIsSameRealPath.
* bzrlib/tests/test_sftp_transport.py:
(SFTPTransportTestRelative.test__remote_path): The test should be
totally rewritten for OSX. Marking it as know failure in the
interim.
------------------------------------------------------------
revno: 2823.1.3
merged: v.ladeuil+lp at free.fr-20070915110822-qamlabd07hmima6i
parent: v.ladeuil+lp at free.fr-20070914135618-72gmt7at7xx4utmp
committer: Vincent Ladeuil <v.ladeuil+lp at free.fr>
branch nick: osx.pass.test.suite
timestamp: Sat 2007-09-15 13:08:22 +0200
message:
WorkingTree3 unicode related expected failure.
* bzrlib/tests/test_bundle.py:
(BundleTester.test_unicode_bundle): Catch expected test failure
earlier. This one may need more investigation.
------------------------------------------------------------
revno: 2823.1.2
merged: v.ladeuil+lp at free.fr-20070914135618-72gmt7at7xx4utmp
parent: v.ladeuil+lp at free.fr-20070914135401-jonrm5thoh4vqt0e
committer: Vincent Ladeuil <v.ladeuil+lp at free.fr>
branch nick: osx.pass.test.suite
timestamp: Fri 2007-09-14 15:56:18 +0200
message:
Minor fix.
* bzrlib/tests/blackbox/test_too_much.py:
(OldTests.test_bzr): On OSX ,/tmp is really /private/tmp.
------------------------------------------------------------
revno: 2823.1.1
merged: v.ladeuil+lp at free.fr-20070914135401-jonrm5thoh4vqt0e
parent: pqm at pqm.ubuntu.com-20070914082550-j9aknobh4x00qksk
parent: v.ladeuil+lp at free.fr-20070914111435-i0hy1wvvtjyttxas
committer: Vincent Ladeuil <v.ladeuil+lp at free.fr>
branch nick: osx.pass.test.suite
timestamp: Fri 2007-09-14 15:54:01 +0200
message:
Merge fix for #59150 as we want to test without medusa and without parmiko
=== modified file 'NEWS'
--- a/NEWS 2007-09-24 02:29:44 +0000
+++ b/NEWS 2007-09-24 09:40:01 +0000
@@ -59,30 +59,34 @@
BUG FIXES:
- * The basename, not the full path, is now used when checking whether
- the profiling dump file begins with ``callgrind.out`` or not. This
- fixes a bug reported by Aaron Bentley on IRC. (Ian Clatworthy)
-
* Commands reporting exceptions can now be profiled and still have their
data correctly dumped to a file. For example, a ``bzr commit`` with
no changes still reports the operation as pointless but doing so no
longer throws away the profiling data if this command is run with
``--lsprof-file callgrind.out.ci`` say. (Ian Clatworthy)
- * HttpServer and FtpServer need to be closed properly or a listening socket
- will remain opened.
- (Vincent Ladeuil, #140055)
-
- * Fix commit ordering in corner case (Aaron Bentley, #94975)
-
* Fallback to ftp when paramiko is not installed and sftp can't be used for
``tests/commands`` so that the test suite is still usable without
paramiko.
(Vincent Ladeuil, #59150)
+ * Fix commit ordering in corner case (Aaron Bentley, #94975)
+
* Fix selftest semi-random noise during http related tests.
(Vincent Ladeuil, #140614)
+ * Fix failing test by comparing real paths to cover the case where the TMPDIR
+ contains a symbolic link.
+ (Vincent Ladeuil, #141382).
+
+ * HttpServer and FtpServer need to be closed properly or a listening socket
+ will remain opened.
+ (Vincent Ladeuil, #140055)
+
+ * The basename, not the full path, is now used when checking whether
+ the profiling dump file begins with ``callgrind.out`` or not. This
+ fixes a bug reported by Aaron Bentley on IRC. (Ian Clatworthy)
+
* Trivial fix for invoking command ``reconfigure`` without arguments.
(Rob Weir, #141629)
=== modified file 'bzrlib/tests/__init__.py'
--- a/bzrlib/tests/__init__.py 2007-09-21 12:30:48 +0000
+++ b/bzrlib/tests/__init__.py 2007-09-24 08:46:35 +0000
@@ -982,6 +982,12 @@
self.assertEqual(mode, actual_mode,
'mode of %r incorrect (%o != %o)' % (path, mode, actual_mode))
+ def assertIsSameRealPath(self, path1, path2):
+ """Fail if path1 and path2 points to different files"""
+ self.assertEqual(osutils.realpath(path1),
+ osutils.realpath(path2),
+ "apparent paths:\na = %s\nb = %s\n," % (path1, path2))
+
def assertIsInstance(self, obj, kls):
"""Fail if obj is not an instance of kls"""
if not isinstance(obj, kls):
=== modified file 'bzrlib/tests/blackbox/test_too_much.py'
--- a/bzrlib/tests/blackbox/test_too_much.py 2007-08-06 08:25:46 +0000
+++ b/bzrlib/tests/blackbox/test_too_much.py 2007-09-18 08:14:00 +0000
@@ -386,8 +386,8 @@
chdir('branch1')
self.run_bzr('init')
- self.assertEquals(self.run_bzr('root')[0].rstrip(),
- pathjoin(self.test_dir, 'branch1'))
+ self.assertIsSameRealPath(self.run_bzr('root')[0].rstrip(),
+ pathjoin(self.test_dir, 'branch1'))
progress("status of new file")
=== modified file 'bzrlib/tests/test_bundle.py'
--- a/bzrlib/tests/test_bundle.py 2007-08-17 16:19:09 +0000
+++ b/bzrlib/tests/test_bundle.py 2007-09-24 08:46:35 +0000
@@ -44,7 +44,6 @@
from bzrlib.tests import (TestCaseInTempDir, TestCaseWithTransport,
TestCase, TestSkipped, test_commit)
from bzrlib.transform import TreeTransform
-from bzrlib.workingtree import WorkingTree
class MockTree(object):
@@ -795,6 +794,10 @@
rev_id='i18n-1', committer=u'William Dod\xe9')
if sys.platform == 'darwin':
+ from bzrlib.workingtree import WorkingTree3
+ if type(self.tree1) is WorkingTree3:
+ self.knownFailure("Bug #141438: fails for WorkingTree3 on OSX")
+
# On Mac the '\xe9' gets changed to 'e\u0301'
self.assertEqual([u'.bzr', u'with Dode\u0301'],
sorted(os.listdir(u'b1')))
=== modified file 'bzrlib/tests/test_plugins.py'
--- a/bzrlib/tests/test_plugins.py 2007-09-21 12:30:48 +0000
+++ b/bzrlib/tests/test_plugins.py 2007-09-23 17:18:24 +0000
@@ -241,7 +241,7 @@
plugins = bzrlib.plugin.plugins()
plugin = plugins['plugin']
plugin_path = self.test_dir + '/plugin.py'
- self.assertEqual(plugin_path, normpath(plugin.path()))
+ self.assertIsSameRealPath(plugin_path, normpath(plugin.path()))
def test_no_test_suite_gives_None_for_test_suite(self):
self.setup_plugin()
=== modified file 'bzrlib/tests/test_selftest.py'
--- a/bzrlib/tests/test_selftest.py 2007-09-03 04:35:49 +0000
+++ b/bzrlib/tests/test_selftest.py 2007-09-17 12:34:31 +0000
@@ -564,8 +564,8 @@
def test_home_is_not_working(self):
self.assertNotEqual(self.test_dir, self.test_home_dir)
cwd = osutils.getcwd()
- self.assertEqual(self.test_dir, cwd)
- self.assertEqual(self.test_home_dir, os.environ['HOME'])
+ self.assertIsSameRealPath(self.test_dir, cwd)
+ self.assertIsSameRealPath(self.test_home_dir, os.environ['HOME'])
class TestTestCaseWithMemoryTransport(TestCaseWithMemoryTransport):
@@ -579,14 +579,15 @@
few tests should need to do that), and having a missing dir as home is
an effective way to ensure that this is the case.
"""
- self.assertEqual(self.TEST_ROOT + "/MemoryTransportMissingHomeDir",
+ self.assertIsSameRealPath(
+ self.TEST_ROOT + "/MemoryTransportMissingHomeDir",
self.test_home_dir)
- self.assertEqual(self.test_home_dir, os.environ['HOME'])
+ self.assertIsSameRealPath(self.test_home_dir, os.environ['HOME'])
def test_cwd_is_TEST_ROOT(self):
- self.assertEqual(self.test_dir, self.TEST_ROOT)
+ self.assertIsSameRealPath(self.test_dir, self.TEST_ROOT)
cwd = osutils.getcwd()
- self.assertEqual(self.test_dir, cwd)
+ self.assertIsSameRealPath(self.test_dir, cwd)
def test_make_branch_and_memory_tree(self):
"""In TestCaseWithMemoryTransport we should not make the branch on disk.
=== modified file 'bzrlib/tests/test_sftp_transport.py'
--- a/bzrlib/tests/test_sftp_transport.py 2007-09-14 09:38:52 +0000
+++ b/bzrlib/tests/test_sftp_transport.py 2007-09-24 09:40:01 +0000
@@ -108,6 +108,16 @@
"""Test the SFTP transport with homedir based relative paths."""
def test__remote_path(self):
+ if sys.platform == 'darwin':
+ # This test is about sftp absolute path handling. There is already
+ # (in this test) a TODO about windows needing an absolute path
+ # without drive letter. To me, using self.test_dir is a trick to
+ # get an absolute path for comparison purposes. That fails for OSX
+ # because the sftp server doesn't resolve the links (and it doesn't
+ # have to). --vila 20070924
+ self.knownFailure('Mac OSX symlinks /tmp to /private/tmp,'
+ ' testing against self.test_dir'
+ ' is not appropriate')
t = self.get_transport()
# This test require unix-like absolute path
test_dir = self.test_dir
@@ -118,12 +128,14 @@
test_dir = '/' + test_dir
# try what is currently used:
# remote path = self._abspath(relpath)
- self.assertEqual(test_dir + '/relative', t._remote_path('relative'))
+ self.assertIsSameRealPath(test_dir + '/relative',
+ t._remote_path('relative'))
# we dont os.path.join because windows gives us the wrong path
root_segments = test_dir.split('/')
root_parent = '/'.join(root_segments[:-1])
# .. should be honoured
- self.assertEqual(root_parent + '/sibling', t._remote_path('../sibling'))
+ self.assertIsSameRealPath(root_parent + '/sibling',
+ t._remote_path('../sibling'))
# / should be illegal ?
### FIXME decide and then test for all transports. RBC20051208
More information about the bazaar-commits
mailing list