[patch] exclude .bzrignore from export, this time with tests

John A Meinel john at arbash-meinel.com
Thu Dec 29 16:37:34 GMT 2005


Jamie Wilkinson wrote:
> This one time, at band camp, John A Meinel wrote:
>> Jamie Wilkinson wrote:
>>> I noticed yesterday that the exporters were split apart, and in doing so
>>> they no longer excluded '.bzrignore' from the export.
>>>
>>> I've repatched it now, and added blackbox tests.
>>>
>>> http://repo.spacepants.org/bzr.jaq/
>>>
>>> revno 1524 and 1525
>>>
>>>
>> The tests are appreciated, but need some cleanup before they can be merged.
>>
>> First, you have tab characters in your code. bzrlib code is expected to
>> only have space characters for indentation. There have been some threads
>> about how to configure vim so that it sets 'expandtab' based on the
>> working directory. I'm not sure how to do emacs. But I can repost if you
>> want.
> 
> Oops, I thought I converted them all.
> 
> Fixed and committed to 1526 in the same branch.

Thanks.

> 
>> Thanks for the tests here, but you forgot to test the 'dir exporter'.
> 
> If you've got an idea on how to do that, I'd love to hear it :)

I would just do:

mkdir a
cd a
bzr init
echo a > a
bzr add
bzr commit -m a
bzr ignore 'something'
bzr commit -m "ignoring"

bzr export ../dir_export

cd ..
files = sorted(os.listdir('dir_export'))
self.assertEqual(['a'], files)

Naturally the above needs to be changed into python commands. But I
think it gives the idea. Just do an export to a directory, and make sure
that there is no .bzr/ directory and no .bzrignore file.
If you have the test, it won't re-appear.

> 
>> It hasn't been obvious, and may have only happened recently, but all of
>> the tests are now sorted in alphabetical order. So this should go
>> between test_diff and test_fetch.
> 
> Well, _missing and _too_much aren't in the right order, either :)
> 
> I've reordered them and committed to 1527 in the same branch.
> 
> Actually, I only read your first sentence.  test_diff and test_fetch don't
> appear in the blackbox suite -- test_export isn't an internal test.
> 

Ah, I was looking at the wrong set. Probably blackbox wasn't sorted yet.
But I think it is a good idea to keep it sorted. It means you run into
fewer conflicts with people always adding at the end.

John
=:->


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 249 bytes
Desc: OpenPGP digital signature
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20051229/1599e63d/attachment.pgp 


More information about the bazaar mailing list