/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): Jelmer Vernooij
  • Date: 2020-06-01 21:57:00 UTC
  • mfrom: (7490.39.3 move-launchpad)
  • Revision ID: breezy.the.bot@gmail.com-20200601215700-joxuzo6w172gq74v
Move launchpad hoster support to the launchpad plugin.

Merged from https://code.launchpad.net/~jelmer/brz/move-launchpad/+merge/384931

Show diffs side-by-side

added added

removed removed

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