def test_pull(self): wt1 = self.make_branch_and_tree('branch1') tip = wt1.commit('empty commit') wt2 = self.make_branch_and_tree('branch2') self.start_logging_connections() cmd = builtins.cmd_pull() # We don't care about the ouput but 'outf' should be defined cmd.outf = tests.StringIOWrapper() cmd.run(self.get_url('branch1'), directory='branch2') self.assertEquals(1, len(self.connections))
def test_pull(self): wt1 = self.make_branch_and_tree('branch1') tip = wt1.commit('empty commit') wt2 = self.make_branch_and_tree('branch2') self.start_logging_connections() cmd = builtins.cmd_pull() # We don't care about the ouput but 'outf' should be defined cmd.outf = tests.StringIOWrapper() cmd.run(self.get_url('branch1'), directory='branch2') self.assertEqual(1, len(self.connections))
def test_pull_with_bound_branch(self): master_wt = self.make_branch_and_tree('master') local_wt = self.make_branch_and_tree('local') master_branch = branch.Branch.open(self.get_url('master')) local_wt.branch.bind(master_branch) remote_wt = self.make_branch_and_tree('remote') remote_wt.commit('empty commit') self.start_logging_connections() pull = builtins.cmd_pull() # We don't care about the ouput but 'outf' should be defined pull.outf = tests.StringIOWrapper() pull.run(self.get_url('remote'), directory='local') self.assertEquals(2, len(self.connections))
def test_pull_with_bound_branch(self): master_wt = self.make_branch_and_tree('master') local_wt = self.make_branch_and_tree('local') master_branch = branch.Branch.open(self.get_url('master')) local_wt.branch.bind(master_branch) remote_wt = self.make_branch_and_tree('remote') remote_wt.commit('empty commit') self.start_logging_connections() pull = builtins.cmd_pull() # We don't care about the ouput but 'outf' should be defined pull.outf = tests.StringIOWrapper() pull.run(self.get_url('remote'), directory='local') self.assertEqual(2, len(self.connections))