Commit Graph

1014 Commits (6f323bbad2e5f1f2a1febf8225f558e6e23b9c75)
 

Author SHA1 Message Date
maruel@chromium.org 6f323bbad2 Fix when entry is None.
When the tree is not versionned, svn can return <info></info>.

R=dpranke@chromium.org
BUG=
TEST=

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@83020 0039d316-1c4b-4281-b951-d872f2087c98
14 years ago
maruel@chromium.org ff3e4a87b1 Fix constructor arguments to OSError.
R=dpranke@chromium.org
BUG=
TEST=

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@82763 0039d316-1c4b-4281-b951-d872f2087c98
14 years ago
nick@chromium.org e06cb4e55d Optimize presubmit checks for win32 where determining the diff
seems to take an inordinate amount of time.  The idea is to
lint whole files, and only try to compute deltas if the file
contains at least one error.

For my environment, the three affected presubmit rules took
2000ms each for a 4-file changelist.  With this change,
all my rules run in about a second, and none take anything
close to 500ms.

Also, since there seem to be environment-dependent factors at
work here, I'm proposing putting timer warnings that print
a message if any check takes longer than 500ms.
Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=82559
Reverted: http://src.chromium.org/viewvc/chrome?view=rev&revision=82568
Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=82607
Reverted: http://src.chromium.org/viewvc/chrome?view=rev&revision=82653
Review URL: http://codereview.chromium.org/6883050

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@82762 0039d316-1c4b-4281-b951-d872f2087c98
14 years ago
nick@chromium.org 7b45069a28 :Revert r82607 (reportedly takes forever on long changes)
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@82653 0039d316-1c4b-4281-b951-d872f2087c98
14 years ago
nick@chromium.org 9c765d7aa1 Optimize presubmit checks for win32 where determining the diff
seems to take an inordinate amount of time.  The idea is to
lint whole files, and only try to compute deltas if the file
contains at least one error.

For my environment, the three affected presubmit rules took
2000ms each for a 4-file changelist.  With this change,
all my rules run in about a second, and none take anything
close to 500ms.

Also, since there seem to be environment-dependent factors at
work here, I'm proposing putting timer warnings that print
a message if any check takes longer than 500ms.
Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=82559
Reverted: http://src.chromium.org/viewvc/chrome?view=rev&revision=82568
Review URL: http://codereview.chromium.org/6883050

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@82607 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
nick@chromium.org cfbdd987b6 Revert 82559.
Review URL: http://codereview.chromium.org/6896004

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@82568 0039d316-1c4b-4281-b951-d872f2087c98
14 years ago
nick@chromium.org baa40e63f9 Optimize presubmit checks for win32 where determining the diff
seems to take an inordinate amount of time.  The idea is to
lint whole files, and only try to compute deltas if the file
contains at least one error.

For my environment, the three affected presubmit rules took
2000ms each for a 4-file changelist.  With this change,
all my rules run in about a second, and none take anything
close to 500ms.

Also, since there seem to be environment-dependent factors at
work here, I'm proposing putting timer warnings that print
a message if any check takes longer than 500ms.
Review URL: http://codereview.chromium.org/6883050

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@82559 0039d316-1c4b-4281-b951-d872f2087c98
14 years ago
maruel@chromium.org 1c5518eae4 Update upload.py to r705.
R=dpranke@chromium.org
BUG=
TEST=

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@82495 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
maruel@chromium.org 39f645ff57 Unicode input is also accepted for stdin.
R=dpranke@chromium.org
BUG=
TEST=

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@82410 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
bauerb@chromium.org 512f1ef7fd Pass relative paths to GIT.CaptureStatus
BUG=79953
TEST=see bug

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@82290 0039d316-1c4b-4281-b951-d872f2087c98
14 years ago
mark@chromium.org 736aefea58 Only show "Depot Tools has been updated" messages when the tools are actually
updated; show the real last-change revision and not the current HEAD revision.

BUG=none
TEST=none
Review URL: http://codereview.chromium.org/6881049

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@82124 0039d316-1c4b-4281-b951-d872f2087c98
14 years ago
maruel@chromium.org 1f063db16a Make subprocess2.call() returned values to be the same as subprocess.call().
Renamed the previous subprocess2.call() to subprocess2.communicate().

R=dpranke@chromium.org
BUG=
TEST=

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@81976 0039d316-1c4b-4281-b951-d872f2087c98
14 years ago
maruel@chromium.org e3db855656 Fix drover regression introduced in r80453.
getSVNInfo() is expected to fail in some use case. Make this behavior explicit.

R=dpranke@chromium.org
BUG=
TEST=

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@81970 0039d316-1c4b-4281-b951-d872f2087c98
14 years ago
bauerb@chromium.org 6fb99c6ff8 Make RunHooks a method on ChangeList.
BUG=none
TEST=watchlists work again.

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@81950 0039d316-1c4b-4281-b951-d872f2087c98
14 years ago
maruel@chromium.org ea7c855b52 Inhibit python subprocess from generating .pyc files anymore.
This would case a failure when:
- a .py file is moved
- *.pyc is in svn:ignore, causing the .pyc to not be deleted.
- the new .py modifies its API.
- another .py imports the old .py and uses the new API.

R=dpranke@chromium.org
BUG=
TEST=

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@81942 0039d316-1c4b-4281-b951-d872f2087c98
14 years ago
maruel@chromium.org 0d5ef24c5d Use a marker instead of a string so it can be distingished when used as stdin.
R=dpranke@chromium.org
BUG=
TEST=

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@81941 0039d316-1c4b-4281-b951-d872f2087c98
14 years ago
maruel@chromium.org 3bc36d136c Remove remaining cygwin check in wrapper scripts.
Looks like we had forgot gcl.

R=dpranke@chromium.org
BUG=
TEST=

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@81654 0039d316-1c4b-4281-b951-d872f2087c98
14 years ago
maruel@chromium.org 6493ed1980 Fix rietveld_url parameter, remove default argument and realign code.
TBR=dpranke@chromium.org
BUG=
TEST=

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@81579 0039d316-1c4b-4281-b951-d872f2087c98
14 years ago
maruel@chromium.org 58407af8be Add author to Change object. Don't set it yet.
It's mostly to be used with the commit queue.

R=dpranke@chromium.org
BUG=
TEST=

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@81326 0039d316-1c4b-4281-b951-d872f2087c98
14 years ago
scottbyer@chromium.org 6fe66e1946 update_depot_tools: Workaound svn symlink issue.
svn info doesn't like it when handed a symlink - you get an 'is not a working copy' error message. Unfortunately, the Mac uses BSD readlink, and doesn't have -f, so the subshell CD/PWD idiom must be used.

BUG=none
TEST=Create a symlink to depot_tools, put it early in your path, and do update_depot_tools. You should not get any 'not a working copy' error messages.
Review URL: http://codereview.chromium.org/6838001

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@81323 0039d316-1c4b-4281-b951-d872f2087c98
14 years ago
maruel@chromium.org c193875b49 Use class-level variable instead of instance members for Change object.
R=dpranke@chromium.org
BUG=
TEST=

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@81322 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 4a982271a7 Defaults stdin to VOID for capture and check_output()
Since no output is user visible anyway, causing a hang with no clue about what
to type in.

R=dpranke@chromium.org
BUG=
TEST=

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@81302 0039d316-1c4b-4281-b951-d872f2087c98
14 years ago
maruel@chromium.org 6c7723e796 Add --verbose flag when input_api.verbose is set.
It could result in failed tests so I'll revert if it ever becomes problematic.
It ran fine with my limited testing.

R=dpranke@chromium.org
BUG=
TEST=

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@81279 0039d316-1c4b-4281-b951-d872f2087c98
14 years ago
maruel@chromium.org cab38e994e First stab at using Rietveld wrapper object in both gcl.py and git-cl.
Exposes InputApi.rietveld and deprecate host_url.

This is useful since it places authentication at a single place.

BUG=
TEST=

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@81019 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 899e1c1a61 Add verbose support throught presubmit checks
Add propagation of verbose flag from git cl to presubmit_support

Rename NotImplementedException to standard NotImplementError.

R=dpranke@chromium.org
BUG=
TEST=

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@80798 0039d316-1c4b-4281-b951-d872f2087c98
14 years ago
maruel@chromium.org ade9c5953d Fix case where wc_info is not present.
Reapply r80770 "Switch from xml.dom.minidom to xml.etree".

TBR=dpranke@chromium.org
BUG=
TEST=

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@80785 0039d316-1c4b-4281-b951-d872f2087c98
14 years ago
maruel@chromium.org 1d9f62946b Set returncode to subprocess2.TIMED_OUT instead of -9 when a process times out.
R=dpranke@chromium.org
BUG=
TEST=

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@80775 0039d316-1c4b-4281-b951-d872f2087c98
14 years ago
maruel@chromium.org d25fb8f68b Revert r80770 "Switch from xml.dom.minidom to xml.etree"
Throws exceptions on mac.

R=dpranke@chromium.org
BUG=
TEST=

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@80771 0039d316-1c4b-4281-b951-d872f2087c98
14 years ago
maruel@chromium.org 949d1a6a9e Switch from xml.dom.minidom to xml.etree
The reason of this change (beside deleting 30 lines) is to fix pylint on Mac.
For an unknown reason, it was dying here trying to process the minidom import.

R=dpranke@chromium.org
BUG=
TEST=

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@80770 0039d316-1c4b-4281-b951-d872f2087c98
14 years ago
bauerb@chromium.org ae6df35852 Don't store rietveld.extracc in git config.
BUG=none
TEST=no more git config spam!

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@80646 0039d316-1c4b-4281-b951-d872f2087c98
14 years ago
maruel@chromium.org c98c0c5249 Make more tests pass on Windows.
Also fix a few issues found along the way.

Tests had regressed a lot. Add a lot of tweaks to make most test pass.

R=dpranke@chromium.org
BUG=
TEST=

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@80618 0039d316-1c4b-4281-b951-d872f2087c98
14 years ago
maruel@chromium.org ccbb781aa7 Convert PRESUBMIT.py to use check_output() instead of Popen().
Fix execution on windows.

Remove more code.

R=dpranke@chromium.org
BUG=
TEST=

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@80617 0039d316-1c4b-4281-b951-d872f2087c98
14 years ago
maruel@chromium.org 0e766050d2 Use check_call() instead of Popen() for canned checks.
This removes a significant amount of code.

R=dpranke@chromium.org
BUG=
TEST=

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@80616 0039d316-1c4b-4281-b951-d872f2087c98
14 years ago
maruel@chromium.org 84f4fe3755 Use subprocess2 so check_call() can be use consistently in presubmit checks.
Do s/Popen+communicate/check_call/ replacement in a later change in case it
breaks something.

R=dpranke@chromium.org
BUG=
TEST=

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@80615 0039d316-1c4b-4281-b951-d872f2087c98
14 years ago
maruel@chromium.org f08b09c2af Fix automatic shell detection, the check was reversed
Improved tests and added regression test.

R=dpranke@chromium.org
BUG=
TEST=

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@80614 0039d316-1c4b-4281-b951-d872f2087c98
14 years ago
maruel@chromium.org eba4022de8 Add subprocess2 unit tests
R=dpranke@chromium.org
BUG=
TEST=

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@80454 0039d316-1c4b-4281-b951-d872f2087c98
14 years ago
maruel@chromium.org 98385dd58b Convert drover.py to subprocess2.
R=dpranke@chromium.org
BUG=
TEST=

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@80453 0039d316-1c4b-4281-b951-d872f2087c98
14 years ago
maruel@chromium.org e8c2862373 Fix "local variable 'url' referenced before assignment" error.
TBR=dpranke@chromium.org
BUG=
TEST=

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@80452 0039d316-1c4b-4281-b951-d872f2087c98
14 years ago
maruel@chromium.org 3ed3e5e4b2 Update svn:ignore
NO CODE CHANGE.


git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@80358 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
maruel@chromium.org 31cb48a436 First pass to transition away for gclient_utils.Error and gclient_utils.CheckedCallError.
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
14 years ago
maruel@chromium.org 9ce0dff69d upload.py has a raw_input() that keeps on throwing crap, try to trap it as much as possible.
Otherwise I get useless stack traces and the user too.

R=dpranke@chromium.org
BUG=
TEST=

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@80338 0039d316-1c4b-4281-b951-d872f2087c98
14 years ago
maruel@chromium.org a2d7edf8fc gcl delete <non-existent change> won't throw an exception anymore
R=dpranke@chromium.org
BUG=
TEST=

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@80337 0039d316-1c4b-4281-b951-d872f2087c98
14 years ago
maruel@chromium.org 58ef297bc5 Revert r80216 "Reapply r79779: "Removed gclient_utils.Popen() and use subprocess2's ...""
Horked windows slaves this time.

R=dpranke@chromium.org
BUG=
TEST=

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@80220 0039d316-1c4b-4281-b951-d872f2087c98
14 years ago
maruel@chromium.org 93ef410768 Reapply r79779: "Removed gclient_utils.Popen() and use subprocess2's version instead."
It should be fine now that I've fixed python2.5 compatilibity issues in subprocess2.py.

R=dpranke@chromium.org
BUG=
TEST=

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

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