##// END OF EJS Templates
templater: swap `\` with `/` to allow the resource logic to kicks in...
marmoute -
r48637:7ab7f73a stable
parent child Browse files
Show More
@@ -1117,6 +1117,13 b' def open_template(name, templatepath=Non'
1117 return f, open(f, mode='rb')
1117 return f, open(f, mode='rb')
1118
1118
1119 # Otherwise try to read it using the resources API
1119 # Otherwise try to read it using the resources API
1120 if pycompat.iswindows:
1121 # quick hack to make sure we can process '/' in the code dealing with
1122 # ressource. Ideally we would make sure we use `/` instead of `ossep`
1123 # in the templater code, but that seems a bigger and less certain
1124 # change that we better left for the default branch.
1125 name_paths = name.split(pycompat.ossep)
1126 name = b'/'.join(name_paths)
1120 name_parts = name.split(b'/')
1127 name_parts = name.split(b'/')
1121 package_name = b'.'.join([b'mercurial', b'templates'] + name_parts[:-1])
1128 package_name = b'.'.join([b'mercurial', b'templates'] + name_parts[:-1])
1122 return (
1129 return (
General Comments 0
You need to be logged in to leave comments. Login now