def test_commit_lossy_foreign(self): test_foreign.register_dummy_foreign_for_test(self) self.make_branch_and_tree('.', format=test_foreign.DummyForeignVcsDirFormat()) self.run_bzr('commit --lossy --unchanged -m message') output = self.run_bzr('revision-info')[0] self.assertTrue(output.startswith('1 dummy-'))
def test_commit_lossy_foreign(self): test_foreign.register_dummy_foreign_for_test(self) self.make_branch_and_tree( '.', format=test_foreign.DummyForeignVcsDirFormat()) self.run_bzr('commit --lossy --unchanged -m message') output = self.run_bzr('revision-info')[0] self.assertTrue(output.startswith('1 dummy-'))
def test_commit_lossy_foreign(self): """Attempt a lossy commit to a foreign branch.""" test_foreign.register_dummy_foreign_for_test(self) wt = self.make_branch_and_tree('.', format=test_foreign.DummyForeignVcsDirFormat()) b = wt.branch with file('hello', 'w') as f: f.write('hello world') wt.add('hello') revid = wt.commit(message='add hello', lossy=True, timestamp=1302659388, timezone=0) self.assertEquals('dummy-v1:1302659388.0-0-UNKNOWN', revid)
def test_commit_lossy_foreign(self): """Attempt a lossy commit to a foreign branch.""" test_foreign.register_dummy_foreign_for_test(self) wt = self.make_branch_and_tree( '.', format=test_foreign.DummyForeignVcsDirFormat()) b = wt.branch with file('hello', 'w') as f: f.write('hello world') wt.add('hello') revid = wt.commit(message='add hello', lossy=True, timestamp=1302659388, timezone=0) self.assertEqual('dummy-v1:1302659388.0-0-UNKNOWN', revid)
def test_commit_bound_lossy_foreign(self): """Attempt a lossy commit to a bzr branch bound to a foreign branch.""" test_foreign.register_dummy_foreign_for_test(self) foreign_branch = self.make_branch('foreign', format=test_foreign.DummyForeignVcsDirFormat()) wt = foreign_branch.create_checkout("local") b = wt.branch with file('local/hello', 'w') as f: f.write('hello world') wt.add('hello') revid = wt.commit(message='add hello', lossy=True, timestamp=1302659388, timezone=0) self.assertEquals('dummy-v1:1302659388.0-0-0', revid) self.assertEquals('dummy-v1:1302659388.0-0-0', foreign_branch.last_revision()) self.assertEquals('dummy-v1:1302659388.0-0-0', wt.branch.last_revision())
def test_commit_bound_lossy_foreign(self): """Attempt a lossy commit to a bzr branch bound to a foreign branch.""" test_foreign.register_dummy_foreign_for_test(self) foreign_branch = self.make_branch( 'foreign', format=test_foreign.DummyForeignVcsDirFormat()) wt = foreign_branch.create_checkout("local") b = wt.branch with file('local/hello', 'w') as f: f.write('hello world') wt.add('hello') revid = wt.commit(message='add hello', lossy=True, timestamp=1302659388, timezone=0) self.assertEqual('dummy-v1:1302659388.0-0-0', revid) self.assertEqual('dummy-v1:1302659388.0-0-0', foreign_branch.last_revision()) self.assertEqual('dummy-v1:1302659388.0-0-0', wt.branch.last_revision())
def setUp(self): super(TestPushForeign, self).setUp() test_foreign.register_dummy_foreign_for_test(self)
def setUp(self): test_foreign.register_dummy_foreign_for_test(self) # Create an empty branch where we will be able to push self.foreign = self.make_branch( 'to', format=test_foreign.DummyForeignVcsDirFormat())
def setUp(self): test_foreign.register_dummy_foreign_for_test(self) # Create an empty branch where we will be able to push self.foreign = self.make_branch("to", format=test_foreign.DummyForeignVcsDirFormat())