Show More
@@ -48,7 +48,7 b' def install_git_hooks(repo_path, bare, e' | |||||
48 | hooks_path = get_git_hooks_path(repo_path, bare) |
|
48 | hooks_path = get_git_hooks_path(repo_path, bare) | |
49 |
|
49 | |||
50 | if not os.path.isdir(hooks_path): |
|
50 | if not os.path.isdir(hooks_path): | |
51 | os.makedirs(hooks_path, mode=0o777) |
|
51 | os.makedirs(hooks_path, mode=0o777, exist_ok=True) | |
52 |
|
52 | |||
53 | tmpl_post = pkg_resources.resource_string( |
|
53 | tmpl_post = pkg_resources.resource_string( | |
54 | 'vcsserver', '/'.join( |
|
54 | 'vcsserver', '/'.join( | |
@@ -100,7 +100,7 b' def install_svn_hooks(repo_path, executa' | |||||
100 | executable = executable or sys.executable |
|
100 | executable = executable or sys.executable | |
101 | hooks_path = get_svn_hooks_path(repo_path) |
|
101 | hooks_path = get_svn_hooks_path(repo_path) | |
102 | if not os.path.isdir(hooks_path): |
|
102 | if not os.path.isdir(hooks_path): | |
103 | os.makedirs(hooks_path, mode=0o777) |
|
103 | os.makedirs(hooks_path, mode=0o777, exist_ok=True) | |
104 |
|
104 | |||
105 | tmpl_post = pkg_resources.resource_string( |
|
105 | tmpl_post = pkg_resources.resource_string( | |
106 | 'vcsserver', '/'.join( |
|
106 | 'vcsserver', '/'.join( | |
@@ -140,7 +140,7 b' def install_svn_hooks(repo_path, executa' | |||||
140 | def get_version_from_hook(hook_path): |
|
140 | def get_version_from_hook(hook_path): | |
141 | version = b'' |
|
141 | version = b'' | |
142 | hook_content = read_hook_content(hook_path) |
|
142 | hook_content = read_hook_content(hook_path) | |
143 |
matches = re.search(rb' |
|
143 | matches = re.search(rb'RC_HOOK_VER\s*=\s*(.*)', hook_content) | |
144 | if matches: |
|
144 | if matches: | |
145 | try: |
|
145 | try: | |
146 | version = matches.groups()[0] |
|
146 | version = matches.groups()[0] |
General Comments 0
You need to be logged in to leave comments.
Login now