Skip to content
Snippets Groups Projects
Commit 0cabc2ef authored by Haibo Huang's avatar Haibo Huang
Browse files

[Updater] Automatically run `git merge`

Test: updater.sh update xz-java
Change-Id: I3924b5651f2fac3c5d7493964b570f2f39bc4777
parent bb5d0ee9
No related branches found
No related tags found
No related merge requests found
......@@ -129,10 +129,4 @@ class GitUpdater():
self.merge_from, len(commits), upstream_branch))
self._write_metadata(self.proj_path)
print("""
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))
git_utils.merge(self.proj_path, self.merge_from)
......@@ -113,3 +113,8 @@ COMMIT_RE = re.compile(COMMIT_PATTERN)
def is_commit(commit):
"""Whether a string looks like a SHA1 hash."""
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