~lifeless/ubuntu/lucid/bzr/2.1.2-sru

« back to all changes in this revision

Viewing changes to bzrlib/tests/workingtree_implementations/test_workingtree.py

  • Committer: Bazaar Package Importer
  • Author(s): Jelmer Vernooij
  • Date: 2009-06-27 15:23:34 UTC
  • mfrom: (1.3.1 upstream) (3.1.78 karmic)
  • Revision ID: james.westby@ubuntu.com-20090627152334-u3smexjpaolh96qd
* New upstream release.
* Bump standards version to 3.8.2.

Show diffs side-by-side

added added

removed removed

Lines of Context:
14
14
#
15
15
# You should have received a copy of the GNU General Public License
16
16
# along with this program; if not, write to the Free Software
17
 
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 
17
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
18
18
 
19
19
from cStringIO import StringIO
20
20
import errno
805
805
        # they had when they were first added
806
806
        # create one file of every interesting type
807
807
        tree = self.make_branch_and_tree('.')
 
808
        tree.lock_write()
 
809
        self.addCleanup(tree.unlock)
808
810
        self.build_tree(['file', 'directory/'])
809
811
        names = ['file', 'directory']
810
812
        if has_symlinks():
811
813
            os.symlink('target', 'symlink')
812
814
            names.append('symlink')
813
815
        tree.add(names, [n + '-id' for n in names])
814
 
        if tree.supports_tree_reference():
815
 
            sub_tree = self.make_branch_and_tree('tree-reference')
816
 
            sub_tree.set_root_id('tree-reference-id')
817
 
            sub_tree.commit('message')
818
 
            names.append('tree-reference')
819
 
            tree.add_reference(sub_tree)
820
816
        # now when we first look, we should see everything with the same kind
821
817
        # with which they were initially added
822
818
        for n in names: