Rev 4841: (Benjamin Peterson) avoid extra slashes in 'ls' output when arg ends in file:///home/pqm/archives/thelove/bzr/%2Btrunk/
Canonical.com Patch Queue Manager
pqm at pqm.ubuntu.com
Mon Nov 30 21:23:57 GMT 2009
At file:///home/pqm/archives/thelove/bzr/%2Btrunk/
------------------------------------------------------------
revno: 4841 [merge]
revision-id: pqm at pqm.ubuntu.com-20091130212354-exss9hosbrdvo5tk
parent: pqm at pqm.ubuntu.com-20091130203306-wut4brq0gaith8to
parent: benjamin at python.org-20091130003352-lufmye1ua25d4y34
committer: Canonical.com Patch Queue Manager <pqm at pqm.ubuntu.com>
branch nick: +trunk
timestamp: Mon 2009-11-30 21:23:54 +0000
message:
(Benjamin Peterson) avoid extra slashes in 'ls' output when arg ends
in a slash
modified:
bzrlib/builtins.py builtins.py-20050830033751-fc01482b9ca23183
bzrlib/tests/blackbox/test_ls.py test_ls.py-20060712232047-0jraqpecwngee12y-1
=== modified file 'bzrlib/builtins.py'
--- a/bzrlib/builtins.py 2009-11-30 16:48:40 +0000
+++ b/bzrlib/builtins.py 2009-11-30 21:23:54 +0000
@@ -2513,7 +2513,7 @@
if from_root:
if relpath:
prefix = relpath + '/'
- elif fs_path != '.':
+ elif fs_path != '.' and not fs_path.endswith('/'):
prefix = fs_path + '/'
if revision is not None or tree is None:
=== modified file 'bzrlib/tests/blackbox/test_ls.py'
--- a/bzrlib/tests/blackbox/test_ls.py 2009-05-18 07:48:02 +0000
+++ b/bzrlib/tests/blackbox/test_ls.py 2009-11-30 00:33:52 +0000
@@ -54,6 +54,7 @@
def test_ls_basic(self):
"""Test the abilities of 'bzr ls'"""
self.ls_equals('.bzrignore\na\n')
+ self.ls_equals('.bzrignore\na\n', './')
self.ls_equals('? .bzrignore\n'
'? a\n',
'--verbose')
More information about the bazaar-commits
mailing list