mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 838733 - generate_diff.py should have a convenience mode for staging;r=ahal ; DONTBUILD because NPOTB
This commit is contained in:
parent
ace7ce91a8
commit
53506b7433
@ -86,6 +86,7 @@ def checkout(git_dir, tag):
|
|||||||
cwd=git_dir)
|
cwd=git_dir)
|
||||||
process.communicate()
|
process.communicate()
|
||||||
|
|
||||||
|
|
||||||
### hg functions
|
### hg functions
|
||||||
|
|
||||||
def untracked_files(hg_dir):
|
def untracked_files(hg_dir):
|
||||||
@ -153,6 +154,18 @@ def setup(**kwargs):
|
|||||||
assert current_package
|
assert current_package
|
||||||
current_package_info[current_package] = kwargs
|
current_package_info[current_package] = kwargs
|
||||||
|
|
||||||
|
def checkout_tag(src, directory, version):
|
||||||
|
"""
|
||||||
|
front end to checkout + version_tag;
|
||||||
|
if version is None, checkout HEAD
|
||||||
|
"""
|
||||||
|
|
||||||
|
if version is None:
|
||||||
|
tag = 'HEAD'
|
||||||
|
else:
|
||||||
|
tag = version_tag(directory, version)
|
||||||
|
checkout(src, tag)
|
||||||
|
|
||||||
def check_consistency(*package_info):
|
def check_consistency(*package_info):
|
||||||
"""checks consistency between a set of packages"""
|
"""checks consistency between a set of packages"""
|
||||||
|
|
||||||
@ -213,6 +226,8 @@ def main(args=sys.argv[1:]):
|
|||||||
formatter=PlainDescriptionFormatter())
|
formatter=PlainDescriptionFormatter())
|
||||||
parser.add_option('-o', '--output', dest='output',
|
parser.add_option('-o', '--output', dest='output',
|
||||||
help="specify the output file; otherwise will be in the current directory with a name based on the hash")
|
help="specify the output file; otherwise will be in the current directory with a name based on the hash")
|
||||||
|
parser.add_option('--develop', dest='develop',
|
||||||
|
help="use development (HEAD) version of packages")
|
||||||
parser.add_option('--packages', dest='output_packages',
|
parser.add_option('--packages', dest='output_packages',
|
||||||
default=False, action='store_true',
|
default=False, action='store_true',
|
||||||
help="generate packages.txt and exit")
|
help="generate packages.txt and exit")
|
||||||
@ -277,10 +292,17 @@ def main(args=sys.argv[1:]):
|
|||||||
|
|
||||||
# ensure all directories and tags are available
|
# ensure all directories and tags are available
|
||||||
for index, (directory, version) in enumerate(versions):
|
for index, (directory, version) in enumerate(versions):
|
||||||
|
|
||||||
|
setup_py = os.path.join(src, directory, 'setup.py')
|
||||||
|
assert os.path.exists(setup_py), "'%s' not found" % setup_py
|
||||||
|
|
||||||
if not version:
|
if not version:
|
||||||
|
|
||||||
|
if options.develop:
|
||||||
|
# use HEAD of package; keep version=None
|
||||||
|
continue
|
||||||
|
|
||||||
# choose maximum version from setup.py
|
# choose maximum version from setup.py
|
||||||
setup_py = os.path.join(src, directory, 'setup.py')
|
|
||||||
assert os.path.exists(setup_py), "'%s' not found" % setup_py
|
|
||||||
with file(setup_py) as f:
|
with file(setup_py) as f:
|
||||||
for line in f.readlines():
|
for line in f.readlines():
|
||||||
line = line.strip()
|
line = line.strip()
|
||||||
@ -305,8 +327,7 @@ def main(args=sys.argv[1:]):
|
|||||||
for directory, version in versions:
|
for directory, version in versions:
|
||||||
|
|
||||||
# checkout appropriate revision of mozbase
|
# checkout appropriate revision of mozbase
|
||||||
tag = version_tag(directory, version)
|
checkout_tag(src, directory, version)
|
||||||
checkout(src, tag)
|
|
||||||
|
|
||||||
# update the package information
|
# update the package information
|
||||||
setup_py = os.path.join(src, directory, 'setup.py')
|
setup_py = os.path.join(src, directory, 'setup.py')
|
||||||
@ -324,8 +345,7 @@ def main(args=sys.argv[1:]):
|
|||||||
for directory, version in versions:
|
for directory, version in versions:
|
||||||
|
|
||||||
# checkout appropriate revision of mozbase
|
# checkout appropriate revision of mozbase
|
||||||
tag = version_tag(directory, version)
|
checkout_tag(src, directory, version)
|
||||||
checkout(src, tag)
|
|
||||||
|
|
||||||
# replace the directory
|
# replace the directory
|
||||||
remove(os.path.join(here, directory))
|
remove(os.path.join(here, directory))
|
||||||
|
Loading…
Reference in New Issue
Block a user