Commit Graph

1030 Commits (31dcb497a0dc6c462a064b4a0a8a40c238a88ce0)
 

Author SHA1 Message Date
maruel@chromium.org 31dcb497a0 Early exit auto-update when running as root.
Otherwise it can mess with file permissions.

R=dpranke@chromium.org
BUG=
TEST=

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@85178 0039d316-1c4b-4281-b951-d872f2087c98
14 years ago
sail@chromium.org 5538e022ab Remove presubmit warning for long lines in .grd files
The presubmit check complained about long lines in .grd files. This isn't a useful warning since .grd files aren't really source files.

The problem was that callers were passing in a file filter to InputApi.AffectedFiles but it was being ignored. Fix was to use the passed in file filter.

BUG=None
TEST=Ran on a local change and verified that I no longer got long line warnings on .grd files.
Review URL: http://codereview.chromium.org/6932060

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@85148 0039d316-1c4b-4281-b951-d872f2087c98
14 years ago
maruel@chromium.org 8571dac9c1 In r84572, I forgot to move CheckChangeSvnEolStyle() to commit-only check.
This check is also handled by the commit bot so no need to harass people when
uploading.

R=dpranke@chromium.org
BUG=none
TEST=Nobody wrote a test for PanProjectChecks() and I didn't write this function, no way I won't.

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@84814 0039d316-1c4b-4281-b951-d872f2087c98
14 years ago
maruel@chromium.org 2a471073e8 Make gcl and git-cl don't throw when a vim user does :cg
That's just noise for the maintainer.

R=dpranke@chromium.org
BUG=
TEST=

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@84803 0039d316-1c4b-4281-b951-d872f2087c98
14 years ago
maruel@chromium.org b1ce775c29 Move copyright and svn mime check presubmit checks to trigger on commit only.
The commit bot automagically fixes these issues so the devs don't need to fix these problems

TEST=none
BUG=none
R=dpranke@chromium.org

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@84572 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 04d22591ee Add back support for git mv files.
It was added in r80045 but was overwriten in r82495 when I synced upload.py to
r705 since upstreaming that part staled.

TBR=dpranke
TEST="git mv foo bar; git commit -a; git cl upload" shows 2 files, one A+, one D.
BUG=none

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@84264 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
bauerb@chromium.org 2e64fa1d6d Pass --rmdir to git svn dcommit to delete empty directories.
BUG=80178
TEST=none

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@84230 0039d316-1c4b-4281-b951-d872f2087c98
14 years ago
phajdan.jr@chromium.org 6e043f755b Remove unmaintained "gclient export" command,
introduced in http://src.chromium.org/viewvc/chrome?view=rev&revision=20990

It was intended for the tarball generation script,
but there was a better and simpler way.

BUG=80549
Review URL: http://codereview.chromium.org/6883263

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@83708 0039d316-1c4b-4281-b951-d872f2087c98
14 years ago
maruel@chromium.org 28924253a1 Caches socket.getfqdn(), send 'domain' when profiling.
Otherwise it's hard to know what's generated from automated testing.

R=chase@chromium.org
BUG=
TEST=

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@83673 0039d316-1c4b-4281-b951-d872f2087c98
14 years ago
rsesek@chromium.org 403a0f9f5a Don't eat newlines in CL descriptions when merging changes using drover.
BUG=80589
TEST=Merge a CL using drover and when prompted to upload, check that the original CL description still has its linebreaks.
Review URL: http://codereview.chromium.org/6893095

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@83561 0039d316-1c4b-4281-b951-d872f2087c98
14 years ago
maruel@chromium.org 7ca049ba14 Send googler profiling data.
BUG=
TEST=

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@83507 0039d316-1c4b-4281-b951-d872f2087c98
14 years ago
floitsch@google.com eaab784bcf Add --transitive flag.
When specifying a revision (with -r) propagates the date of the revision to its children.

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@83313 0039d316-1c4b-4281-b951-d872f2087c98
14 years ago
nick@chromium.org 2a3ab7e861 presubmit_support: cache the result of ChangedContents.
Review URL: http://codereview.chromium.org/6897005

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@83228 0039d316-1c4b-4281-b951-d872f2087c98
14 years ago
maruel@chromium.org 0bcd1d3430 Make subprocess2.check_call() compliant with subprocess.check_call().
Rename check_call to check_call_out. It's a quite specific need when stderr is
needed or when the user doesn't want the default arguments of check_output.

R=dpranke@chromium.org
BUG=
TEST=

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@83023 0039d316-1c4b-4281-b951-d872f2087c98
14 years ago
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