[MERGE] Fix non-recursive ls with path argument

Jelmer Vernooij jelmer at vernstok.nl
Wed Apr 8 19:25:01 BST 2009


John Arbash Meinel wrote:
> 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

Thanks :-)

> +        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.)
It also breaks for the root (and the current test fails when run in
bzr.dev without my fix), since prefix will contain a / (and that / would
end up in fp).

Cheers,

Jelmer



More information about the bazaar mailing list