/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to tests/test_upload.py

Allow ignoring files and directories for upload with a .bzrupload-ignore file (Martin Albisetti)

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# Copyright (C) 2008 Canonical Ltd
 
1
# Copyright (C) 2008, 2009 Canonical Ltd
2
2
#
3
3
# This program is free software; you can redistribute it and/or modify
4
4
# it under the terms of the GNU General Public License as published by
449
449
        self.assertUpFileEqual('baz', 'dir/goodbye')
450
450
        self.assertUpFileEqual('foo', 'dir/hello')
451
451
 
 
452
    def test_ignore_file(self):
 
453
        self.make_branch_and_working_tree()
 
454
        self.do_full_upload()
 
455
        self.add_file('.bzrignore-upload','foo')
 
456
        self.add_file('foo', 'bar')
 
457
 
 
458
        self.do_upload()
 
459
 
 
460
        self.failIfUpFileExists('foo')
 
461
 
 
462
    def test_ignore_directory(self):
 
463
        self.make_branch_and_working_tree()
 
464
        self.do_full_upload()
 
465
        self.add_file('.bzrignore-upload','dir')
 
466
        self.add_dir('dir')
 
467
 
 
468
        self.do_upload()
 
469
 
 
470
        self.failIfUpFileExists('dir')
 
471
 
452
472
 
453
473
class TestFullUpload(tests.TestCaseWithTransport, TestUploadMixin):
454
474