/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 breezy/tests/test_commit.py

  • Committer: Breezy landing bot
  • Author(s): Gustav Hartvigsson
  • Date: 2021-01-10 18:46:30 UTC
  • mfrom: (7526.1.1 brz-removed-api-doc)
  • mto: This revision was merged to the branch mainline in revision 7532.
  • Revision ID: breezy.the.bot@gmail.com-20210110184630-dxu0g9dqq020uiw6
Drop documentation for removed API API.

Merged from https://code.launchpad.net/~gustav-hartvigsson/brz/removed-api-doc/+merge/396033

Show diffs side-by-side

added added

removed removed

Lines of Context:
38
38
    BzrError,
39
39
    LockContention,
40
40
    )
41
 
from ..tree import TreeChange
 
41
from ..bzr.inventorytree import InventoryTreeChange
42
42
from . import (
43
43
    TestCase,
44
44
    TestCaseWithTransport,
529
529
        bound = master.sprout('bound')
530
530
        wt = bound.open_workingtree()
531
531
        wt.branch.set_bound_location(os.path.realpath('master'))
532
 
        master_branch.lock_write()
533
 
        try:
 
532
        with master_branch.lock_write():
534
533
            self.assertRaises(LockContention, wt.commit, 'silly')
535
 
        finally:
536
 
            master_branch.unlock()
537
534
 
538
535
    def test_commit_bound_merge(self):
539
536
        # see bug #43959; commit of a merge in a bound branch fails to push
895
892
 
896
893
    def test_add_file_not_excluded(self):
897
894
        changes = [
898
 
            TreeChange(
 
895
            InventoryTreeChange(
899
896
                'fid', (None, 'newpath'),
900
897
                0, (False, False), ('pid', 'pid'), ('newpath', 'newpath'),
901
898
                ('file', 'file'), (True, True))]
904
901
 
905
902
    def test_add_file_excluded(self):
906
903
        changes = [
907
 
            TreeChange(
 
904
            InventoryTreeChange(
908
905
                'fid', (None, 'newpath'),
909
906
                0, (False, False), ('pid', 'pid'), ('newpath', 'newpath'),
910
907
                ('file', 'file'), (True, True))]
912
909
 
913
910
    def test_delete_file_excluded(self):
914
911
        changes = [
915
 
            TreeChange(
 
912
            InventoryTreeChange(
916
913
                'fid', ('somepath', None),
917
914
                0, (False, None), ('pid', None), ('newpath', None),
918
915
                ('file', None), (True, None))]
920
917
 
921
918
    def test_move_from_or_to_excluded(self):
922
919
        changes = [
923
 
            TreeChange(
 
920
            InventoryTreeChange(
924
921
                'fid', ('oldpath', 'newpath'),
925
922
                0, (False, False), ('pid', 'pid'), ('oldpath', 'newpath'),
926
923
                ('file', 'file'), (True, True))]