changeset 5139:18abf13064cb

Move debugsvnlog to subversion module.
author Thomas Arendsen Hein <thomas@intevation.de>
date Tue, 07 Aug 2007 09:49:07 +0200
parents 9cda2315c7a9
children 792c1d979097
files hgext/convert/__init__.py hgext/convert/subversion.py
diffstat 2 files changed, 14 insertions(+), 12 deletions(-) [+]
line wrap: on
line diff
--- 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":
--- 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):