Source

hgsubversion hacking / repo-param.diff

# HG changeset patch
# Date 1241177282 -7200

Add a repo parameter to HgChangeReceiver.

diff --git a/svncommands.py b/svncommands.py
--- a/svncommands.py
+++ b/svncommands.py
@@ -24,7 +24,7 @@
     svn = svnwrap.SubversionRepo(svn_url, user, passwd)
     author_host = ui.config('hgsubversion', 'defaulthost', svn.uuid)
     tag_locations = tag_locations.split(',')
-    hg_editor = hg_delta_editor.HgChangeReceiver(hg_repo_path,
+    hg_editor = hg_delta_editor.HgChangeReceiver(repo=repo,
                                                  ui_=ui,
                                                  subdir=svn.subdir,
                                                  author_host=author_host,
diff --git a/utility_commands.py b/utility_commands.py
--- a/utility_commands.py
+++ b/utility_commands.py
@@ -11,7 +11,7 @@
     """show the location (URL) of the Subversion repository
     """
     hge = hg_delta_editor.HgChangeReceiver(hg_repo_path,
-                                           ui_=ui)
+                                           repo=repo, ui_=ui)
     ui.status(hge.url, '\n')
 
 
@@ -24,7 +24,7 @@
     ignorefile = open(ignpath, 'w')
     ignorefile.write('.hgignore\nsyntax:glob\n')
     hge = hg_delta_editor.HgChangeReceiver(hg_repo_path,
-                                           ui_=ui)
+                                           repo=repo, ui_=ui)
     svn_commit_hashes = dict(zip(hge.revmap.itervalues(),
                                  hge.revmap.iterkeys()))
     parent = cmdutil.parentrev(ui, repo, hge, svn_commit_hashes)
@@ -54,7 +54,7 @@
     """show Subversion details similar to `svn info'
     """
     hge = hg_delta_editor.HgChangeReceiver(hg_repo_path,
-                                           ui_=ui)
+                                           repo=repo, ui_=ui)
     svn_commit_hashes = dict(zip(hge.revmap.itervalues(),
                                  hge.revmap.iterkeys()))
     parent = cmdutil.parentrev(ui, repo, hge, svn_commit_hashes)
diff --git a/wrappers.py b/wrappers.py
--- a/wrappers.py
+++ b/wrappers.py
@@ -175,7 +175,7 @@
                         if children:
                             child = children[0]
                         rebasesrc = node.bin(child.extra().get('rebase_source', node.hex(node.nullid)))
-        hge = hg_delta_editor.HgChangeReceiver(hge.path, ui_=ui)
+        hge = hg_delta_editor.HgChangeReceiver(repo=hge.repo)
         svn_commit_hashes = dict(zip(hge.revmap.itervalues(), hge.revmap.iterkeys()))
     util.swap_out_encoding(old_encoding)
     return 0