Mercurial > hgsubversion
changeset 230:4c3bad24f950
rebase: cleanup slightly.
author | Augie Fackler <durin42@gmail.com> |
---|---|
date | Mon, 30 Mar 2009 16:11:45 -0500 |
parents | 7f20914e52e8 |
children | b1543f243910 |
files | push_cmd.py tests/test_utility_commands.py utility_commands.py |
diffstat | 3 files changed, 4 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- 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)
--- 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())
--- 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)