def test_push(self): self.make_branch_and_tree('branch') self.start_logging_connections() cmd = cmd_push() # We don't care about the ouput but 'outf' should be defined cmd.outf = tests.StringIOWrapper() cmd.run(self.get_url('remote'), directory='branch') self.assertEqual(1, len(self.connections))
def test_push(self): self.make_branch_and_tree('branch') self.start_logging_connections() cmd = cmd_push() # We don't care about the ouput but 'outf' should be defined cmd.outf = tests.StringIOWrapper() cmd.run(self.get_url('remote'), directory='branch') self.assertEquals(1, len(self.connections))
def test_push_onto_stacked(self): self.make_branch_and_tree('base', format='1.9') self.make_branch_and_tree('source', format='1.9') self.start_logging_connections() cmd = cmd_push() cmd.outf = tests.StringIOWrapper() cmd.run(self.get_url('remote'), directory='source', stacked_on=self.get_url('base')) self.assertEqual(1, len(self.connections))
def test_empty_branch_command(self): """The 'bzr push' command should make a limited number of HPSS calls. """ cmd = builtins.cmd_push() cmd.outf = tests.StringIOWrapper() cmd.run(directory=self.get_url('empty'), location=self.smart_server.get_url() + 'target') # HPSS calls as of 2008/09/22: # [BzrDir.open, BzrDir.open_branch, BzrDir.find_repositoryV2, # Branch.get_stacked_on_url, get, get, Branch.lock_write, # Branch.last_revision_info, Branch.unlock] self.assertTrue(len(self.hpss_calls) <= 9, self.hpss_calls)
def test_empty_branch_command(self): """The 'bzr push' command should make a limited number of HPSS calls. """ cmd = builtins.cmd_push() cmd.outf = tests.StringIOWrapper() cmd.run( directory=self.get_url('empty'), location=self.smart_server.get_url() + 'target') # HPSS calls as of 2008/09/22: # [BzrDir.open, BzrDir.open_branch, BzrDir.find_repositoryV2, # Branch.get_stacked_on_url, get, get, Branch.lock_write, # Branch.last_revision_info, Branch.unlock] self.assertTrue(len(self.hpss_calls) <= 9, self.hpss_calls)