# HG changeset patch # User Thomas Arendsen Hein # Date 1186472947 -7200 # Node ID 18abf13064cbcd756f53572b84d8e5b02381c8a5 # Parent 9cda2315c7a9f7e441acf4b7859f7ed1de40adc2 Move debugsvnlog to subversion module. diff -r 9cda2315c7a9 -r 18abf13064cb hgext/convert/__init__.py --- a/hgext/convert/__init__.py Tue Aug 07 09:42:32 2007 +0200 +++ b/hgext/convert/__init__.py Tue Aug 07 09:49:07 2007 +0200 @@ -5,13 +5,13 @@ # This software may be used and distributed according to the terms # of the GNU General Public License, incorporated herein by reference. -from common import NoRepo, converter_source, converter_sink, decodeargs +from common import NoRepo, converter_source, converter_sink from cvs import convert_cvs from git import convert_git from hg import mercurial_source, mercurial_sink -from subversion import convert_svn +from subversion import convert_svn, debugsvnlog -import os, shlex, shutil, sys +import os, shlex, shutil from mercurial import hg, ui, util, commands from mercurial.i18n import _ @@ -433,14 +433,6 @@ opts) c.convert() -def debugsvnlog(ui, **opts): - """Fetch SVN log in a subprocess and channel them back to parent to - avoid memory collection issues. - """ - util.set_binary(sys.stdin) - util.set_binary(sys.stdout) - args = decodeargs(sys.stdin.read()) - subversion.get_log_child(sys.stdout, *args) cmdtable = { "convert": diff -r 9cda2315c7a9 -r 18abf13064cb hgext/convert/subversion.py --- a/hgext/convert/subversion.py Tue Aug 07 09:42:32 2007 +0200 +++ b/hgext/convert/subversion.py Tue Aug 07 09:49:07 2007 +0200 @@ -15,6 +15,7 @@ import locale import os +import sys import cPickle as pickle from mercurial import util @@ -24,7 +25,7 @@ from cStringIO import StringIO -from common import NoRepo, commit, converter_source, encodeargs +from common import NoRepo, commit, converter_source, encodeargs, decodeargs try: from svn.core import SubversionException, Pool @@ -82,6 +83,15 @@ pickle.dump(None, fp, protocol) fp.close() +def debugsvnlog(ui, **opts): + """Fetch SVN log in a subprocess and channel them back to parent to + avoid memory collection issues. + """ + util.set_binary(sys.stdin) + util.set_binary(sys.stdout) + args = decodeargs(sys.stdin.read()) + get_log_child(sys.stdout, *args) + # SVN conversion code stolen from bzr-svn and tailor class convert_svn(converter_source): def __init__(self, ui, url, rev=None):