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