Commit Graph

43 Commits (1132f5f896e1efc5ff177bab377e34d5cd1a1ebd)

Author SHA1 Message Date
hinoka@chromium.org 8a6ebcec6d Don't pass in --revision into gclient sync on the DEPS sync in apply_issue.py if git
We changed apply_issue to stage the patch if its on git, so it doesn't make sense to pass in --revision because that causes gclient to run solutions in managed mode.

BUG=388374

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@280855 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
hinoka@chromium.org b1d0cc13c0 Add black/whitelisting to apply_issue
BUG=370503
TESTS=
apply_issue.py --issue 243483007 --patchset 210001 --whitelst chrome/browser/chromeos/login/screen_locker.cc
apply_issue.py --issue 243483007 --patchset 210001 --blacklist chrome/browser/chromeos/login/screen_locker.cc

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@268589 0039d316-1c4b-4281-b951-d872f2087c98
11 years ago
hinoka@google.com 98e82e1dbc --ignore_deps for apply_issue
Bot_update takes care of running gclient sync after apply_issue, so this is
unnecessary.

BUG=

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@265031 0039d316-1c4b-4281-b951-d872f2087c98
11 years ago
pgervais@chromium.org 9979824601 Added OAuth2 authentication to apply_issue
Added oauth2client and httplib to third_party

BUG=348233

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@259643 0039d316-1c4b-4281-b951-d872f2087c98
11 years ago
agable@chromium.org fa3c388ec5 Revert making apply_issue assume 'master'
Review URL: https://codereview.chromium.org/204013002

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@257841 0039d316-1c4b-4281-b951-d872f2087c98
11 years ago
agable@chromium.org e569f50330 Assume 'master' when remote branch not specified.
This prevents apply_patch from attempting to check out a branch tracking 'origin/None'.

R=pgervais@chromium.org

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@257763 0039d316-1c4b-4281-b951-d872f2087c98
11 years ago
hinoka@google.com 998deaf360 Pass in "--author 'name <email@somewhere.com>" when doing git patches in apply_issue.py
This is to tackle the issue that slaves don't have global git vars set up.

BUG=339171

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@252705 0039d316-1c4b-4281-b951-d872f2087c98
11 years ago
hinoka@google.com d067d81657 Apply Issue changes for disabling checkout when bot update ran.
This add --force to ignore the flag file.
This also passes --base_ref so we can specify which ref we're basing off of so that it does not incorrectly assert that it is basing off origin/master

BUG=339171

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@252464 0039d316-1c4b-4281-b951-d872f2087c98
11 years ago
stip@chromium.org a3d7c4b3b7 Add got_revision support for apply_issue.
BUG=170427

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@236101 0039d316-1c4b-4281-b951-d872f2087c98
11 years ago
rmistry@google.com bb050f61d4 Make checkout.GitCheckout usable from apply_issue
BUG=chromium:303433

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@226774 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
ilevy@chromium.org 9414599a01 Add anonymous-only option to apply_issue
Add an option to apply_issue to fail if anonymous access
triggers a login prompt.
- cherry-pick upload.py rietveld cl 37c73ece82d0 which
   allows clients to request no authentication.

BUG=240634

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@214023 0039d316-1c4b-4281-b951-d872f2087c98
12 years ago
iannucci@chromium.org 1005629013 Revert "Add --no-commit option to apply_issue for use with git on the bots."
This reverts commit 012dc07ce5.

Revert "Partially revert r208574 to get the CQ working again (hopefully)."

This reverts commit 74105cd2a0.

Pull the --no-commit change out completely.

TBR=dpranke@chromium.org
BUG=254556

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@208801 0039d316-1c4b-4281-b951-d872f2087c98
12 years ago
dpranke@chromium.org 74105cd2a0 Partially revert r208574 to get the CQ working again (hopefully).
TBR=iannucci@chromium.org, cmp@chromium.org
BUG=254556

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@208782 0039d316-1c4b-4281-b951-d872f2087c98
12 years ago
iannucci@chromium.org 012dc07ce5 Add --no-commit option to apply_issue for use with git on the bots.
R=dpranke@chromium.org
BUG=

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@208574 0039d316-1c4b-4281-b951-d872f2087c98
12 years ago
maruel@chromium.org 7e79d37ff2 Make apply_issue.py more aggressive when deleting an entry from a DEPS file.
Without this change, if an entry is removed from a DEPS file, it won't be
effectively deleted. Specify --delete_unversioned_trees so the dependency is
properly deleted.

TBR=szager@chromium.org
BUG=

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@197081 0039d316-1c4b-4281-b951-d872f2087c98
12 years ago
maruel@chromium.org bb12314170 Use --nohooks when gclient sync in apply_issue.
Otherwise the try slaves run the hooks twice, once in the apply_issue, another
in the runhooks step. It is unnecessary. It will reduce the problem with
apply_issue timeouts.

TBR=xusydoc@chromium.org
BUG=


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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@166826 0039d316-1c4b-4281-b951-d872f2087c98
12 years ago
maruel@chromium.org fc490ffc98 Disable buffering in apply_issue.py to try to find out the problem.
apply_issue step hangs and the output is often in the reverse order. This CL is
to help diagnose the problem.

TBR=cmp@chromium.org
BUG=159868


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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@166505 0039d316-1c4b-4281-b951-d872f2087c98
12 years ago
maruel@chromium.org 93477fd5fa Add another print statement to debug apply_issue problem.
TBR=cmp@chromium.org
BUG=


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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@165354 0039d316-1c4b-4281-b951-d872f2087c98
13 years ago
maruel@chromium.org 370a623c70 Add a print to figure out where the hang occurs.
TBR=rogerta@chromium.org
BUG=


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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@163342 0039d316-1c4b-4281-b951-d872f2087c98
13 years ago
maruel@chromium.org a73435aa98 Fix private issues, take two.
The object creation order was wrong

TBR=rogerta@chromium.org
BUG=149941


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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@159524 0039d316-1c4b-4281-b951-d872f2087c98
13 years ago
maruel@chromium.org 0aca0f9684 Enforce the checkout object to use an absolute path.
Stop using stderr so the output is more readable on buildbot.
Otherwise stderr arrives before stdout in apply_issue step.

TBR=rogerta@chromium.org
BUG=153284


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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@159508 0039d316-1c4b-4281-b951-d872f2087c98
13 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 9d5f4ad1b9 Works around rate limiting by trying to apply CL unauthenticated first.
TBR=rogerta@chromium.org
BUG=153284


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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@159488 0039d316-1c4b-4281-b951-d872f2087c98
13 years ago
rogerta@chromium.org 9824629157 Allow the password to be specified through stdin.
BUG=149941

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@158068 0039d316-1c4b-4281-b951-d872f2087c98
13 years ago
rogerta@chromium.org 33578fe270 Allow the caller to specify a username and password so that private issues
can be applied.  This is the first part for this bug; the second part is in commands.py where this is called by the TS.

BUG=149941

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@157355 0039d316-1c4b-4281-b951-d872f2087c98
13 years ago
maruel@chromium.org 6afd0c36e8 Do not assume gclient is in the PATH.
Also specify the batch file on Windows. Python's subprocess is picky about that.

TBR=rogerta@chromium.org
BUG=


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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@157337 0039d316-1c4b-4281-b951-d872f2087c98
13 years ago
maruel@chromium.org 1833e57b47 When a DEPS file is modified, run gclient sync.
It runs it by specifying BASE/HEAD to stay at the current revision.
This works around the lack of gclient sync when a DEPS file is applied on the
Try Server when triggered from Rietveld. This was handled my the Try Server
inside scripts/slave/chromium_command.py manually in the case a 'patch' is
specified.

TBR=rogerta@chromium.org
BUG=


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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@157110 0039d316-1c4b-4281-b951-d872f2087c98
13 years ago
maruel@chromium.org 9d72d2b9e0 Ensure buildbot knows that the checkout was patched when patching.
R=rogerta@chromium.org
BUG=


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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@155506 0039d316-1c4b-4281-b951-d872f2087c98
13 years ago
maruel@chromium.org 083cd45914 Fix apply_issue.py to work on python 2.6 with anonymous request.
Fix RawCheckout support in apply_issue.py.

TBR=rogerta@chromium.org
BUG=


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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@154703 0039d316-1c4b-4281-b951-d872f2087c98
13 years ago
maruel@chromium.org 3bf4b3c864 Enable anonymous apply_issue behavior by default and only fall back to login when needed.
Patch in upload.py fix for python 2.7.

TBR=rogerta@chromium.org
BUG=


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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@154696 0039d316-1c4b-4281-b951-d872f2087c98
13 years ago
maruel@chromium.org 9dbbe54f8f Handle when a patchset doesn't exist instead of printing a stack trace.
Print a meaningful error message so the user can try diagnosing himself.

R=rogerta@chromium.org
BUG=


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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@154436 0039d316-1c4b-4281-b951-d872f2087c98
13 years ago
maruel@chromium.org 38ab82d6d8 Add outputs to apply_issue.py
apply_issue.py didn't have output, making it a bit boring. Now it's super cute.

R=rogerta@chromium.org
BUG=


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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@153948 0039d316-1c4b-4281-b951-d872f2087c98
13 years ago
maruel@chromium.org 827cb81918 Due to a temporary bug in the try server, ignore '=' as an email address.
This CL shall be reverted once the try server is fixed.

R=rogerta@chromium.org
BUG=


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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@153916 0039d316-1c4b-4281-b951-d872f2087c98
13 years ago
rogerta@chromium.org ed2332542c Allow apply_issue.py to make api calls to rietveld that don't require
authentication.  Also allow apply_issue.py to specify a username if needed.

BUG=43563
TEST=Make sure that sending try jobs directly from rietveld works.

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@145600 0039d316-1c4b-4281-b951-d872f2087c98
13 years ago
maruel@chromium.org 34f6855218 Improve error message in patch application failure.
Make exception PatchApplicationFailed() self printable.

R=cmp@chromium.org
BUG=
TEST=


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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@136091 0039d316-1c4b-4281-b951-d872f2087c98
13 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 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 3cdb7f3661 Complete apply_issue.py.
This is to be able to apply patches directly from rietveld for the try server.

TEST=tested on both svn and git with binary files. unit tests will follow up.
R=dpranke@chromium.org
BUG=

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@84255 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