~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_testament.py

  • Committer: Alexander Belchenko
  • Date: 2006-10-14 08:51:07 UTC
  • mto: (2080.1.1 jam-integration)
  • mto: This revision was merged to the branch mainline in revision 2081.
  • Revision ID: bialix@ukr.net-20061014085107-8dff865674eed30a
win32 installer: make short info page instead of full GPL license text

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# Copyright (C) 2005, 2006 Canonical Ltd
 
1
# Copyright (C) 2005-2006 by 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
21
21
import os
22
22
from sha import sha
23
23
 
24
 
from bzrlib.tests import SymlinkFeature, TestCaseWithTransport
 
24
from bzrlib.tests import TestCaseWithTransport
25
25
from bzrlib.testament import Testament, StrictTestament, StrictTestament3
26
26
from bzrlib.transform import TreeTransform
 
27
from bzrlib.osutils import has_symlinks
27
28
 
28
29
 
29
30
class TestamentSetup(TestCaseWithTransport):
30
31
 
31
32
    def setUp(self):
32
33
        super(TestamentSetup, self).setUp()
33
 
        self.wt = self.make_branch_and_tree('.', format='dirstate-with-subtree')
34
 
        self.wt.set_root_id('TREE_ROT')
 
34
        self.wt = self.make_branch_and_tree('.')
35
35
        b = self.b = self.wt.branch
36
36
        b.nick = "test branch"
37
37
        self.wt.commit(message='initial null commit',
97
97
 
98
98
    def test_testament_symlinks(self):
99
99
        """Testament containing symlink (where possible)"""
100
 
        self.requireFeature(SymlinkFeature)
 
100
        if not has_symlinks():
 
101
            return
101
102
        os.symlink('wibble/linktarget', 'link')
102
103
        self.wt.add(['link'], ['link-id'])
103
104
        self.wt.commit(message='add symlink',
200
201
message:
201
202
  initial null commit
202
203
inventory:
203
 
  directory . TREE_ROT test@user-1 no
 
204
  directory . TREE_ROOT test@user-1 no
204
205
properties:
205
206
  branch-nick:
206
207
    test branch
279
280
message:
280
281
  add files and directories
281
282
inventory:
282
 
  directory . TREE_ROT test@user-1 no
 
283
  directory . TREE_ROOT test@user-2 no
283
284
  file hello hello-id 34dd0ac19a24bf80c4d33b5c8960196e8d8d1f73 test@user-2 yes
284
285
  directory src src-id test@user-2 no
285
286
  file src/foo.c foo.c-id a2a049c20f908ae31b231d98779eb63c66448f24 test@user-2 no
373
374
message:
374
375
  revision with properties
375
376
inventory:
376
 
  directory . TREE_ROT test@user-1 no
 
377
  directory . TREE_ROOT test@user-3 no
377
378
  file hello hello-id 34dd0ac19a24bf80c4d33b5c8960196e8d8d1f73 test@user-2 yes
378
379
  directory src src-id test@user-2 no
379
380
  file src/foo.c foo.c-id a2a049c20f908ae31b231d98779eb63c66448f24 test@user-2 no
442
443
message:
443
444
  add symlink
444
445
inventory:
445
 
  directory . TREE_ROT test@user-1 no
 
446
  directory . TREE_ROOT test@user-3 no
446
447
  file hello hello-id 34dd0ac19a24bf80c4d33b5c8960196e8d8d1f73 test@user-2 yes
447
448
  symlink link link-id wibble/linktarget test@user-3 no
448
449
  directory src src-id test@user-2 no
508
509
message:
509
510
  non-ascii commit \N{COPYRIGHT SIGN} me
510
511
inventory:
511
 
  directory . TREE_ROT test@user-1 no
 
512
  directory . TREE_ROOT test@user-3 no
512
513
  file hello hello-id 34dd0ac19a24bf80c4d33b5c8960196e8d8d1f73 test@user-2 yes
513
514
  directory src src-id test@user-2 no
514
515
  file src/foo.c foo.c-id a2a049c20f908ae31b231d98779eb63c66448f24 test@user-2 no