Show More
@@ -158,7 +158,7 b' api_access_controllers_whitelist =' | |||
|
158 | 158 | |
|
159 | 159 | ## default encoding used to convert from and to unicode |
|
160 | 160 | ## can be also a comma separated list of encoding in case of mixed encodings |
|
161 | default_encoding = utf8 | |
|
161 | default_encoding = utf-8 | |
|
162 | 162 | |
|
163 | 163 | ## Set Mercurial encoding, similar to setting HGENCODING before launching Kallithea |
|
164 | 164 | hgencoding = utf-8 |
@@ -475,7 +475,7 b' def show_id(cs):' | |||
|
475 | 475 | |
|
476 | 476 | def fmt_date(date): |
|
477 | 477 | if date: |
|
478 | return date.strftime("%Y-%m-%d %H:%M:%S").decode('utf8') | |
|
478 | return date.strftime("%Y-%m-%d %H:%M:%S").decode('utf-8') | |
|
479 | 479 | |
|
480 | 480 | return "" |
|
481 | 481 |
@@ -176,7 +176,7 b' class GitRepository(object):' | |||
|
176 | 176 | update_server_info(repo._repo) |
|
177 | 177 | |
|
178 | 178 | resp = Response() |
|
179 | resp.content_type = 'application/x-%s-result' % git_command.encode('utf8') | |
|
179 | resp.content_type = 'application/x-%s-result' % git_command.encode('utf-8') | |
|
180 | 180 | resp.charset = None |
|
181 | 181 | resp.app_iter = out |
|
182 | 182 | return resp |
@@ -252,7 +252,7 b' api_access_controllers_whitelist =' | |||
|
252 | 252 | |
|
253 | 253 | <%text>## default encoding used to convert from and to unicode</%text> |
|
254 | 254 | <%text>## can be also a comma separated list of encoding in case of mixed encodings</%text> |
|
255 | default_encoding = utf8 | |
|
255 | default_encoding = utf-8 | |
|
256 | 256 | |
|
257 | 257 | <%text>## Set Mercurial encoding, similar to setting HGENCODING before launching Kallithea</%text> |
|
258 | 258 | hgencoding = utf-8 |
@@ -435,7 +435,7 b' def set_vcs_config(config):' | |||
|
435 | 435 | conf.settings.GIT_EXECUTABLE_PATH = config.get('git_path', 'git') |
|
436 | 436 | conf.settings.GIT_REV_FILTER = config.get('git_rev_filter', '--all').strip() |
|
437 | 437 | conf.settings.DEFAULT_ENCODINGS = aslist(config.get('default_encoding', |
|
438 | 'utf8'), sep=',') | |
|
438 | 'utf-8'), sep=',') | |
|
439 | 439 | |
|
440 | 440 | |
|
441 | 441 | def set_indexer_config(config): |
@@ -176,7 +176,7 b' def safe_unicode(str_, from_encoding=Non' | |||
|
176 | 176 | if not from_encoding: |
|
177 | 177 | import kallithea |
|
178 | 178 | DEFAULT_ENCODINGS = aslist(kallithea.CONFIG.get('default_encoding', |
|
179 | 'utf8'), sep=',') | |
|
179 | 'utf-8'), sep=',') | |
|
180 | 180 | from_encoding = DEFAULT_ENCODINGS |
|
181 | 181 | |
|
182 | 182 | if not isinstance(from_encoding, (list, tuple)): |
@@ -225,7 +225,7 b' def safe_str(unicode_, to_encoding=None)' | |||
|
225 | 225 | if not to_encoding: |
|
226 | 226 | import kallithea |
|
227 | 227 | DEFAULT_ENCODINGS = aslist(kallithea.CONFIG.get('default_encoding', |
|
228 | 'utf8'), sep=',') | |
|
228 | 'utf-8'), sep=',') | |
|
229 | 229 | to_encoding = DEFAULT_ENCODINGS |
|
230 | 230 | |
|
231 | 231 | if not isinstance(to_encoding, (list, tuple)): |
@@ -53,7 +53,7 b' class MercurialInMemoryChangeset(BaseInM' | |||
|
53 | 53 | for node in self.added: |
|
54 | 54 | if node.path == path: |
|
55 | 55 | return memfilectx(_repo, memctx, path=node.path, |
|
56 | data=(node.content.encode('utf8') | |
|
56 | data=(node.content.encode('utf-8') | |
|
57 | 57 | if not node.is_binary else node.content), |
|
58 | 58 | islink=False, |
|
59 | 59 | isexec=node.is_executable, |
@@ -63,7 +63,7 b' class MercurialInMemoryChangeset(BaseInM' | |||
|
63 | 63 | for node in self.changed: |
|
64 | 64 | if node.path == path: |
|
65 | 65 | return memfilectx(_repo, memctx, path=node.path, |
|
66 | data=(node.content.encode('utf8') | |
|
66 | data=(node.content.encode('utf-8') | |
|
67 | 67 | if not node.is_binary else node.content), |
|
68 | 68 | islink=False, |
|
69 | 69 | isexec=node.is_executable, |
@@ -17,7 +17,7 b' if os.path.isdir(VCSRC_PATH):' | |||
|
17 | 17 | VCSRC_PATH = os.path.join(VCSRC_PATH, '__init__.py') |
|
18 | 18 | |
|
19 | 19 | # list of default encoding used in safe_unicode/safe_str methods |
|
20 | DEFAULT_ENCODINGS = aslist('utf8') | |
|
20 | DEFAULT_ENCODINGS = aslist('utf-8') | |
|
21 | 21 | |
|
22 | 22 | # path to git executable run by run_git_command function |
|
23 | 23 | GIT_EXECUTABLE_PATH = 'git' |
@@ -1,4 +1,4 b'' | |||
|
1 | # encoding: utf8 | |
|
1 | # encoding: utf-8 | |
|
2 | 2 | """ |
|
3 | 3 | Tests so called "in memory changesets" commit API of vcs. |
|
4 | 4 | """ |
@@ -143,7 +143,7 b' def sortkey(x):' | |||
|
143 | 143 | return (x[0] and -int(x[0][-1]), |
|
144 | 144 | x[0] and int(x[0][0]), |
|
145 | 145 | -len(x[0]), |
|
146 | x[1].decode('utf8').lower().replace(u'\xe9', u'e').replace(u'\u0142', u'l') | |
|
146 | x[1].decode('utf-8').lower().replace(u'\xe9', u'e').replace(u'\u0142', u'l') | |
|
147 | 147 | ) |
|
148 | 148 | |
|
149 | 149 |
General Comments 0
You need to be logged in to leave comments.
Login now