Commit Graph

93 Commits (6562e9d0cdcd8cd9d4e1ee341c2327216c6ca3e4)

Author SHA1 Message Date
ilevy@chromium.org 375a902f83 Add short options for git cl presubmit
Adding -u and -f as short options for --upload and --force.
There is precedent for these short options elsewhere in
git_cl.py

TBR=maruel@chromium.org

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@175310 0039d316-1c4b-4281-b951-d872f2087c98
12 years ago
ukai@chromium.org 8ef7ab251c Don't call settings.GetIsGerrit() before parser.parse_args()
settings.GetIsGerrit() would invoke logging.basicConfig() and
preemtps the basicConfig for verbose option in parser.parse_args.

R=maruel@chromium.org,ilevy@chromium.org
BUG=162600

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@169843 0039d316-1c4b-4281-b951-d872f2087c98
12 years ago
ilevy@chromium.org a78f7c0271 Rollback UpgradeToHttps for viewvc links
- Many chrome-internal viewvc links do not support https.  UpgradeToHttps
  was added 10 months ago  and continues to generate broken viewvc links.

Reverts part of crrev.com/9214004

BUG=107838

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@169815 0039d316-1c4b-4281-b951-d872f2087c98
12 years ago
maruel@chromium.org 4bac4b5517 Create CachingRietveld to automatically cache results for presubmit checks.
Multiple presubmit checks may call the same function multiple times, so it's
worth caching the results to speed up the presubmit check run.

Convert presubmit_support, git-cl and gcl to use it.

R=dpranke@chromium.org
BUG=


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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@169726 0039d316-1c4b-4281-b951-d872f2087c98
12 years ago
ilevy@chromium.org 828801956f Add logging in git_cl::CMDupload
Add some logging when CMDupload is passed a verbosity option.

R=maruel@chromium.org
BUG=


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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@169434 0039d316-1c4b-4281-b951-d872f2087c98
12 years ago
ilevy@chromium.org 0f58fa88ef git_cl sanity checks
Added checks:
- Block upload of a diff from sha not in current branch
  (this includes tracking against an unrebased local master)
- Block upload of a diff containing shas from origin/master
  (should never happen)

- Use explicit calls to git merge-base instead of calling git diff
   with "<branch>..." which implicitly uses merge-base.

BUG=157503

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@165887 0039d316-1c4b-4281-b951-d872f2087c98
12 years ago
ukai@chromium.org 259e46891c git-cl: show dirty files if any
R=chase@chromium.org,szager@chromium.org,maruel@chromium.org
BUG=157398
Review URL: https://codereview.chromium.org/11262004

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@164026 0039d316-1c4b-4281-b951-d872f2087c98
13 years ago
sivachandra@chromium.org aebe87f424 Add gerrit Change-Id to commit messages if they do not have one.
BUG=156729


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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@163366 0039d316-1c4b-4281-b951-d872f2087c98
13 years ago
iannucci@chromium.org 7954005862 Allow users of git cl to disable git copy detection entirely.
Depends on rietveld cl: https://codereview.appspot.com/6726050/
BUG=155511

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@163092 0039d316-1c4b-4281-b951-d872f2087c98
13 years ago
cmp@chromium.org c22ea4bc1d Make repos without VIEW_VC also post Committed to the codereview.
R=maruel@chromium.org
BUG=153446


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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@160960 0039d316-1c4b-4281-b951-d872f2087c98
13 years ago
iannucci@chromium.org 53937ba767 Add option to specify similarity level for git diff operations on commandline
BUG=125983

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@159732 0039d316-1c4b-4281-b951-d872f2087c98
13 years ago
ilevy@chromium.org f3b2123a71 Disable jobs sent directly to triggered bots
- and display a warning message

BUG=146713


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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@158377 0039d316-1c4b-4281-b951-d872f2087c98
13 years ago
maruel@chromium.org 072d94b68f Do not enforce HEAD when a revision is not specified.
This brings back git cl try to try at LKGR instead of HEAD, which is coherent
with git-try and gcl try.

R=rogerta@chromium.org
BUG=


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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@157810 0039d316-1c4b-4281-b951-d872f2087c98
13 years ago
binji@chromium.org 0281f52cf3 Running git cl patch sets the rietveld patchset.
BUG=none


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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@156796 0039d316-1c4b-4281-b951-d872f2087c98
13 years ago
iannucci@chromium.org 1512ab681a Fix git_cl diffstat to use -l100000 to match upload.py
Enables git to correctly detect copies and renames simultaneously.

BUG=144408


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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@155899 0039d316-1c4b-4281-b951-d872f2087c98
13 years ago
maruel@chromium.org 1519240e06 Add git cl try that tries from Rietveld.
Thin wrapper to process --bot and --testfilter to keep compability with gcl try
and git-try and pass the data directly to Rietveld.

R=rogerta@chromium.org
BUG=


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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@155176 0039d316-1c4b-4281-b951-d872f2087c98
13 years ago
sbc@chromium.org 495ad15721 Add --force option for presubmit command which
allows one to run the presubmit script without
submitting locally (alternative would be to make 
this a warning I guess).

Also, pass option.verbose through to DoGetTrySlaves()
so it will log which PRESUBMIT files are taking part
in the decision.

BUG=

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@154838 0039d316-1c4b-4281-b951-d872f2087c98
13 years ago
maruel@chromium.org 4c422e9b8c options.from_logs is not used anywhere since it's the default.
R=rogerta@chromium.org
BUG=


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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@153976 0039d316-1c4b-4281-b951-d872f2087c98
13 years ago
erg@chromium.org 1a17398a93 --bypass-hooks should bypass all checks, including descriptions checks.
(Adding this after the pretty bad build bustage today.)


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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@153966 0039d316-1c4b-4281-b951-d872f2087c98
13 years ago
maruel@chromium.org 5242430342 Enforce coherent type handling in git_cl.py
Issue and patchset can only be int, so store them as ints.
This fixes git cl comment, which was broken by r152756.

R=petermayo@chromium.org
BUG=


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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@153885 0039d316-1c4b-4281-b951-d872f2087c98
13 years ago
brettw@chromium.org ac0ba33c80 Add the ability to set the upstream branch
I can never remember the syntax (and always forget I have to specify the branch to set the upstream branch on) when using "git branch".

This patch just allows git-cl upstream to set the branch if an argument is provided. With no arg it prints the current one as it does today.

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@150945 0039d316-1c4b-4281-b951-d872f2087c98
13 years ago
joshua.lock@intel.com 426f69b485 Remove the use of urllib for SSL connections
Using urllib for SSL connections when behind a proxy is known to be
broken.

Upstream has fixed this in urllib2 in Python 2.6.3 and newer so
replace uses of urllib for SSL connections with urllib2 methods.

R=maruel@chromium.org
BUG=134165
TEST=gclient sync behind corporate proxy. Submitting this CL with git_cl.


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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@149742 0039d316-1c4b-4281-b951-d872f2087c98
13 years ago
jamesr@chromium.org 35d1a84d76 Remove autogeneration of TEST= and automated check
Review URL: https://chromiumcodereview.appspot.com/10827059

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@148672 0039d316-1c4b-4281-b951-d872f2087c98
13 years ago
maruel@chromium.org 49e3d807fd Fix stats output to be always the same and coherent with what is committed.
git cl dcommit statistics were not using --find-copies-harder, scaring the user
off.

R=cmp@chromium.org
BUG=
TEST=


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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@147343 0039d316-1c4b-4281-b951-d872f2087c98
13 years ago
szager@chromium.org e84b7541ce Add test for git-svn with submodule/merge layout.
Review URL: https://chromiumcodereview.appspot.com/10543151

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@142479 0039d316-1c4b-4281-b951-d872f2087c98
13 years ago
szager@chromium.org 9bb85e2d87 Add support for new repo topology, with submodule-specific merge commits
on origin/master.

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@141958 0039d316-1c4b-4281-b951-d872f2087c98
13 years ago
cmp@chromium.org 5cf7022b80 Turn on git diff copy detection for git-cl upload.
Enable copy detection for git-cl upload.  This makes
it possible to copy a directory containing many files,
add+commit the new path, and then upload a patch to
Rietveld that shows the files were copied.

In my tests, -C -C was needed to pick up a basic
file copy.  -C was not enough.  I'm not sure why
exactly.  The output generated in the diff looks
like:

  sh$ git diff -C -C HEAD~1..HEAD
  diff --git a/slave/Makefile b/slave2/Makefile
  similarity index 100%
  copy from slave/Makefile
  copy to slave2/Makefile
  ...

(This change requires r141676 /
https://chromiumcodereview.appspot.com/10543116/ which
updates upload.py to use --find-copies-harder.)

R=maruel@chromium.org

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@141689 0039d316-1c4b-4281-b951-d872f2087c98
13 years ago
maruel@chromium.org 9977a2e0f8 Add git cl comments to read rietveld comments without having to use the rietveld UI
R=cmp@chromium.org
BUG=
TEST=


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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@140865 0039d316-1c4b-4281-b951-d872f2087c98
13 years ago
cmp@chromium.org db9b0e3a04 Revert "Turn on git diff copy detection for git-cl upload."
This reverts commit db5a0def78.

TBR=maruel@chromium.org


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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@140808 0039d316-1c4b-4281-b951-d872f2087c98
13 years ago
cmp@chromium.org db5a0def78 Turn on git diff copy detection for git-cl upload.
Enable copy detection for git-cl upload.  This makes
it possible to copy a directory containing many files,
add+commit the new path, and then upload a patch to
Rietveld that shows the files were copied.

In my tests, -C -C was needed to pick up a basic
file copy.  -C was not enough.  I'm not sure why
exactly.  The output generated in the diff looks
like:

  sh$ git diff -C -C HEAD~1..HEAD
  diff --git a/slave/Makefile b/slave2/Makefile
  similarity index 100%
  copy from slave/Makefile
  copy to slave2/Makefile
  ...

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@140314 0039d316-1c4b-4281-b951-d872f2087c98
13 years ago
maruel@chromium.org 373af80c9e Revert r138874 "Automatically adds quotes on Windows when necessary"
This breaks _some_ msysgit uses cases. I'll investigate later.

TBR=cmp@chromium.org
BUG=
TEST=


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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@139114 0039d316-1c4b-4281-b951-d872f2087c98
13 years ago
maruel@chromium.org ca2b8e764e Automatically adds quotes on Windows when necessary
So that a command like
 "git config rietveld.viewvc-url http://src.chromium.org/viewvc/chrome?view=rev&revision="
works fine.

Fix the description automatically generated for the hooks to be using the same
code than for the one presented to the user.

R=cmp@chromium.org
BUG=
TEST=Tested manually on cygwin, win32, linux


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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@138874 0039d316-1c4b-4281-b951-d872f2087c98
13 years ago
rogerta@chromium.org 420d3b8f0e When converting -m/--message to -t, make sure to handle the case --message=foo
correctly.  Also fix git_cl.py.

BUG=None
TEST=Make sure that the -m command line option to gcl upload/git cl upload
does not add a new message to the rietveld issue.  The string associated to the
--message argument should only be used as the patchset title.

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@136922 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
kalmard@homejinni.com 6b0051e7c6 Allow overriding base-url in git-cl.
This is useful if git-cl has no way to find out the original svn repo's url
and the user does not wish to configure git-svn and fetch the repository.

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@130372 0039d316-1c4b-4281-b951-d872f2087c98
13 years ago
rch@chromium.org 92d67165eb Allow longer branch names to be center justified with git cl status.
(Using "." instead of " " so that codereview shows the alignment)

Before:

% git cl status  
Branches associated with reviews:
..CloseIdleSpdySessions:.None
..CloseSockets:.9755011
..GetNegotiatedProtocol:.9958028
..LayeredSocketPool:.9861032
..ReleaseIdleSpdySessions:.9733017
..SSLClientSocket:.9616019
.......Spdy3:.9958023
...SpdyProxy:.None
...SpdyTests:.None
.......crash:.9809033
........leak:.None
......master:.None
.......spdy3:.9958023

After

% git cl status
Branches associated with reviews:
......CloseIdleSpdySessions:.None
...............CloseSockets:.9755011
......GetNegotiatedProtocol:.9958028
..........LayeredSocketPool:.9861032
....ReleaseIdleSpdySessions:.9733017
............SSLClientSocket:.9616019
......................Spdy3:.9958023
..................SpdyProxy:.None
..................SpdyTests:.None
......................crash:.9809033
.......................leak:.None
.....................master:.None
......................spdy3:.9958023

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@130189 0039d316-1c4b-4281-b951-d872f2087c98
13 years ago
jmbaker@chromium.org a2cbbbb35e Choosing a default remote for determining base_url.
BUG=116057

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@128293 0039d316-1c4b-4281-b951-d872f2087c98
13 years ago
maruel@chromium.org 82798cbb32 Enforce python 2.6 or later.
TBR=bevc@chromium.org
BUG=
TEST=


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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@123276 0039d316-1c4b-4281-b951-d872f2087c98
13 years ago
maruel@chromium.org 71e12a9e41 Update upload.py @ fae51921ad9d
This version of upload.py is slightly less annoying, it won't cancel out if no
patchset title is provided and disable colors all the time.

R=cmp@chromium.org
BUG=
TEST=

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@121826 0039d316-1c4b-4281-b951-d872f2087c98
13 years ago
ukai@chromium.org 78c4b98fc3 Download hooks only in "git cl config"
also, use http download instead of scp,
because scp won't work well on Windows.

BUG=chromium:113153
Review URL: https://chromiumcodereview.appspot.com/9369023

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@121820 0039d316-1c4b-4281-b951-d872f2087c98
13 years ago
evan@chromium.org 0af9b70a02 git-cl: split GetRietveldServer from GetIssue
Should be no functional change.
Necessary for a follow-up change I'm making.

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@121590 0039d316-1c4b-4281-b951-d872f2087c98
13 years ago
evan@chromium.org 5b5d043a5a git_cl: drop migration code
Everyone at this point should have been migrated to the new format.

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@121509 0039d316-1c4b-4281-b951-d872f2087c98
13 years ago
ukai@chromium.org 19bbfa2db2 Fix receive-pack
If we quote as --receive-pack="git receive-pack --reviewer=foo@example.com",
git will try to run "git receive-pack --reviewer=foo@example.com" command
and failed like this

Gerrit Code Review: git receive-pack --reviewer=foo@example.com: not found
fatal: The remote end hung up unexpectedly
Command "git push --receive-pack="git receive-pack --reviewer=foo@example.com" origin HEAD:refs/for/master" failed.

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@120337 0039d316-1c4b-4281-b951-d872f2087c98
13 years ago
ukai@chromium.org e807781320 Add minimal Gerrit support to 'git cl config' and 'git cl upload'
This is the bare beginnings of Gerrit support for (non-repo) depot_tools,
based on Roland's work.
Differnt from http://codereview.chromium.org/8826015/
 it read codereview.settings and if it has GERRTI_HOST and GERRIT_PORT,
 then "git cl config" configured it for gerrit.
   installs hooks/commit-msg
   git config gerrit.host $GERRIT_HOST
   git config gerrit.port $GERRIT_PORT

 if it has gerrit.host config, "git cl upload" will upload a change
 to gerrit as
   "git push --receive-pack=... origin master"
 it scans description and extract reviewers from R= line.

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@120276 0039d316-1c4b-4281-b951-d872f2087c98
13 years ago
jam@chromium.org 3108364f7c Revert 119066 until we have consensus.
TBR=ben
Review URL: https://chromiumcodereview.appspot.com/9298002

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@119353 0039d316-1c4b-4281-b951-d872f2087c98
13 years ago
maruel@chromium.org 2b40b89ae1 Update upload.py @827fa087f74d, which includes support for svn 1.7
It also removes the need of manually creating a subject argument.

Other related changes in this CL:
- Reenable the prompt for patchset title in gcl. I'm not sure why it was disabled.
- Remove git cl upload --desc_from_logs flag. --force is already meaningful.

R=cmp@chromium.org
BUG=
TEST=

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@119066 0039d316-1c4b-4281-b951-d872f2087c98
13 years ago
maruel@chromium.org b0a6391f1c Fix --force implementation to not prompt but still run hooks
I found out that some devs thought that -f just skipped the prompt, but it did
in fact also skip the presubmit checks.
Make -f do what it should, no prompt and just return if the presubmit check
failed.

R=cmp@chromium.org
BUG=
TEST=


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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@117918 0039d316-1c4b-4281-b951-d872f2087c98
13 years ago
maruel@chromium.org 2e72bb1c2d Overhaul breakpad to optionally disable output. Add git-cl dcommit unit test.
This required fixing the adhoc mock to be more versatile.

TBR=cmp@chromium.org
BUG=
TEST=


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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@117896 0039d316-1c4b-4281-b951-d872f2087c98
13 years ago
maruel@chromium.org eb5edbcfde Add UpgradeToHttps() to reliably and forcibly upgrade all urls to https.
Enable it for git-cl and gcl.

R=nsylvain@chromium.org
BUG=107838
TEST=New connections go through https://


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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@117857 0039d316-1c4b-4281-b951-d872f2087c98
13 years ago
maruel@chromium.org 99ac1c5808 Dedupe codereview.settings parsing code. Add more testing.
So any modification to the defaults is coded at only one place.

TBR=nsylvain@chromium.org
BUG=107838
TEST=


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

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