~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_permissions.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2006-09-10 18:57:20 UTC
  • mfrom: (1910.2.48 format-bumps)
  • Revision ID: pqm@pqm.ubuntu.com-20060910185720-1bcc17b99fe77687
Add new format to support nested trees

Show diffs side-by-side

added added

removed removed

Lines of Context:
34
34
import sys
35
35
import stat
36
36
from cStringIO import StringIO
 
37
import urllib
37
38
 
38
39
from bzrlib.branch import Branch
39
40
from bzrlib.bzrdir import BzrDir
72
73
        test.assertTransportMode(t, base, dir_mode)
73
74
    for root, dirs, files in os.walk(base):
74
75
        for d in dirs:
75
 
            p = os.path.join(root, d)
 
76
            p = '/'.join([urllib.quote(x) for x in root.split('/\\') + [d]])
76
77
            test.assertTransportMode(t, p, dir_mode)
77
78
        for f in files:
78
79
            p = os.path.join(root, f)
 
80
            p = '/'.join([urllib.quote(x) for x in root.split('/\\') + [f]])
79
81
            test.assertTransportMode(t, p, file_mode)
80
82
 
81
83
 
88
90
        t = self.make_branch_and_tree('.')
89
91
        b = t.branch
90
92
        open('a', 'wb').write('foo\n')
91
 
        t.add('a')
 
93
        # ensure check_mode_r works with capital-letter file-ids like TREE_ROOT
 
94
        t.add('a', 'CAPS-ID')
92
95
        t.commit('foo')
93
96
 
94
97
        chmod_r('.bzr', 0644, 0755)