comparison tests/test_utility_commands.py @ 264:112d57bb736e

rebase: moved to wrappers, now a wrapper around rebase triggered with --svn.
author Augie Fackler <durin42@gmail.com>
date Mon, 13 Apr 2009 21:51:12 -0500
parents ffccf0080e54
children 75f082b5897e
comparison
equal deleted inserted replaced
263:d978192f0d63 264:112d57bb736e
1 import os 1 import os
2 import unittest 2 import unittest
3 3
4 from hgext import rebase
4 from mercurial import ui 5 from mercurial import ui
5 from mercurial import hg 6 from mercurial import hg
6 from mercurial import revlog 7 from mercurial import revlog
7 from mercurial import context 8 from mercurial import context
8 from mercurial import node 9 from mercurial import node
157 {'branch': 'localbranch', }) 158 {'branch': 'localbranch', })
158 self.repo.commitctx(ctx) 159 self.repo.commitctx(ctx)
159 self.assertEqual(self.repo['tip'].branch(), 'localbranch') 160 self.assertEqual(self.repo['tip'].branch(), 'localbranch')
160 beforerebasehash = self.repo['tip'].node() 161 beforerebasehash = self.repo['tip'].node()
161 hg.update(self.repo, 'tip') 162 hg.update(self.repo, 'tip')
162 utility_commands.rebase(ui.ui(), self.repo) 163 wrappers.rebase(rebase.rebase, ui.ui(), self.repo, svn=True)
163 self.assertEqual(self.repo['tip'].branch(), 'localbranch') 164 self.assertEqual(self.repo['tip'].branch(), 'localbranch')
164 self.assertEqual(self.repo['tip'].parents()[0].parents()[0], self.repo[0]) 165 self.assertEqual(self.repo['tip'].parents()[0].parents()[0], self.repo[0])
165 self.assertNotEqual(beforerebasehash, self.repo['tip'].node()) 166 self.assertNotEqual(beforerebasehash, self.repo['tip'].node())
166 167
167 def test_url_is_normalized(self): 168 def test_url_is_normalized(self):