Greatly improves presubmit performance on Blink where there may be rule violations (my test case went from 50s to 5s).
BUG=236206
TEST=new test in presubmit_unittest.py; manual performance test on Mac and Windows after touching hundreds of files in webkit; testing included add/move/edit/delete on both binary and text files.
Review URL: https://chromiumcodereview.appspot.com/15898005
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@205275 0039d316-1c4b-4281-b951-d872f2087c98
For an unknown reason, 'svn propset svn:executable * foo.sh' doesn't work on
Windows. It is even more awkward that 'svn propset svn:executable . foo.sh'
works just fine, in particular, subversion replaces the value, as long as it's
not an empty string, back to '*'.
R=petermayo@chromium.org
BUG=
Review URL: https://chromiumcodereview.appspot.com/10967071
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@158281 0039d316-1c4b-4281-b951-d872f2087c98
It relied on a behavior that doesn't hold on python 2.7 anymore w.r.t. tuple
comparison to non-tuple objects.
Now be explicit about having source files to be first.
R=rogerta@chromium.org
BUG=
Review URL: https://chromiumcodereview.appspot.com/10915240
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@156355 0039d316-1c4b-4281-b951-d872f2087c98
Add new test cases to verify it properly handles "-1 +1, 2" and "-1 +1" for
short files.
R=petermayo@chromium.org
BUG=
Review URL: https://chromiumcodereview.appspot.com/10894036
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@153906 0039d316-1c4b-4281-b951-d872f2087c98
When a diff contains utf8 character, the filename would be stored as a unicode
object instead of a str. This is even if the buffer is originally sent as a
utf-8 encoded str. Then once the diff is reconstructed to be sent to 'patch', a
unicode object instead of a str would be sent, confusing patch.
R=cmp@chromium.org
BUG=
TEST=
Review URL: http://codereview.chromium.org/9387024
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@122361 0039d316-1c4b-4281-b951-d872f2087c98
When a file contains a single line of text, svn diff will generate an odd hunk
header. Modify the hunk parsing code to accept this format.
R=dpranke@chromium.org
BUG=
TEST=
Review URL: http://codereview.chromium.org/9147056
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@117143 0039d316-1c4b-4281-b951-d872f2087c98
Fix RAW.NEW_NOT_NULL parsing to detect correctly it's a new file.
Add proper Hunk parsing to fix these 2 bugs.
R=dpranke@chromium.org
BUG=109715
TEST=CQ'ing a patch generated with svn that delete files is applied properly, e.g. the file is deleted and not simple 0-length.
Review URL: http://codereview.chromium.org/9167015
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@117084 0039d316-1c4b-4281-b951-d872f2087c98
The patches needs to by applied 'in-order' to not delete source files.
Added more tests.
R=dpranke@chromium.org
BUG=94330
TEST=
Review URL: http://codereview.chromium.org/8038056
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@103309 0039d316-1c4b-4281-b951-d872f2087c98
Make tests more exhaustive in prospect to file move handling.
Rename 'c' variables to 'p' to easy copy paste.
R=dpranke@chromium.org
BUG=
TEST=
Review URL: http://codereview.chromium.org/7828017
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@99439 0039d316-1c4b-4281-b951-d872f2087c98
This is in preparation to support file rename, as a source_filename needs to be
added and processed.
R=dpranke@chromium.org
BUG=
TEST=
Review URL: http://codereview.chromium.org/7809001
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@99185 0039d316-1c4b-4281-b951-d872f2087c98
Add is_new to be used in a later patch by checkout classes.
R=dpranke@chromium.org
BUG=
TEST=
Review URL: http://codereview.chromium.org/7054048
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@87838 0039d316-1c4b-4281-b951-d872f2087c98
This enables doing late modifications like updating the copyright notice or fixing line endings.
Also silence the checkout operations a bit more when VOID=subprocess2.VOID.
Add corresponding unit tests.
Review URL: http://codereview.chromium.org/6891003
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@82587 0039d316-1c4b-4281-b951-d872f2087c98
At the moment it just fetches the patch. It's still useful to debug rietveld
issues.
Improve resiliency to invalid patches.
R=dpranke@chromium.org
BUG=
TEST=
Review URL: http://codereview.chromium.org/6825085
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@81305 0039d316-1c4b-4281-b951-d872f2087c98
Add better code to handle diff header, especially add more patch verification
code.
Add a lot of tests.
Add mangling of \ to /.
R=dpranke@chromium.org
BUG=78561
TEST=
Review URL: http://codereview.chromium.org/6802021
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@81017 0039d316-1c4b-4281-b951-d872f2087c98
It will be used for:
- git cl patch so binary files can be patched
- try jobs instead of doing a curl <url> | patch
BUG=
TEST=
Review URL: http://codereview.chromium.org/6792028
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@80355 0039d316-1c4b-4281-b951-d872f2087c98