[MERGE] Fix non-recursive ls with path argument

John Arbash Meinel john at arbash-meinel.com
Wed Apr 8 19:08:11 BST 2009


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Jelmer Vernooij wrote:
> Ian Clatworthy wrote:
>> Vote 1 for progressive disclosure.
>>
>> The main issue here is that I've completely removed
>> the --non-recursive option as explained in the NEWS
>> item. This is a rarely used command so I feel that
>> clearing flagging this as a compatibility break in NEWS
>> is good enough. The alternative is to keep the option
>> and somehow hide/deprecate it? I'm happy to take advice
>> on this.
> 
> This change seems to've exposed a bug in "bzr ls" when it gets a path
> argument and non-recursive mode is enabled.
> 
> "bzr ls <arg>" is broken in bzr. It will just not print anything.
> "bzr ls" in the same directory works fine
> 
> This is a regression in bzr.dev, it's not in bzr 1.14. It's fixed by the
> attached patch.
> 
> Cheers,
> 
> Jelmer
> 

BB:tweak

+
+    def test_ls_path_nonrecursive(self):
+        self.ls_equals('%s/.bzrignore\n' % self.test_dir +
+                       '%s/a\n' % self.test_dir,
+                       self.test_dir, recursive=False)

^- I think the test might be easier to read as:

+        self.ls_equals('%s/.bzrignore\n'
+                       '%s/a\n'
+                       % (self.test_dir, self.test_dir),
+                       self.test_dir, recursive=False)

Also, I wonder if we need to actually be testing a subdir of the
test_dir, rather than just testing that "bzr ls branch/" works.
(Considering that 'relpath' in that case is the empty string.)

John
=:->
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Cygwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAknc6AsACgkQJdeBCYSNAANCEwCgjTS3jQ+ZSE/wjpB/KwjVXBEQ
7qQAn0DXVV/sMbKj6FHravGDK5UpFkI2
=6syh
-----END PGP SIGNATURE-----



More information about the bazaar mailing list