~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_testament.py

  • Committer: Aaron Bentley
  • Date: 2007-02-06 14:52:16 UTC
  • mfrom: (2266 +trunk)
  • mto: This revision was merged to the branch mainline in revision 2268.
  • Revision ID: abentley@panoramicfeedback.com-20070206145216-fcpi8o3ufvuzwbp9
Merge bzr.dev

Show diffs side-by-side

added added

removed removed

Lines of Context:
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 = self.make_branch_and_tree('.')
34
35
        self.wt.set_root_id('TREE_ROT')
35
36
        b = self.b = self.wt.branch
36
37
        b.nick = "test branch"
97
98
 
98
99
    def test_testament_symlinks(self):
99
100
        """Testament containing symlink (where possible)"""
100
 
        self.requireFeature(SymlinkFeature)
 
101
        if not has_symlinks():
 
102
            return
101
103
        os.symlink('wibble/linktarget', 'link')
102
104
        self.wt.add(['link'], ['link-id'])
103
105
        self.wt.commit(message='add symlink',
279
281
message:
280
282
  add files and directories
281
283
inventory:
282
 
  directory . TREE_ROT test@user-1 no
 
284
  directory . TREE_ROT test@user-2 no
283
285
  file hello hello-id 34dd0ac19a24bf80c4d33b5c8960196e8d8d1f73 test@user-2 yes
284
286
  directory src src-id test@user-2 no
285
287
  file src/foo.c foo.c-id a2a049c20f908ae31b231d98779eb63c66448f24 test@user-2 no
373
375
message:
374
376
  revision with properties
375
377
inventory:
376
 
  directory . TREE_ROT test@user-1 no
 
378
  directory . TREE_ROT test@user-3 no
377
379
  file hello hello-id 34dd0ac19a24bf80c4d33b5c8960196e8d8d1f73 test@user-2 yes
378
380
  directory src src-id test@user-2 no
379
381
  file src/foo.c foo.c-id a2a049c20f908ae31b231d98779eb63c66448f24 test@user-2 no
442
444
message:
443
445
  add symlink
444
446
inventory:
445
 
  directory . TREE_ROT test@user-1 no
 
447
  directory . TREE_ROT test@user-3 no
446
448
  file hello hello-id 34dd0ac19a24bf80c4d33b5c8960196e8d8d1f73 test@user-2 yes
447
449
  symlink link link-id wibble/linktarget test@user-3 no
448
450
  directory src src-id test@user-2 no
508
510
message:
509
511
  non-ascii commit \N{COPYRIGHT SIGN} me
510
512
inventory:
511
 
  directory . TREE_ROT test@user-1 no
 
513
  directory . TREE_ROT test@user-3 no
512
514
  file hello hello-id 34dd0ac19a24bf80c4d33b5c8960196e8d8d1f73 test@user-2 yes
513
515
  directory src src-id test@user-2 no
514
516
  file src/foo.c foo.c-id a2a049c20f908ae31b231d98779eb63c66448f24 test@user-2 no