Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(11)

Unified Diff: tools/release/test_mergeinfo.py

Issue 2733923002: [mergeinfo.py] Use remotes/origin/master instead of master (Closed)
Patch Set: Update tests Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « tools/release/mergeinfo.py ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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):
« no previous file with comments | « tools/release/mergeinfo.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698