##// END OF EJS Templates
Move debugsvnlog to subversion module.
Thomas Arendsen Hein -
r5139:18abf130 default
parent child Browse files
Show More
@@ -5,13 +5,13 b''
5 # This software may be used and distributed according to the terms
5 # This software may be used and distributed according to the terms
6 # of the GNU General Public License, incorporated herein by reference.
6 # of the GNU General Public License, incorporated herein by reference.
7
7
8 from common import NoRepo, converter_source, converter_sink, decodeargs
8 from common import NoRepo, converter_source, converter_sink
9 from cvs import convert_cvs
9 from cvs import convert_cvs
10 from git import convert_git
10 from git import convert_git
11 from hg import mercurial_source, mercurial_sink
11 from hg import mercurial_source, mercurial_sink
12 from subversion import convert_svn
12 from subversion import convert_svn, debugsvnlog
13
13
14 import os, shlex, shutil, sys
14 import os, shlex, shutil
15 from mercurial import hg, ui, util, commands
15 from mercurial import hg, ui, util, commands
16 from mercurial.i18n import _
16 from mercurial.i18n import _
17
17
@@ -433,14 +433,6 b' def _convert(ui, src, dest=None, revmapf'
433 opts)
433 opts)
434 c.convert()
434 c.convert()
435
435
436 def debugsvnlog(ui, **opts):
437 """Fetch SVN log in a subprocess and channel them back to parent to
438 avoid memory collection issues.
439 """
440 util.set_binary(sys.stdin)
441 util.set_binary(sys.stdout)
442 args = decodeargs(sys.stdin.read())
443 subversion.get_log_child(sys.stdout, *args)
444
436
445 cmdtable = {
437 cmdtable = {
446 "convert":
438 "convert":
@@ -15,6 +15,7 b''
15
15
16 import locale
16 import locale
17 import os
17 import os
18 import sys
18 import cPickle as pickle
19 import cPickle as pickle
19 from mercurial import util
20 from mercurial import util
20
21
@@ -24,7 +25,7 b' from mercurial import util'
24
25
25 from cStringIO import StringIO
26 from cStringIO import StringIO
26
27
27 from common import NoRepo, commit, converter_source, encodeargs
28 from common import NoRepo, commit, converter_source, encodeargs, decodeargs
28
29
29 try:
30 try:
30 from svn.core import SubversionException, Pool
31 from svn.core import SubversionException, Pool
@@ -82,6 +83,15 b' def get_log_child(fp, url, paths, start,'
82 pickle.dump(None, fp, protocol)
83 pickle.dump(None, fp, protocol)
83 fp.close()
84 fp.close()
84
85
86 def debugsvnlog(ui, **opts):
87 """Fetch SVN log in a subprocess and channel them back to parent to
88 avoid memory collection issues.
89 """
90 util.set_binary(sys.stdin)
91 util.set_binary(sys.stdout)
92 args = decodeargs(sys.stdin.read())
93 get_log_child(sys.stdout, *args)
94
85 # SVN conversion code stolen from bzr-svn and tailor
95 # SVN conversion code stolen from bzr-svn and tailor
86 class convert_svn(converter_source):
96 class convert_svn(converter_source):
87 def __init__(self, ui, url, rev=None):
97 def __init__(self, ui, url, rev=None):
General Comments 0
You need to be logged in to leave comments. Login now