Index: tools/release/test_mergeinfo.py |
diff --git a/tools/release/test_mergeinfo.py b/tools/release/test_mergeinfo.py |
index d455fa23748011a7d284e9f7c49b7a12c9729e3e..681e0f8077ec0997fc3420915edc6d43148b4054 100755 |
--- a/tools/release/test_mergeinfo.py |
+++ b/tools/release/test_mergeinfo.py |
@@ -30,12 +30,19 @@ class TestMergeInfo(unittest.TestCase): |
raise Exception(err) |
return output |
+ def _update_origin(self): |
+ # Fetch from origin to get/update the origin/master branch |
+ self._execute_git(['fetch', 'origin']) |
+ |
def setUp(self): |
if path.exists(self.base_dir): |
shutil.rmtree(self.base_dir) |
check_call(["git", "init", self.base_dir]) |
+ # Add fake remote with name 'origin' |
+ self._execute_git(['remote', 'add', 'origin', self.base_dir]) |
+ |
# Initial commit |
message = '''Initial commit''' |
@@ -68,6 +75,7 @@ class TestMergeInfo(unittest.TestCase): |
def _make_empty_commit(self, message): |
self._execute_git(["commit", "--allow-empty", "-m", message]) |
+ self._update_origin() |
return self._get_commits()[-1] |
def testCanDescribeCommit(self): |