Skip to content
Snippets Groups Projects
Commit 13130441 authored by Haibo Huang's avatar Haibo Huang Committed by android-build-merger
Browse files

[Updater] Automatically run `git merge` am: 0cabc2ef

am: b3b1f60c

Change-Id: I7885109dc604be0d516968426c9b1a402e5b7071
parents 32e3fbab b3b1f60c
No related branches found
No related tags found
No related merge requests found
...@@ -129,10 +129,4 @@ class GitUpdater(): ...@@ -129,10 +129,4 @@ class GitUpdater():
self.merge_from, len(commits), upstream_branch)) self.merge_from, len(commits), upstream_branch))
self._write_metadata(self.proj_path) self._write_metadata(self.proj_path)
print(""" git_utils.merge(self.proj_path, self.merge_from)
This tool only updates METADATA. Run the following command to update:
git merge {merge_branch}
To check all local changes:
git diff {merge_branch} HEAD
""".format(merge_branch=self.merge_from))
...@@ -113,3 +113,8 @@ COMMIT_RE = re.compile(COMMIT_PATTERN) ...@@ -113,3 +113,8 @@ COMMIT_RE = re.compile(COMMIT_PATTERN)
def is_commit(commit): def is_commit(commit):
"""Whether a string looks like a SHA1 hash.""" """Whether a string looks like a SHA1 hash."""
return bool(COMMIT_RE.match(commit)) return bool(COMMIT_RE.match(commit))
def merge(proj_path, branch):
"""Merges a branch."""
_run(['git', 'merge', branch], cwd=proj_path)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment