##// END OF EJS Templates
convert: set LC_CTYPE around calls to Subversion bindings...
Manuel Jacob -
r45551:5c0d5b48 stable
parent child Browse files
Show More
@@ -187,13 +187,14 b' def debugsvnlog(ui, **opts):'
187 187 """Fetch SVN log in a subprocess and channel them back to parent to
188 188 avoid memory collection issues.
189 189 """
190 if svn is None:
191 raise error.Abort(
192 _(b'debugsvnlog could not load Subversion python bindings')
193 )
190 with util.with_lc_ctype():
191 if svn is None:
192 raise error.Abort(
193 _(b'debugsvnlog could not load Subversion python bindings')
194 )
194 195
195 args = decodeargs(ui.fin.read())
196 get_log_child(ui.fout, *args)
196 args = decodeargs(ui.fin.read())
197 get_log_child(ui.fout, *args)
197 198
198 199
199 200 class logstream(object):
@@ -420,18 +421,19 b' class svn_source(converter_source):'
420 421 self.url = geturl(url)
421 422 self.encoding = b'UTF-8' # Subversion is always nominal UTF-8
422 423 try:
423 self.transport = transport.SvnRaTransport(url=self.url)
424 self.ra = self.transport.ra
425 self.ctx = self.transport.client
426 self.baseurl = svn.ra.get_repos_root(self.ra)
427 # Module is either empty or a repository path starting with
428 # a slash and not ending with a slash.
429 self.module = urlreq.unquote(self.url[len(self.baseurl) :])
430 self.prevmodule = None
431 self.rootmodule = self.module
432 self.commits = {}
433 self.paths = {}
434 self.uuid = svn.ra.get_uuid(self.ra)
424 with util.with_lc_ctype():
425 self.transport = transport.SvnRaTransport(url=self.url)
426 self.ra = self.transport.ra
427 self.ctx = self.transport.client
428 self.baseurl = svn.ra.get_repos_root(self.ra)
429 # Module is either empty or a repository path starting with
430 # a slash and not ending with a slash.
431 self.module = urlreq.unquote(self.url[len(self.baseurl) :])
432 self.prevmodule = None
433 self.rootmodule = self.module
434 self.commits = {}
435 self.paths = {}
436 self.uuid = svn.ra.get_uuid(self.ra)
435 437 except svn.core.SubversionException:
436 438 ui.traceback()
437 439 svnversion = b'%d.%d.%d' % (
@@ -477,7 +479,8 b' class svn_source(converter_source):'
477 479 )
478 480
479 481 try:
480 self.head = self.latest(self.module, latest)
482 with util.with_lc_ctype():
483 self.head = self.latest(self.module, latest)
481 484 except SvnPathNotFound:
482 485 self.head = None
483 486 if not self.head:
@@ -494,6 +497,13 b' class svn_source(converter_source):'
494 497 self.wc = None
495 498 self.convertfp = None
496 499
500 def before(self):
501 self.with_lc_ctype = util.with_lc_ctype()
502 self.with_lc_ctype.__enter__()
503
504 def after(self):
505 self.with_lc_ctype.__exit__(None, None, None)
506
497 507 def setrevmap(self, revmap):
498 508 lastrevs = {}
499 509 for revid in revmap:
General Comments 0
You need to be logged in to leave comments. Login now