patchinstall.py: Support --upstream-commit.

This commit is contained in:
Zebediah Figura 2020-05-18 19:12:27 -05:00
parent 4b2ca6b38e
commit bee49c0b29
3 changed files with 12 additions and 0 deletions

5
staging/commit-rebase.sh Executable file
View File

@ -0,0 +1,5 @@
#!/bin/sh
sha=`git -C ./staging/wine/ rev-parse HEAD`
echo $sha > ./staging/upstream-commit
git commit -am "Rebase against $sha."

View File

@ -57,6 +57,7 @@ Options:
if they are missing or disabled
-r, --rebase-mode alias for --backend=git-am-C1 --no-autoconf --no-patchlist
-d, --destdir=<path> install to <path> (defaults to current working directory)
--upstream-commit print the Wine commit hash and exit
'''
def run(*args, **kwargs):
@ -209,6 +210,7 @@ def main():
'help',
'no-autoconf',
'no-patchlist',
'upstream-commit',
'version'])
except getopt.GetoptError as err:
print str(err)
@ -249,6 +251,10 @@ def main():
no_patchlist = True
elif o == '--ignore-missing':
ignore_missing = True
elif o == '--upstream-commit':
with open(stagingdir + 'staging/upstream-commit') as f:
print f.read().rstrip();
sys.exit(0)
for a in args: add_patchset(patchlist, a)

1
staging/upstream-commit Normal file
View File

@ -0,0 +1 @@
3bb824f98891e8eb907c9c652fe528373a17b10d