Commit Graph

34 Commits (b9ae2ca9a55d9b754c313f4c9e9f0f3b804a5e44)

Author SHA1 Message Date
Edward Lesmes f8792079d2 Revert "Fix checkout.py issues when p.patchlevel > 1."
This reverts commit 5908f9906d.

Reason for revert:
Introduces bugs when deleting files.
The reason is that 
  patchlevel = patchlevel or self.patchlevel
will evaluate to self.patchlevel also when patchlevel is 0, which is wrong.

Original change's description:
> Fix checkout.py issues when p.patchlevel > 1.
> 
> When p.patchlevel > 1, p.filename does not correspond to the files that
> git-apply would modify.
> 
> See bug for details
> 
> Bug: 764294
> Change-Id: Icdb803056e306edb25238b2d9cdabd3ff175d8ed
> Reviewed-on: https://chromium-review.googlesource.com/663357
> Reviewed-by: Aaron Gable <agable@chromium.org>
> Commit-Queue: Edward Lesmes <ehmaldonado@chromium.org>

TBR=kjellander@chromium.org,agable@chromium.org,ehmaldonado@chromium.org

Change-Id: Ifa1f94602a023228cb32e5fe3fa07586b466981a
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: 764294
Reviewed-on: https://chromium-review.googlesource.com/663266
Reviewed-by: Edward Lesmes <ehmaldonado@chromium.org>
Commit-Queue: Edward Lesmes <ehmaldonado@chromium.org>
8 years ago
Edward Lemur 5908f9906d Fix checkout.py issues when p.patchlevel > 1.
When p.patchlevel > 1, p.filename does not correspond to the files that
git-apply would modify.

See bug for details

Bug: 764294
Change-Id: Icdb803056e306edb25238b2d9cdabd3ff175d8ed
Reviewed-on: https://chromium-review.googlesource.com/663357
Reviewed-by: Aaron Gable <agable@chromium.org>
Commit-Queue: Edward Lesmes <ehmaldonado@chromium.org>
8 years ago
Quinten Yearsley b2cc4a94da depot_tools: Replace pylint error numbers with symbolic names.
This affects a bunch of files, but only changes comments,
and shouldn't make any difference to behavior.

The purpose is to slightly improve readability of pylint
disable comments.

Change-Id: Ic6cd0f8de792b31d91c6125f6da2616450b30f11
Reviewed-on: https://chromium-review.googlesource.com/420412
Reviewed-by: Aaron Gable <agable@chromium.org>
Commit-Queue: Quinten Yearsley <qyearsley@chromium.org>
8 years ago
scottmg f3c688bf2c Fix presubmit checkout test after git 2.9.0
Quoting https://github.com/blog/2188-git-2-9-has-been-released

"""Rename detection is now enabled by default for diffs..."

which broke this test.

R=tandrii@chromium.org, iannucci@chromium.org
BUG=619959

Review-Url: https://codereview.chromium.org/2073553003
9 years ago
maruel@chromium.org dbd102dc2b Remove most svn related testing.
Subversion usage is going away, tests get the kick first.

R=iannucci@chromium.org
BUG=475320

Review URL: https://codereview.chromium.org/1158043003

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@295411 0039d316-1c4b-4281-b951-d872f2087c98
10 years ago
sergiyb@google.com 7676cca756 Disabled flaky depot_tools tests
R=akuegel@chromium.org,pgervais@chromium.org
BUG=477454

Review URL: https://codereview.chromium.org/1099143002

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@295007 0039d316-1c4b-4281-b951-d872f2087c98
10 years ago
sbc@chromium.org 7e977755af Fix test failures on Ubuntu/Trusty.
I ran into several failures running the presubmit checks
on my Ubuntu/Trusty laptop and it looks like a some of
the tests were broken by recent versions of svn and git.

Review URL: https://codereview.chromium.org/795723003

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@293341 0039d316-1c4b-4281-b951-d872f2087c98
10 years ago
primiano@chromium.org 49dfcde0f1 Use three-way merge when applying Git patches.
After switching to a pure git workflow, most of the patchset we upload
to rietveld have git metadata. Apparently, however, the scripts here in
depot tools, which are used by the CQ and trybots, are ignoring that
and applying patches without taking advantage of git metadata.
In practice this causes people to rebase and reupload patches more than
necessary, even in the cases when it could be handled automatically by
means of a three way merge.
This change updates the GitCheckout class of depot_tools to use that.

BUG=416003

Review URL: https://codereview.chromium.org/577203002

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@292087 0039d316-1c4b-4281-b951-d872f2087c98
11 years ago
hinoka@chromium.org c4396a1b4e Re-land of have apply_patch.py/checkout.py stage git patches instead of committing them
For a bot_update Git world, we don't really want to commit patches. Instead
we just want to leave them unstaged.

BUG=370503

Review URL: https://codereview.chromium.org/280063003

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@269489 0039d316-1c4b-4281-b951-d872f2087c98
11 years ago
hinoka@chromium.org 3e6848f2ae Revert of Have apply_patch.py/checkout.py stage git patches instead of committing them (https://codereview.chromium.org/273543002/)
Reason for revert:
Borked all the tryjobs due to missing --base_ref, needed to land with https://codereview.chromium.org/273543002/

Original issue's description:
> Have apply_patch.py/checkout.py stage git patches instead of committing them
> 
> For a bot_update Git world, we don't really want to commit patches.  Instead
> we just want to leave them unstaged.
> 
> BUG=370503
> TEST=ran locally with and without flag
> 
> Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=269468

TBR=maruel@chromium.org,agable@chromium.org,hinoka@google.com,iannucci@chromium.org
NOTREECHECKS=true
NOTRY=true
BUG=370503

Review URL: https://codereview.chromium.org/271283003

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@269482 0039d316-1c4b-4281-b951-d872f2087c98
11 years ago
hinoka@chromium.org ba2f187250 Have apply_patch.py/checkout.py stage git patches instead of committing them
For a bot_update Git world, we don't really want to commit patches.  Instead
we just want to leave them unstaged.

BUG=370503
TEST=ran locally with and without flag

Review URL: https://codereview.chromium.org/273543002

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@269468 0039d316-1c4b-4281-b951-d872f2087c98
11 years ago
rmistry@google.com 11145db693 Return unicode commit hashes in checkout.GitCheckout.
The motivation for this CL is:
When a project is turned on to use GitCheckout with try job verifiers, then the CQ crashes because of line 64 in http://src.chromium.org/viewvc/chrome/trunk/tools/commit-queue/pending_manager.py

This is because revision can only be one of (None, int, unicode). This crash only happens when try jobs are used (which is why I did not see it before).
This CL changes the return type to be unicode instead of string.

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@226743 0039d316-1c4b-4281-b951-d872f2087c98
12 years ago
rmistry@google.com c5118cb597 Catching for "No such process" in tear_down_git similar to tear_down_svn.
I cannot reproduce the test failures in https://chromiumcodereview.appspot.com/24047003/ but I figure there must be a good reason tear_down_svn had this check so adding it to tear_down_git.

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@222785 0039d316-1c4b-4281-b951-d872f2087c98
12 years ago
rmistry@google.com de71b4dc29 Temporarily disabling Git checkout tests.
Disabling due to the unrelated presubmit failures in https://chromiumcodereview.appspot.com/24047003/.

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@222766 0039d316-1c4b-4281-b951-d872f2087c98
12 years ago
rmistry@google.com 3b5efdf64d Completing implementation of GitCheckout in depot_tools.
Tested with:
* Unit tests have been added and they work.
* I also tested end-to-end using a skiabot-test repository in https://skia.googlesource.com/ (it is hidden). CLs I tested with are:
** https://codereview.chromium.org/22797006/ : Add whitespace in file1
** https://codereview.chromium.org/22815013/ : Remove whitespace from file1
** https://codereview.chromium.org/22867025/ : Add new files in directories
** https://codereview.chromium.org/22901018/ : Edit file in directory and delete file in directory
** https://codereview.chromium.org/22918014/ : Add, Delete and Modify 3 files
** https://codereview.chromium.org/23360004/ : Add new files in new directories


Note:
* When committing GitCheckout uses the --author to specify the original author. The author flag takes in 'Firstname Lastname <email_addr>' but we do not know the Firstname and LastName of the original author, which is why the code here parses out the username from the email address and uses it.
  Eg: For email address xyz@example.com it passes in --author 'xyz <xyz@example.com>'
* An example of the changes required in a project to use GitCheckout instead of SvnCheckout is in https://codereview.chromium.org/22859063/


Created to fix the following feature requests-
https://code.google.com/p/chromium/issues/detail?id=261619 : Update the Chrome commit queue to push to src.git.
https://code.google.com/p/skia/issues/detail?id=1593 : Add Git support to the Commit Queue.

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@221392 0039d316-1c4b-4281-b951-d872f2087c98
12 years ago
maruel@chromium.org 9717013017 Fix many (but not all[1]) depot_tools tests on Windows.
[1] *scm_test.py are deeply broken, svnadmin is missing for svn_bin\.
And the git test are failing at shutdown.

Also Fix SvnCheckout.testMove flakiness.

TBR=ilevy@chromium.org,szager@chromium.org
BUG=

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@198900 0039d316-1c4b-4281-b951-d872f2087c98
12 years ago
maruel@chromium.org 4dd9f7205a Make apply_issue.py much more verbose about what it's doing.
It's to help users figuring out what is happening.

TBR=rogerta@chromium.org
BUG=153284


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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@159504 0039d316-1c4b-4281-b951-d872f2087c98
13 years ago
maruel@chromium.org ec4a918139 Add --no-backup-if-mismatch so no .orig file is created when fuzzing occurs.
Nobody cares about those .orig files and they get in the way on the try server
for some specific license check.

R=cmp@chromium.org
BUG=152507


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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@159329 0039d316-1c4b-4281-b951-d872f2087c98
13 years ago
maruel@chromium.org 995f8ac254 Remove GitSvn*Checkout implementations.
They were not used, causing unnecessary code bloat.

R=cmp@chromium.org
BUG=
TEST=


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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@148541 0039d316-1c4b-4281-b951-d872f2087c98
13 years ago
maruel@chromium.org 3da8317843 Implement proper svn copy when a file is copied, moved or renamed
R=nsylvain@chromium.org
BUG=
TEST=A basic unit test verifies history is kept

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@135651 0039d316-1c4b-4281-b951-d872f2087c98
13 years ago
maruel@chromium.org 4f6852cca4 Remove python 2.5 compatibility code.
R=cmp@chromium.org
BUG=
TEST=


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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@133265 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
14 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 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 b1d1a78c8d Add post_processors override to apply_patch() and add more testing.
Move ReadOnlyCheckout tests into its own fixture.

R=dpranke@chromium.org
BUG=
TEST=


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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@103272 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 a5129fb808 Fix Checkout.post_processsors setup. __init__() was ignoring the argument!
TEST=Rewrote the unit test to catch that case.

R=dpranke@chromium.org
BUG=

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@89700 0039d316-1c4b-4281-b951-d872f2087c98
14 years ago
maruel@chromium.org 51919774d5 Make prepare() accept a revision argument.
R=dpranke@chromium.org
TEST=few
BUG=

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@88779 0039d316-1c4b-4281-b951-d872f2087c98
14 years ago
maruel@chromium.org 6ed8b50be6 Make post_processors part of the Checkout object state.
R=dpranke@chromium.org
BUG=
TEST=

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@88777 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 9842a0c754 Add support for auto-props in the form: "*.sh = svn:eol-style=LF;svn:executable"
It needs to be parsed manually and assumes '=*' for property that do not specify
a value.

Add clearer message on failure like that by specifiying the command line.

R=dpranke@chromium.org
BUG=
TEST=

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@87255 0039d316-1c4b-4281-b951-d872f2087c98
14 years ago
maruel@chromium.org 1bf5097abc Enforce unicode commit message.
R=dpranke@chromium.org
BUG=
TEST=

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@84289 0039d316-1c4b-4281-b951-d872f2087c98
14 years ago
maruel@chromium.org 8a1396cd72 Add post_process argument to Checkout.apply_patch().
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
14 years ago
maruel@chromium.org dfaecd2bd4 Move commit-queue/checkout into depot_tools so it can be reused by the try server.
BUG=
TEST=

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@82414 0039d316-1c4b-4281-b951-d872f2087c98
14 years ago