In https://codereview.chromium.org/11574007/ I attempted to make it possible to use the TRYSERVER_ROOT setting in codereview.settings. It seems like some checkouts ran into errors with it not finding the codereview.settings file when it was parsed. This is probably due to the fact that the following call chain reads the self.toplevel_root variable:
_GclStyleSettings -> GetCodeReviewSetting -> ReadRootFile
By moving _GclStyleSettings up before self.toplevel_root is set probably causes this.
This CL attempts to correct this.
BUG=none, but try job upload fails for some users.
TEST=submitting try job to locally running try server.
Review URL: https://chromiumcodereview.appspot.com/11571052
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@173928 0039d316-1c4b-4281-b951-d872f2087c98
Since the helper function for the parsing of the TRYSERVER_* variables relies on them being unset (i.e. value is None) in order to apply the settings from codereview.settings, this parsing must take place before the code that figures out the root path (since that sets the options.root value if it's not set).
Otherwise the TRYSERVER_ROOT setting will never be set, even if configured in codereview.settings, essentially making it useless.
This has probably not been discovered previously since almost all Chrome projects use src as the root dir. In WebRTC and some other projects we use 'trunk' usually, which is giving us trouble in our own try server setups (where we have to use 'src' because many other scripts have that root dir hardcoded).
I am not sure if there is a case for another project where this change may have any negative effect. Please let me know if theres's any investigation needed that I can assist with.
BUG=none
TEST=submitting try job to local try master with a codereview.settings file with TRYSERVER_ROOT set.
Review URL: https://chromiumcodereview.appspot.com/11574007
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@173694 0039d316-1c4b-4281-b951-d872f2087c98
allows one to run the presubmit script without
submitting locally (alternative would be to make
this a warning I guess).
Also, pass option.verbose through to DoGetTrySlaves()
so it will log which PRESUBMIT files are taking part
in the decision.
BUG=
Review URL: https://chromiumcodereview.appspot.com/10915072
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@154838 0039d316-1c4b-4281-b951-d872f2087c98
Many, many times this has burned me badly; if you have a dirty index,
git try will just upload your commits, and not the index.
R=nsylvain@chromium.org
BUG=None
Review URL: https://chromiumcodereview.appspot.com/10836180
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@151202 0039d316-1c4b-4281-b951-d872f2087c98
Use manual file writing, it's just two lines.
TBR=nsylvain@chromium.org
BUG=
TEST=git try works with non-ascii patches
Review URL: https://chromiumcodereview.appspot.com/10815009
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@147447 0039d316-1c4b-4281-b951-d872f2087c98
Enforces that each builder and builder:test association must be in its own list item in PRESUBMIT.py/GetPreferredTrySlaves().
If a user run git try -t foo, trychange.py will now take the list of all the
slaves, will skip any :compile builder, and apply the test filter to them.
Currently, git try -t foo on a chromium checkout throws an exception because of
PRESUBMIT.py files containing test specification.
R=petermayo@chromium.org
BUG=
TEST=
Review URL: http://codereview.chromium.org/9664015
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@125975 0039d316-1c4b-4281-b951-d872f2087c98
Previously, it would apply the test filter only on the last bot.
TBR=dpranke@chromium.org
BUG=
TEST=
Review URL: http://codereview.chromium.org/9634011
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@125622 0039d316-1c4b-4281-b951-d872f2087c98
The previous behavior would cause inproper parsing;
- the bot=bot1 flag would add 'bot1': ['defaulttests'] to the dictionary.
- the testfilter=test1 flag would append 'test1' to the list, causing the value
to look like 'bot1': ['defaulttests', 'test1'].
I think on the long run the best is to keep --testfilter as a user interface but
not on the try server. This effectively stops sending testfilter=foo to the
server.
Add unit test to verify it's working properly. Refactor a bit to make unit
testing simpler.
R=petermayo@chromium.org
BUG=
TEST=
Review URL: http://codereview.chromium.org/9599012
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@125405 0039d316-1c4b-4281-b951-d872f2087c98
Now accepts duplicate keys, it simplifies parsing, like when multiple bots are
used, each with their own test filter. This enables full test specification per builder.
R=petermayo@chromium.org
BUG=
TEST=
Review URL: http://codereview.chromium.org/9380022
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@121842 0039d316-1c4b-4281-b951-d872f2087c98
Prints the bots a tryjob would use if sent out.
(Does not send out the job.)
Review URL: http://codereview.chromium.org/9348068
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@121409 0039d316-1c4b-4281-b951-d872f2087c98
GIT.CaptureStatus was assuming os.getcwd() was using all the time, which isn't
true when using trychange.py --sub_rep XXX.
R=dpranke@chromium.org
TEST=
BUG=
Review URL: http://codereview.chromium.org/8930002
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@114264 0039d316-1c4b-4281-b951-d872f2087c98
That helps weed out some issues faces with svn plus helped me figure out some
misuses.
Most of the commands have been implicitly depending on os.getcwd(). This change
makes it always consistent and clear when dependence on the current directory is
needed.
Remove default arguments to scm.SVN.GenerateDiff and a few other calls to be
sure the refactoring was done right.
R=dpranke@chromium.org
BUG=
TEST=make sure most commands aren't broke
Review URL: http://codereview.chromium.org/8771042
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@114262 0039d316-1c4b-4281-b951-d872f2087c98
This caused all CQ job to not show up on rietveld. Now that rietvelt supports
multiple try job per builder per patchset, this check is not useful anymore.
TBR=dpranke@chromium.org
BUG=
TEST=
Review URL: http://codereview.chromium.org/8895022
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@113952 0039d316-1c4b-4281-b951-d872f2087c98
subprocess2.check_output() raises an OSError instead of a CalledProcessError
when the executable is not found.
R=dpranke@chromium.org
BUG=
TEST=
Review URL: http://codereview.chromium.org/8511025
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@109325 0039d316-1c4b-4281-b951-d872f2087c98
Makes SCM take the |file_list| as a parameter instead of getting it from |options|.
BUG=none
TEST=none
Review URL: http://codereview.chromium.org/8133032
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@104148 0039d316-1c4b-4281-b951-d872f2087c98
BUG=none
TEST=Run unit tests - they should still pass. Run gcl try and git try and make sure there are no errors.
Review URL: http://codereview.chromium.org/8133001
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@104067 0039d316-1c4b-4281-b951-d872f2087c98
This is a followup to: http://codereview.chromium.org/8059009/
Only add the file once instead of twice (since the diff has --- and +++ lines for each file).
Strip whitespace at the end (git diffs don't include a \t so split('\t') isn't enough).
Remove leading 'a/' from the path, since git diffs have these.
BUG=none
TEST=manual
Review URL: http://codereview.chromium.org/8050017
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@102934 0039d316-1c4b-4281-b951-d872f2087c98
Needed to make it so changes containing only *.mm are only sent to Mac trybots by default.
BUG=none
TEST=none
Review URL: http://codereview.chromium.org/8059009
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@102930 0039d316-1c4b-4281-b951-d872f2087c98
Needed to make it so changes containing only *.mm are only sent to Mac trybots by default.
BUG=none
TEST=none
Review URL: http://codereview.chromium.org/7925014
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@102783 0039d316-1c4b-4281-b951-d872f2087c98
There is user interaction when the svn credential isn't cached. (Duh)
TBR=dpranke@chromium.org
BUG=
TEST=
Review URL: http://codereview.chromium.org/7864007
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@100462 0039d316-1c4b-4281-b951-d872f2087c98
Make sure every site that catches gclient_utils.Error also catch
subprocess2.CalledProcessError.
BUG=
TEST=
Review URL: http://codereview.chromium.org/6691034
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@80339 0039d316-1c4b-4281-b951-d872f2087c98
Reapply r79006 with fixes for ubuntu 10.4.
The only change is in fix_default_encoding() to trap an exception
locale.getlocale() may throw.
R=dpranke@chromium.org
BUG=none
TEST=unit test
Review URL: http://codereview.chromium.org/6721029
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@79144 0039d316-1c4b-4281-b951-d872f2087c98
It is causing exception for some users on ubuntu 10.4 with:
"category LC_ALL is not supported"
TBR=dpranke
Review URL: http://codereview.chromium.org/6717025
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@79012 0039d316-1c4b-4281-b951-d872f2087c98
With this code in action, I can successfully print arabic and chinese on linux
and cygwin. It fails to print chinese on my Mac but prints arabic. It prints '?'
on Windows console but it *doesn't throw* which is the biggest improvement here.
It was particularly a problem on windows because WindowsError's description text
is in the current ANSI code page so it failed to print if the text was not pure
ASCII, like error message when using Windows' French UI.
R=dpranke@chromium.org
BUG=none
TEST=manual unit test ./tests/fix_encoding_test.py and it shouldn't throw
Review URL: http://codereview.chromium.org/6676090
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@79006 0039d316-1c4b-4281-b951-d872f2087c98
Otherwise the following presubmit checks where never called.
TBR=nsylvain
BUG=
TEST=fixes unit tests
Review URL: http://codereview.chromium.org/5995003
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@69844 0039d316-1c4b-4281-b951-d872f2087c98
Most of them are style issues or variable aliasing.
TEST=Can almost enable pylint warnings
BUG=none
Review URL: http://codereview.chromium.org/4360002
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@64908 0039d316-1c4b-4281-b951-d872f2087c98