~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/per_workingtree/test_executable.py

  • Committer: Ross Lagerwall
  • Date: 2012-08-07 06:32:51 UTC
  • mto: (6437.63.5 2.5)
  • mto: This revision was merged to the branch mainline in revision 6558.
  • Revision ID: rosslagerwall@gmail.com-20120807063251-x9p03ghg2ws8oqjc
Add bzrlib/locale to .bzrignore

bzrlib/locale is generated with ./setup.py build_mo which is in turn called
by ./setup.py build

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# Copyright (C) 2006, 2007, 2009, 2011, 2012, 2016 Canonical Ltd
 
1
# Copyright (C) 2006 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
58
58
        tree.lock_read()
59
59
        if not ignore_inv:
60
60
            self.assertEqual(
61
 
                [('', tree.root_inventory.root)],
62
 
                list(tree.root_inventory.iter_entries()))
 
61
                [('', tree.inventory.root)],
 
62
                list(tree.inventory.iter_entries()))
63
63
        self.assertFalse(tree.has_id(self.a_id))
64
64
        self.assertFalse(tree.has_filename('a'))
65
65
        self.assertFalse(tree.has_id(self.b_id))
71
71
        self.wt.commit('adding a,b', rev_id='r1')
72
72
        # Now make sure that 'bzr branch' also preserves the
73
73
        # executable bit
74
 
        dir2 = self.wt.branch.bzrdir.sprout('b2', revision_id='r1')
 
74
        # TODO: Maybe this should be a blackbox test
 
75
        dir2 = self.wt.branch.bzrdir.clone('b2', revision_id='r1')
75
76
        wt2 = dir2.open_workingtree()
76
77
        self.assertEqual(['r1'], wt2.get_parent_ids())
77
78
        self.assertEqual('r1', wt2.branch.last_revision())
147
148
 
148
149
        # Make sure pull will delete the files
149
150
        wt2.pull(self.wt.branch)
150
 
        self.assertEqual(['r2'], wt2.get_parent_ids())
151
 
        self.assertEqual('r2', wt2.branch.last_revision())
 
151
        self.assertEquals(['r2'], wt2.get_parent_ids())
 
152
        self.assertEquals('r2', wt2.branch.last_revision())
152
153
        self.check_empty(wt2)
153
154
 
154
155
        # Now restore the files on the first branch and commit
161
162
        self.check_exist(self.wt)
162
163
 
163
164
        wt2.pull(self.wt.branch)
164
 
        self.assertEqual(['r3'], wt2.get_parent_ids())
165
 
        self.assertEqual('r3', wt2.branch.last_revision())
 
165
        self.assertEquals(['r3'], wt2.get_parent_ids())
 
166
        self.assertEquals('r3', wt2.branch.last_revision())
166
167
        self.check_exist(wt2)
167
168
 
168
169
    def test_08_no_op_revert(self):
180
181
            self.wt._is_executable_from_path_and_stat_from_basis
181
182
        rev_id1 = self.wt.commit('one')
182
183
        rev_tree1 = self.wt.branch.repository.revision_tree(rev_id1)
183
 
        a_executable = rev_tree1.root_inventory[self.a_id].executable
184
 
        b_executable = rev_tree1.root_inventory[self.b_id].executable
 
184
        a_executable = rev_tree1.inventory[self.a_id].executable
 
185
        b_executable = rev_tree1.inventory[self.b_id].executable
185
186
        self.assertIsNot(None, a_executable)
186
187
        self.assertTrue(a_executable)
187
188
        self.assertIsNot(None, b_executable)