From: Guido Günther Date: Thu, 4 Jul 2013 15:36:33 +0000 (+0200) Subject: GitRepository.set_upstream_branch: Newer git wants a valid remote repo entry X-Git-Tag: debian/0.6.2~5 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=a22eee2325eae7d44110e4f80e5cf3dc0f3b1d9d;p=tools%2Fgit-buildpackage.git GitRepository.set_upstream_branch: Newer git wants a valid remote repo entry so set one in the tests before trying to set the upstream branch. Found with git 1.8.3.2 --- diff --git a/tests/test_GitRepository.py b/tests/test_GitRepository.py index 0e8d8d0d..8dafc2a2 100644 --- a/tests/test_GitRepository.py +++ b/tests/test_GitRepository.py @@ -186,6 +186,7 @@ def test_set_upstream_branch(): >>> os.makedirs(os.path.join(repo.git_dir, 'refs/remotes/origin')) >>> shutil.copy(os.path.join(repo.git_dir, 'refs/heads/master'), \ os.path.join(repo.git_dir, 'refs/remotes/origin/')) + >>> repo.add_remote_repo('origin', 'git://git.example.com/git/origin') >>> repo.set_upstream_branch('master', 'origin/master') >>> repo.get_upstream_branch('master') 'origin/master' @@ -195,7 +196,6 @@ def test_set_upstream_branch(): >>> repo.set_upstream_branch('foo', 'origin/bla') Traceback (most recent call last): GitRepositoryError: Branch origin/bla doesn't exist! - """ def test_get_upstream_branch():