Revision: 16921
Author: yang...@chromium.org
Date: Tue Sep 24 13:35:45 2013 UTC
Log: Scripts should not care about closed tree when committing.
I just got bitten by this when merging to branch.
R=jkumme...@chromium.org, machenb...@chromium.org
BUG=
Review URL: https://codereview.chromium.org/24254005
http://code.google.com/p/v8/source/detail?r=16921
Modified:
/branches/bleeding_edge/PRESUBMIT.py
/branches/bleeding_edge/tools/merge-to-branch.sh
/branches/bleeding_edge/tools/push-to-trunk.sh
=======================================
--- /branches/bleeding_edge/PRESUBMIT.py Wed Jul 31 09:16:31 2013 UTC
+++ /branches/bleeding_edge/PRESUBMIT.py Tue Sep 24 13:35:45 2013 UTC
@@ -58,6 +58,17 @@
return results
+def _SkipTreeCheck(input_api, output_api):
+ """Check the env var whether we want to skip tree check.
+ Only skip if src/version.cc has been updated."""
+ src_version = 'src/version.cc'
+ FilterFile = lambda file: file.LocalPath() == src_version
+ if not input_api.AffectedSourceFiles(
+ lambda file: file.LocalPath() == src_version):
+ return False
+ return input_api.environ.get('PRESUBMIT_TREE_CHECK') == 'skip'
+
+
def CheckChangeOnUpload(input_api, output_api):
results = []
results.extend(_CommonChecks(input_api, output_api))
@@ -69,7 +80,8 @@
results.extend(_CommonChecks(input_api, output_api))
results.extend(input_api.canned_checks.CheckChangeHasDescription(
input_api, output_api))
- results.extend(input_api.canned_checks.CheckTreeIsOpen(
- input_api, output_api,
- json_url='http://v8-status.appspot.com/current?format=json'))
+ if not _SkipTreeCheck(input_api, output_api):
+ results.extend(input_api.canned_checks.CheckTreeIsOpen(
+ input_api, output_api,
+ json_url='http://v8-status.appspot.com/current?format=json'))
return results
=======================================
--- /branches/bleeding_edge/tools/merge-to-branch.sh Fri Oct 5 08:58:02
2012 UTC
+++ /branches/bleeding_edge/tools/merge-to-branch.sh Tue Sep 24 13:35:45
2013 UTC
@@ -229,7 +229,8 @@
git checkout $BRANCHNAME \
|| die "cannot ensure that the current branch is $BRANCHNAME"
wait_for_lgtm
- git cl dcommit || die "failed to commit to $MERGE_TO_BRANCH"
+ PRESUBMIT_TREE_CHECK="skip" git cl dcommit \
+ || die "failed to commit to $MERGE_TO_BRANCH"
fi
let CURRENT_STEP+=1
=======================================
--- /branches/bleeding_edge/tools/push-to-trunk.sh Fri Oct 5 08:58:02 2012
UTC
+++ /branches/bleeding_edge/tools/push-to-trunk.sh Tue Sep 24 13:35:45 2013
UTC
@@ -211,7 +211,8 @@
};
print $0;
}' > "$CHANGELOG_ENTRY_FILE"
- git cl dcommit || die "'git cl dcommit' failed, please try again."
+ PRESUBMIT_TREE_CHECK="skip" git cl dcommit \
+ || die "'git cl dcommit' failed, please try again."
fi
let CURRENT_STEP+=1
--
--
v8-dev mailing list
v8-dev@googlegroups.com
http://groups.google.com/group/v8-dev
---
You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to v8-dev+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.