##// END OF EJS Templates
code: fixed deprecated octal calls for py3 compat.
marcink -
r3268:6e0a80a7 default
parent child Browse files
Show More
@@ -63,7 +63,7 b' def maybe_create_history_store(event):'
63 63 settings = event.app.registry.settings
64 64 history_dir = settings.get('channelstream.history.location', '')
65 65 if history_dir and not os.path.exists(history_dir):
66 os.makedirs(history_dir, 0750)
66 os.makedirs(history_dir, 0o750)
67 67
68 68
69 69 def includeme(config):
@@ -476,7 +476,7 b' def _sanitize_cache_settings(settings):'
476 476
477 477 # ensure we have our dir created
478 478 if not os.path.isdir(default_cache_dir):
479 os.makedirs(default_cache_dir, mode=0755)
479 os.makedirs(default_cache_dir, mode=0o755)
480 480
481 481 # exception store cache
482 482 _string_setting(
@@ -50,8 +50,8 b' from rhodecode.lib.vcs.exceptions import'
50 50 log = logging.getLogger(__name__)
51 51
52 52
53 FILEMODE_DEFAULT = 0100644
54 FILEMODE_EXECUTABLE = 0100755
53 FILEMODE_DEFAULT = 0o100644
54 FILEMODE_EXECUTABLE = 0o100755
55 55
56 56 Reference = collections.namedtuple('Reference', ('type', 'name', 'commit_id'))
57 57 MergeResponse = collections.namedtuple(
@@ -209,7 +209,7 b' class BaseRepository(object):'
209 209 def get_create_shadow_cache_pr_path(self, db_repo):
210 210 path = db_repo.cached_diffs_dir
211 211 if not os.path.exists(path):
212 os.makedirs(path, 0755)
212 os.makedirs(path, 0o755)
213 213 return path
214 214
215 215 @classmethod
@@ -1046,7 +1046,7 b' class BaseCommit(object):'
1046 1046 ('tags', ','.join(self.tags)),
1047 1047 ]
1048 1048 meta = ["%s:%s" % (f_name, value) for f_name, value in metadata]
1049 file_info.append(('.archival.txt', 0644, False, '\n'.join(meta)))
1049 file_info.append(('.archival.txt', 0o644, False, '\n'.join(meta)))
1050 1050
1051 1051 connection.Hg.archive_repo(file_path, mtime, file_info, kind)
1052 1052
@@ -161,7 +161,7 b' class GitRepository(BaseRepository):'
161 161 GitRepository.check_url(src_url, self.config)
162 162
163 163 if create:
164 os.makedirs(self.path, mode=0755)
164 os.makedirs(self.path, mode=0o755)
165 165
166 166 if bare:
167 167 self._remote.init_bare()
@@ -355,7 +355,7 b' class MercurialRepository(BaseRepository'
355 355 create = False
356 356
357 357 if create:
358 os.makedirs(self.path, mode=0755)
358 os.makedirs(self.path, mode=0o755)
359 359
360 360 self._remote.localrepository(create)
361 361
@@ -181,7 +181,7 b' class RepoGroupModel(BaseModel):'
181 181 self.check_exist_filesystem(group_name)
182 182 create_path = os.path.join(self.repos_path, group_name)
183 183 log.debug('creating new group in %s', create_path)
184 os.makedirs(create_path, mode=0755)
184 os.makedirs(create_path, mode=0o755)
185 185 log.debug('created group in %s', create_path)
186 186
187 187 def _rename_group(self, old, new):
@@ -538,7 +538,7 b' TODO: To be written...'
538 538 'sys.exit(1)',
539 539 ]
540 540 f.write('\n'.join(script_lines))
541 os.chmod(hook_path, 0755)
541 os.chmod(hook_path, 0o755)
542 542
543 543 def test_local_push_does_not_execute_hook(self):
544 544 target_repo = self.get_empty_repo()
@@ -1061,7 +1061,7 b' class TestGitSpecificWithRepo(BackendTes'
1061 1061 FileNode('foobar/static/js/admin/base.js', content='base'),
1062 1062 FileNode(
1063 1063 'foobar/static/admin', content='admin',
1064 mode=0120000), # this is a link
1064 mode=0o120000), # this is a link
1065 1065 FileNode('foo', content='foo'),
1066 1066 ],
1067 1067 },
@@ -190,13 +190,13 b' class TestNodeBasics:'
190 190 assert not mode & stat.S_IXOTH
191 191
192 192 def test_file_node_is_executable(self):
193 node = FileNode('foobar', 'empty... almost', mode=0100755)
193 node = FileNode('foobar', 'empty... almost', mode=0o100755)
194 194 assert node.is_executable
195 195
196 node = FileNode('foobar', 'empty... almost', mode=0100500)
196 node = FileNode('foobar', 'empty... almost', mode=0o100500)
197 197 assert node.is_executable
198 198
199 node = FileNode('foobar', 'empty... almost', mode=0100644)
199 node = FileNode('foobar', 'empty... almost', mode=0o100644)
200 200 assert not node.is_executable
201 201
202 202 def test_file_node_is_not_symlink(self):
General Comments 0
You need to be logged in to leave comments. Login now