~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_permissions.py

  • Committer: Aaron Bentley
  • Date: 2006-08-24 13:40:32 UTC
  • mto: (1910.2.43 format-bumps)
  • mto: This revision was merged to the branch mainline in revision 1997.
  • Revision ID: abentley@panoramicfeedback.com-20060824134032-a0697d7c3604756b
Handle capital-letter file-ids

Show diffs side-by-side

added added

removed removed

Lines of Context:
34
34
import sys
35
35
import stat
36
36
from StringIO 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)