mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-29 21:21:12 +00:00
Add a way to skip updating a particular repo
When entering a shell to fix the rebasing you can just `exit 255` and we concider it means 'skip update'. Also support entering shell on windows
This commit is contained in:
parent
6707b41d08
commit
a6e6feac3e
1 changed files with 12 additions and 4 deletions
16
git-update
16
git-update
|
@ -52,12 +52,20 @@ def update_repo(repo_name, repo_dir, revision, no_interaction, recurse_i=0):
|
||||||
if not no_interaction:
|
if not no_interaction:
|
||||||
print("====================================="
|
print("====================================="
|
||||||
"\n%sEntering a shell in %s to fix that"
|
"\n%sEntering a shell in %s to fix that"
|
||||||
" just `exit` once done`"
|
" just `exit 0` once done` or `exit 255`"
|
||||||
|
" to skip update for that repository"
|
||||||
"\n=====================================" % (
|
"\n=====================================" % (
|
||||||
out, os.getcwd()))
|
out, repo_dir))
|
||||||
try:
|
try:
|
||||||
subprocess.check_call(os.environ.get("SHELL", "/bin/sh"),
|
if os.name is 'nt':
|
||||||
cwd=repo_dir)
|
shell = os.environ.get("COMSPEC", r"C:\WINDOWS\system32\cmd.exe")
|
||||||
|
else:
|
||||||
|
shell = os.environ.get("SHELL", os.path.realpath("/bin/sh"))
|
||||||
|
subprocess.check_call(shell, cwd=repo_dir)
|
||||||
|
except subprocess.CalledProcessError as e:
|
||||||
|
if e.returncode == 255:
|
||||||
|
print("Skipping '%s' update" % repo_name)
|
||||||
|
return True
|
||||||
except:
|
except:
|
||||||
# Result of subshell does not really matter
|
# Result of subshell does not really matter
|
||||||
pass
|
pass
|
||||||
|
|
Loading…
Reference in a new issue