Bug 1370936 - Default to not creating a commit when updating wpt metadata, r=ato

MozReview-Commit-ID: FaYNn0hkXkD

--HG--
extra : rebase_source : 437a01155a3d406d8cecf46abda3f91f986ff050
This commit is contained in:
James Graham 2017-06-16 10:43:16 +01:00
Родитель 0b90b4bef9
Коммит d7aa932ed3
4 изменённых файлов: 11 добавлений и 7 удалений

Просмотреть файл

@ -40,7 +40,7 @@ class CreateMetadataPatch(Step):
"""Create a patch/commit for the metadata checkout""" """Create a patch/commit for the metadata checkout"""
def create(self, state): def create(self, state):
if state.no_patch: if not state.patch:
return return
local_tree = state.local_tree local_tree = state.local_tree

Просмотреть файл

@ -169,7 +169,7 @@ class CreateSyncPatch(Step):
"""Add the updated test files to a commit/patch in the local tree.""" """Add the updated test files to a commit/patch in the local tree."""
def create(self, state): def create(self, state):
if state.no_patch: if not state.patch:
return return
local_tree = state.local_tree local_tree = state.local_tree

Просмотреть файл

@ -71,7 +71,7 @@ class SyncFromUpstream(Step):
with state.push(["sync", "paths", "metadata_path", "tests_path", "local_tree", with state.push(["sync", "paths", "metadata_path", "tests_path", "local_tree",
"sync_tree"]): "sync_tree"]):
state.target_rev = kwargs["rev"] state.target_rev = kwargs["rev"]
state.no_patch = kwargs["no_patch"] state.patch = kwargs["patch"]
state.suite_name = kwargs["suite_name"] state.suite_name = kwargs["suite_name"]
state.path_excludes = kwargs["exclude"] state.path_excludes = kwargs["exclude"]
state.path_includes = kwargs["include"] state.path_includes = kwargs["include"]
@ -90,7 +90,7 @@ class UpdateMetadata(Step):
with state.push(["local_tree", "sync_tree", "paths", "serve_root"]): with state.push(["local_tree", "sync_tree", "paths", "serve_root"]):
state.run_log = kwargs["run_log"] state.run_log = kwargs["run_log"]
state.ignore_existing = kwargs["ignore_existing"] state.ignore_existing = kwargs["ignore_existing"]
state.no_patch = kwargs["no_patch"] state.patch = kwargs["patch"]
state.suite_name = kwargs["suite_name"] state.suite_name = kwargs["suite_name"]
state.product = kwargs["product"] state.product = kwargs["product"]
state.config = kwargs["config"] state.config = kwargs["config"]

Просмотреть файл

@ -392,6 +392,8 @@ def check_args_update(kwargs):
if kwargs["product"] is None: if kwargs["product"] is None:
kwargs["product"] = "firefox" kwargs["product"] = "firefox"
if kwargs["patch"] is None:
kwargs["patch"] = kwargs["sync"]
def create_parser_update(product_choices=None): def create_parser_update(product_choices=None):
@ -419,10 +421,12 @@ def create_parser_update(product_choices=None):
parser.add_argument("--branch", action="store", type=abs_path, parser.add_argument("--branch", action="store", type=abs_path,
help="Remote branch to sync against") help="Remote branch to sync against")
parser.add_argument("--rev", action="store", help="Revision to sync to") parser.add_argument("--rev", action="store", help="Revision to sync to")
parser.add_argument("--no-patch", action="store_true", parser.add_argument("--patch", action="store_true", dest="patch", default=None,
help="Don't create an mq patch or git commit containing the changes.") help="Create a VCS commit containing the changes.")
parser.add_argument("--no-patch", action="store_false", dest="patch",
help="Don't create a VCS commit containing the changes.")
parser.add_argument("--sync", dest="sync", action="store_true", default=False, parser.add_argument("--sync", dest="sync", action="store_true", default=False,
help="Sync the tests with the latest from upstream") help="Sync the tests with the latest from upstream (implies --patch)")
parser.add_argument("--ignore-existing", action="store_true", help="When updating test results only consider results from the logfiles provided, not existing expectations.") parser.add_argument("--ignore-existing", action="store_true", help="When updating test results only consider results from the logfiles provided, not existing expectations.")
parser.add_argument("--continue", action="store_true", help="Continue a previously started run of the update script") parser.add_argument("--continue", action="store_true", help="Continue a previously started run of the update script")
parser.add_argument("--abort", action="store_true", help="Clear state from a previous incomplete run of the update script") parser.add_argument("--abort", action="store_true", help="Clear state from a previous incomplete run of the update script")