[grep] bug if `pwd` != `bzr root`
Bernhard Voelker
list at bernhard-voelker.de
Wed Jan 9 16:02:57 GMT 2008
Hi,
`bzr grep` only works if the working directory is `bzr root `.
The names of all versioned files are passed to `| xargs -0 grep ...`
using the relative path to
the current checkouts' root directory, but the working directory is not
being changed.
Here is an example:
bzr init A
cd A
mkdir B
echo hello > a_file
echo hello > B/b_file
bzr ci -m 'initial creation'
Committing to: /tmp/A/
added B
added a_file
added B/b_file
Committed revision 1.
bzr grep ll # works because PWD=`bzr root`
B/b_file:hello
a_file:hello
cd B
bzr grep ll # oops!!!
grep: B: No such file or directory
grep: B/b_file: No such file or directory
grep: a_file: No such file or directory
Note for Win32 users:
the grep plugin also works on Win32 if xargs and grep from
unxutils.sf.net are in %PATH%.
;-)
Have a nice day,
Berny
More information about the bazaar
mailing list