Commit Graph

24 Commits (cf6a5d2026479506b24d46d0325931330ebf7b78)

Author SHA1 Message Date
maruel@chromium.org e1a0376aa1 Fix applying svn:executable on Windows.
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
13 years ago
maruel@chromium.org dffc73cb44 Fix applying git diff with new file mode 644 on a svn checkout.
svn propdel svn:executable shouldn't be called on it.

R=petermayo@chromium.org
BUG=150960


Review URL: https://chromiumcodereview.appspot.com/10962038

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@158038 0039d316-1c4b-4281-b951-d872f2087c98
13 years ago
maruel@chromium.org 17fa4beec4 Fix hunk handling for 'default hunk header values'.
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
13 years ago
maruel@chromium.org 8fab6b66ff Fix unicode upgrade of patch.
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
13 years ago
maruel@chromium.org db1fd78fcb Fix for single line file modification
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
13 years ago
maruel@chromium.org cf602553bc Fix svn delete handling (again).
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
13 years ago
maruel@chromium.org 0927b7eef8 Create a new testing_support module to move utility modules there
It will simplify importing utility modules from other projects. Otherwise I was getting name conflicts with 'test'.

Reenable W0403 that was disabled in the previous CL.

R=dpranke@chromium.org
BUG=
TEST=


Review URL: http://codereview.chromium.org/8508015

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@109636 0039d316-1c4b-4281-b951-d872f2087c98
13 years ago
maruel@chromium.org 428342a0a7 Standardize the sys.path fix up and fix a few pylint warnings.
Disable temporarily W0403, will be reenabled on the next CL

R=dpranke@chromium.org
BUG=
TEST=

Review URL: http://codereview.chromium.org/8508017

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@109435 0039d316-1c4b-4281-b951-d872f2087c98
14 years ago
maruel@chromium.org 37ca0b1cdd Fix tests on Windows
R=dpranke@chromium.org
BUG=
TEST=


Review URL: http://codereview.chromium.org/8366042

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@106866 0039d316-1c4b-4281-b951-d872f2087c98
14 years ago
maruel@chromium.org 5e975633a8 Fix handling of file renames.
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
14 years ago
maruel@chromium.org ce69514a5d Share more data between checkout_test and patches_data.
Also reorder some patchset in preparation to patchset reording CL.

R=dpranke@chromium.org
BUG=
TEST=


Review URL: http://codereview.chromium.org/8066012

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@103147 0039d316-1c4b-4281-b951-d872f2087c98
14 years ago
maruel@chromium.org fd19a3032f Move sample patches to its own file so it can be reused by rietveld_test.py
R=dpranke@chromium.org
BUG=
TEST=


Review URL: http://codereview.chromium.org/7847021

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@100201 0039d316-1c4b-4281-b951-d872f2087c98
14 years ago
maruel@chromium.org c73a5303dd Move fail tests into a separate class.
Makes the code clearer by separating good and bad use cases.

R=dpranke@chromium.org
BUG=
TEST=


Review URL: http://codereview.chromium.org/7850018

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@100198 0039d316-1c4b-4281-b951-d872f2087c98
14 years ago
maruel@chromium.org 8baaea7b83 Add automatic is_new=True on git copy or rename.
R=dpranke@chromium.org
BUG=
TEST=


Review URL: http://codereview.chromium.org/7847005

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@100140 0039d316-1c4b-4281-b951-d872f2087c98
14 years ago
maruel@chromium.org a19047cdf4 Add support forcopied and renamed files.
R=dpranke@chromium.org
BUG=
TEST=


Review URL: http://codereview.chromium.org/6874006

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@100138 0039d316-1c4b-4281-b951-d872f2087c98
14 years ago
maruel@chromium.org ed6ce00382 Centralize testing to make it simpler to test when rename are supported correctly
R=dpranke@chromium.org
BUG=
TEST=


Review URL: http://codereview.chromium.org/7789030

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@99980 0039d316-1c4b-4281-b951-d872f2087c98
14 years ago
maruel@chromium.org be60565b8a Improve is_delete detection.
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
14 years ago
maruel@chromium.org 58fe662dc7 Add support for empty files, __init__.py is a common example.
Use p.is_new signal and set it manually with rietveld patches.
Add regression test for +x.

R=dpranke@chromium.org
BUG=
TEST=

Review URL: http://codereview.chromium.org/7054057

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@87858 0039d316-1c4b-4281-b951-d872f2087c98
14 years ago
maruel@chromium.org 97366bef6c Increase coverage to 91%; Much stricter about header parsing.
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
14 years ago
maruel@chromium.org b6ffdaf3c0 Add support for executables in git-svn patches applied on svn.
R=dpranke@chromium.org
BUG=
TEST=

Review URL: http://codereview.chromium.org/7056045

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@87827 0039d316-1c4b-4281-b951-d872f2087c98
14 years ago
maruel@chromium.org c4b5e76d7e Improve patch handling and tests.
R=dpranke@chromium.org
BUG=
TEST=

Review URL: http://codereview.chromium.org/6877038

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@82406 0039d316-1c4b-4281-b951-d872f2087c98
14 years ago
maruel@chromium.org 61e0b691d6 Add script to apply a patch from rietveld.
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
14 years ago
maruel@chromium.org cd6194027f Add support to put a patchset into a subdirectory.
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
14 years ago
maruel@chromium.org b3727a36e4 Move patch.py and rietveld.py from commit-queue.
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
14 years ago