# HG changeset patch # User Augie Fackler # Date 1238447505 18000 # Node ID 4c3bad24f950fee21139cfdd3ca2fc3eca36de04 # Parent 7f20914e52e86b81a99d08f73973ec5dbc42ab89 rebase: cleanup slightly. diff --git a/push_cmd.py b/push_cmd.py --- a/push_cmd.py +++ b/push_cmd.py @@ -82,7 +82,7 @@ def push_revisions_to_subversion(ui, rep if ctx.node() == oldest: return extra['branch'] = ctx.branch() - utility_commands.rebase_commits(ui, repo, hg_repo_path, + utility_commands.rebase_commits(ui, repo, extrafn=extrafn, sourcerev=needs_transplant, **opts) diff --git a/tests/test_utility_commands.py b/tests/test_utility_commands.py --- a/tests/test_utility_commands.py +++ b/tests/test_utility_commands.py @@ -136,7 +136,7 @@ class UtilityTests(test_util.TestBase): self.assertEqual(self.repo['tip'].branch(), 'localbranch') beforerebasehash = self.repo['tip'].node() hg.update(self.repo, 'tip') - utility_commands.rebase_commits(ui.ui(), self.repo, os.path.dirname(self.repo.path)) + utility_commands.rebase_commits(ui.ui(), self.repo) self.assertEqual(self.repo['tip'].branch(), 'localbranch') self.assertEqual(self.repo['tip'].parents()[0].parents()[0], self.repo[0]) self.assertNotEqual(beforerebasehash, self.repo['tip'].node()) diff --git a/utility_commands.py b/utility_commands.py --- a/utility_commands.py +++ b/utility_commands.py @@ -130,7 +130,7 @@ def print_parent_revision(ui, repo, hg_r print_parent_revision = util.register_subcommand('parent')(print_parent_revision) -def rebase_commits(ui, repo, hg_repo_path, extrafn=None, sourcerev=None, **opts): +def rebase_commits(ui, repo, extrafn=None, sourcerev=None, **opts): """rebase current unpushed revisions onto the Subversion head This moves a line of development from making its own head to the top of @@ -146,8 +146,7 @@ def rebase_commits(ui, repo, hg_repo_pat extrafn = extrafn2 if sourcerev is None: sourcerev = repo.parents()[0].node() - hge = hg_delta_editor.HgChangeReceiver(hg_repo_path, - ui_=ui) + hge = hg_delta_editor.HgChangeReceiver(repo=repo) svn_commit_hashes = dict(zip(hge.revmap.itervalues(), hge.revmap.iterkeys())) o_r = util.outgoing_revisions(ui, repo, hge, svn_commit_hashes, sourcerev=sourcerev)