mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-03 14:08:56 +00:00
update: Enhance logging about what kind of update is happening
This commit is contained in:
parent
57f8844958
commit
acb77ccb0a
1 changed files with 7 additions and 2 deletions
|
@ -33,13 +33,16 @@ def manifest_get_commits(manifest):
|
||||||
return res
|
return res
|
||||||
|
|
||||||
|
|
||||||
|
def get_branch_name(repo_dir):
|
||||||
|
return git('-C', repo_dir, 'rev-parse', '--symbolic-full-name', 'HEAD').strip()
|
||||||
|
|
||||||
|
|
||||||
def ensure_revision_if_necessary(repo_dir, revision):
|
def ensure_revision_if_necessary(repo_dir, revision):
|
||||||
"""
|
"""
|
||||||
Makes sure that @revision is set if the current repo is detached.
|
Makes sure that @revision is set if the current repo is detached.
|
||||||
"""
|
"""
|
||||||
if not revision:
|
if not revision:
|
||||||
ret = git('-C', repo_dir, 'rev-parse', '--symbolic-full-name', 'HEAD')
|
if get_branch_name(repo_dir) == 'HEAD':
|
||||||
if ret.strip() == 'HEAD':
|
|
||||||
revision = git('-C', repo_dir, 'rev-parse', 'HEAD').strip()
|
revision = git('-C', repo_dir, 'rev-parse', 'HEAD').strip()
|
||||||
|
|
||||||
return revision
|
return revision
|
||||||
|
@ -64,9 +67,11 @@ def update_repo(repo_name, repo_dir, revision, no_interaction, fetch_args=[], re
|
||||||
git("config", "rebase.autoStash", "true", repository_path=repo_dir)
|
git("config", "rebase.autoStash", "true", repository_path=repo_dir)
|
||||||
try:
|
try:
|
||||||
if revision:
|
if revision:
|
||||||
|
print("Checking out %s in %s" % (revision, repo_name))
|
||||||
git("fetch", *fetch_args, repository_path=repo_dir)
|
git("fetch", *fetch_args, repository_path=repo_dir)
|
||||||
git("checkout", revision, repository_path=repo_dir)
|
git("checkout", revision, repository_path=repo_dir)
|
||||||
else:
|
else:
|
||||||
|
print("Updating branch %s in %s" % (get_branch_name(repo_dir), repo_name))
|
||||||
git("pull", "--rebase", repository_path=repo_dir)
|
git("pull", "--rebase", repository_path=repo_dir)
|
||||||
git("submodule", "update", repository_path=repo_dir)
|
git("submodule", "update", repository_path=repo_dir)
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
|
|
Loading…
Reference in a new issue