Commit Graph

240 Commits (a1950c4e56622c0b89a3e0d1c5579e5e1c6b2887)

Author SHA1 Message Date
iannucci@chromium.org a1950c4e56 Fix git-cl-dcommit hook tests.
TBR=agable@chromium.org, jrobbins@chromium.org, maruel@chromium.org
BUG=

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@293275 0039d316-1c4b-4281-b951-d872f2087c98
10 years ago
kjellander@chromium.org 6abc652428 Rewrite Google Code http URLs with https on git svn dcommit.
This fix is created to avoid having to rebuild all the WebRTC
Git mirrors since they're configured to sync with the http URL
instead of https (resulting in git-svn-id Git footers with the
http URL in the commit messages). Without rewriting this, it is
not possible to commit to SVN since Google code disallows committing
to a http URL.

BUG=412012
TEST=Created a CL using a Git repo like this (both before and after landing https://webrtc-codereview.appspot.com/32569004):
git clone https://chromium.googlesource.com/external/webrtc.git
cd webrtc
git auto-svn
git checkout master
git checkout -b test
(edit whitespace change)
git commit -am "Whitespace edit
git cl upload --bypass-hooks"
git cl dcommit

R=agable@chromium.org, machenbach@chromium.org, mmoss@chromium.org

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@293171 0039d316-1c4b-4281-b951-d872f2087c98
10 years ago
carlosk@chromium.org 71284d9bcb Improved git cl patch generated commit message to include patchset information
and a link to it.

BUG=

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@292940 0039d316-1c4b-4281-b951-d872f2087c98
10 years ago
maruel@chromium.org 5cab2d37e3 Fix git cl comments when there's no issue associated with the current branch.
It currently crashes, which is sad.

R=pgervais@chromium.org
BUG=

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@292899 0039d316-1c4b-4281-b951-d872f2087c98
10 years ago
apavlov@chromium.org e4efd51bf9 Extend the git-cl-comments command functionality
The "comments" command is taught to:
- accept an arbitrary review issue id;
- post comments on the current or specified review issue.

This is required for the auto-rebaseline bot to notify a
rebaseline requestor of the fact that the rebaseline has happened
by means of posting a comment to the review issue that requested
the rebaseline, as suggested by iannucci@.

R=iannucci, szager, dpranke

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@292844 0039d316-1c4b-4281-b951-d872f2087c98
10 years ago
thakis@chromium.org 3421c992cc Be a bit more space-efficient.
BUG=none

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@292792 0039d316-1c4b-4281-b951-d872f2087c98
10 years ago
szager@chromium.org d62c61fedd Make 'git cl patch' work when not on a named branch.
R=maruel@chromium.org,pgervais@chromium.org
BUG=

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@292537 0039d316-1c4b-4281-b951-d872f2087c98
11 years ago
jam@chromium.org 80c51aefb8 Revert 292493 since it broke CQ
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@292513 0039d316-1c4b-4281-b951-d872f2087c98
11 years ago
sbc@chromium.org 82549e0c42 Fix reitveld base URL for googlesource.com repos.
The base url was previously being generated as
URL@BRANCH.  I'm not sure if this works anywhere
but it certainly doesn't on googlesource.com.
Here we want URL/+/BRANCH.

R=iannucci@chromium.org, sergeyberezin@chromium.org

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@292493 0039d316-1c4b-4281-b951-d872f2087c98
11 years ago
mark@chromium.org 782570c484 Report the entire hash in the "committed" message.
This concerns the "committed" message posted to Rietveld. Prior to
34504a15bb, this used the committer's own core.abbrev. Now it's using
a hard-coded 7. Per recent discussions on chromium-dev, 7 is
insufficient to uniquely identify commits in large repositories such as
ours. If any abbreviation is to be done, a 12-digit minimum should be
used, but there's no reason not to use the entire hash.

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@292164 0039d316-1c4b-4281-b951-d872f2087c98
11 years ago
jsbell@chromium.org b99fbd9c45 Factor out Changelist GetStatus() for eventual use by other tools
Pulls the logic for computing an issue's "status" - has LGTM, is in
CQ, etc. - out of the "git cl status" command itself, so that other
tools can get the status of a Changelist.

BUG=379849
R=iannucci@chromium.org

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@291928 0039d316-1c4b-4281-b951-d872f2087c98
11 years ago
maruel@chromium.org 552c31baf2 Fix ascii art escaping.
This was done because a line ending with a '\' will not be printed properly.
Completely escape the string.

R=stip@chromium.org
BUG=

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@291906 0039d316-1c4b-4281-b951-d872f2087c98
11 years ago
maruel@chromium.org 29404b59d2 Add git cl lol.
Because everyone needs humour.

Fix a small bug in subcommands.py with undocumented commands.

R=stip@chromium.org
BUG=

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@291867 0039d316-1c4b-4281-b951-d872f2087c98
11 years ago
thakis@chromium.org 5f32a966af Grammar up.
BUG=
TBR=iannucci

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@291835 0039d316-1c4b-4281-b951-d872f2087c98
11 years ago
thakis@chromium.org bd2a9b9720 Make git cl format work on my Windows box.
For me, PATH was a unicode instead of a str for some reason, so things
failed with

D:\src\chromefetch\src>git cl format
Traceback (most recent call last):
  File "d:\src\depot_tools\git_cl.py", line 2821, in <module>
    sys.exit(main(sys.argv[1:]))
  File "d:\src\depot_tools\git_cl.py", line 2807, in main
    return dispatcher.execute(OptionParser(), argv)
  File "d:\src\depot_tools\subcommand.py", line 245, in execute
    return command(parser, args[1:])
  File "d:\src\depot_tools\git_cl.py", line 2768, in CMDformat
    stdout = RunCommand(cmd, stdin=diff_output, cwd=top_dir, env=env)
  File "d:\src\depot_tools\git_cl.py", line 81, in RunCommand
    return subprocess2.check_output(args, shell=False, **kwargs)
  File "d:\src\depot_tools\subprocess2.py", line 515, in check_output
    return check_call_out(args, stdout=PIPE, **kwargs)[0]
  File "d:\src\depot_tools\subprocess2.py", line 475, in check_call_out
    out, returncode = communicate(args, **kwargs)
  File "d:\src\depot_tools\subprocess2.py", line 449, in communicate
    proc = Popen(args, **kwargs)
  File "d:\src\depot_tools\subprocess2.py", line 237, in __init__
    super(Popen, self).__init__(args, **kwargs)
  File "d:\src\depot_tools\python276_bin\lib\subprocess.py", line 709, in __init__
    errread, errwrite)
  File "d:\src\depot_tools\python276_bin\lib\subprocess.py", line 957, in _execute_child
    startupinfo)
TypeError: environment can only contain strings
Sending crash report ...
  args: ['d:\\src\\depot_tools\\git_cl.py', 'format']
  cwd: D:\src\chromefetch\src
  exception: environment can only contain strings
  host: THAKIS1-W.ad.corp.google.com
  stack:   File "d:\src\depot_tools\git_cl.py", line 2821,
  user: thakis
  version: 2.7.6 (default, Nov 10 2013, 19:24:18)

This fixes the glitch.

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@291825 0039d316-1c4b-4281-b951-d872f2087c98
11 years ago
iannucci@chromium.org bbe9cc5aa8 Return 1 from git_cl land when you Ctrl-C it in the middle.
R=agable@chromium.org, mmoss@chromium.org
BUG=

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@291823 0039d316-1c4b-4281-b951-d872f2087c98
11 years ago
piman@chromium.org 336f9125c0 Add a --tbr-owners option to git cl upload
BUG=410125

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@291794 0039d316-1c4b-4281-b951-d872f2087c98
11 years ago
iannucci@chromium.org 34504a15bb Use full hash in Committed link when closing issue via git-cl.
R=agable@chromium.org, vadimsh@chromium.org
BUG=

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@291751 0039d316-1c4b-4281-b951-d872f2087c98
11 years ago
iannucci@chromium.org 6c217b1fd6 Make git-cl-{dcommit,land} fail if retcode is not zero after push.
R=dnj@chromium.org, vadimsh@chromium.org
BUG=409170

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@291745 0039d316-1c4b-4281-b951-d872f2087c98
11 years ago
iannucci@chromium.org e6896b5818 Make git-cl-land wait
R=vadimsh@chromium.org
BUG=406198

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@291719 0039d316-1c4b-4281-b951-d872f2087c98
11 years ago
rmistry@google.com 52d224a24e Add the patchset id to the manual commit messages
Context is here:
https://groups.google.com/a/chromium.org/d/msg/chromium-dev/M7f9VTqrR8w/RECOX2Y5YasJ

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@291687 0039d316-1c4b-4281-b951-d872f2087c98
11 years ago
vadimsh@chromium.org 749fbd9a50 Be verbose about what's happening in 'git cl land' when pusing to pending ref.
Also reduce number of attempts and give up right away on ACL errors.

R=iannucci@chromium.org
BUG=407369,407470

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@291656 0039d316-1c4b-4281-b951-d872f2087c98
11 years ago
mmoss@chromium.org e75854552e Fix git-cl when working on branches.
This updates various assumptions to coincide with how gclient fetches
branch-heads refs from chromium repos.

R=iannucci@google.com
BUG=406858

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@291586 0039d316-1c4b-4281-b951-d872f2087c98
11 years ago
jam@chromium.org 82114c0092 Stop git cl using CQ_TRYBOTS.
This is broken for a few reasons (see bug for details). Also, this works automatically now with the analyze step.

This is a revert of r280039.

BUG=406238
R=iannucci@chromium.org, sky@chromium.org

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@291526 0039d316-1c4b-4281-b951-d872f2087c98
11 years ago
vadimsh@chromium.org 566a02afb9 Teach 'git cl land' to land to pending ref.
R=iannucci@chromium.org
BUG=404214

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@291302 0039d316-1c4b-4281-b951-d872f2087c98
11 years ago
agable@chromium.org 787e306103 Have git-cl try fail when used on a closed CL
R=phajdan.jr@chromium.org, rch@chromium.org

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@290844 0039d316-1c4b-4281-b951-d872f2087c98
11 years ago
sheyang@chromium.org 2b34d558ba Auto find tryserver master for git cl try
BUG=352461

TEST=local tests

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@289711 0039d316-1c4b-4281-b951-d872f2087c98
11 years ago
pgervais@chromium.org b9f2751b87 Added hyphen-only options
Some options have words separated by underscores. Added options with
same name and underscores replaced by hyphens.

BUG=400953

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@288366 0039d316-1c4b-4281-b951-d872f2087c98
11 years ago
rsesek@chromium.org 27b15a3447 Do not put an 'r' in front of the revision when commenting on Rietveld after committing.
When using `git cl land` this would result in r<hash>, which is not desirable.

R=maruel@chromium.org

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@286931 0039d316-1c4b-4281-b951-d872f2087c98
11 years ago
mark@chromium.org 671c7a3b9d Make “git cl land” handle core.abbrev > 7.
This also fixes the confusing help message that appears when using “git
cl dcommit” in a git project. “git cl push” was totally removed in
abbaa843f4.

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@286835 0039d316-1c4b-4281-b951-d872f2087c98
11 years ago
sergeyberezin@chromium.org fbfecb72a5 Update git cl try command to mention tryserver.chromium.linux.
This is a purely cosmetic CL.

R=agable@chromium.org
BUG=395196

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@286230 0039d316-1c4b-4281-b951-d872f2087c98
11 years ago
maruel@chromium.org 85616e0e66 Do not fetch the CL description when using git cl status --fast.
This causes a network I/O, which is not fast. Also this is a non-starter in the
case of no network connectivity, causing a crash instead of completing
successfully. Until Air Canada provides on-flight internet, this is a
non-starter. #firstworldproblem.

Also fix git cl presubmit in case of lack of network connectivity.

R=stip@chromium.org
BUG=

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@285911 0039d316-1c4b-4281-b951-d872f2087c98
11 years ago
pgervais@chromium.org abbaa843f4 Removed git cl push command
The user message says the subcommand will stop working on July 1.

BUG=

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@285586 0039d316-1c4b-4281-b951-d872f2087c98
11 years ago
maruel@chromium.org bda81551fe Remove confirmation from git cl land.
It serves no purpose, and it's annoying when the presubmit checks take more than
2-3 seconds because I always switch off to another window, so I come back
minutes later seeing this prompt waiting for me.

R=stip@chromium.org
BUG=

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@285071 0039d316-1c4b-4281-b951-d872f2087c98
11 years ago
bratell@opera.com 05fb911fc1 Revert of Allow git cl also in repos with read-only git-svn. (https://codereview.chromium.org/344013005/)
Reason for revert:
Breaks WebRTC (and possibly other projects actually using https:// for svn access).

Original issue's description:
> Allow git cl also in repos with read-only git-svn.
> 
> If you have read-only git-svn git cl would still try
> to use svn commands, which would then fail. This
> changes git cl to only use git-svn if the remote
> svn repository use the svn:// protocol. It matches
> how chromium works and it allowed me to upload a patch.
> 
> BUG=391430
> 
> R=iannucci
> 
> Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=281500

TBR=iannucci@chromium.org
NOTREECHECKS=true
NOTRY=true
BUG=391430

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@281513 0039d316-1c4b-4281-b951-d872f2087c98
11 years ago
bratell@opera.com 8e05af1084 Allow git cl also in repos with read-only git-svn.
If you have read-only git-svn git cl would still try
to use svn commands, which would then fail. This
changes git cl to only use git-svn if the remote
svn repository use the svn:// protocol. It matches
how chromium works and it allowed me to upload a patch.

BUG=391430

R=iannucci

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@281500 0039d316-1c4b-4281-b951-d872f2087c98
11 years ago
martiniss@chromium.org 090df6ab1b Added support for git cl upload automatic trybot determination.
This is part of my intern project, which is detailed here:
  "https://docs.google.com/a/google.com/document/d/10bkzag1UUbtESPkEWHYaZtGMEEbCN5Zad72PuoRpwZE/edit#"

The idea is to have "git cl upload" annotate the CL description with a
flag like "CQ_TRYBOTS=...", which CQ will then look at to determine which
trybots to run the the given CL.

The CL for the change for CQ is at "https://chromereviews.googleplex.com/51757013/".

R=dpranke@google.com, iannucci@google.com
BUG=378097

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@280039 0039d316-1c4b-4281-b951-d872f2087c98
11 years ago
jrobbins@chromium.org 16f10f7f4e Show an error message when the user tries to set the commit flag or add trybots to a private issue.
BUG=387088

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@279514 0039d316-1c4b-4281-b951-d872f2087c98
11 years ago
dyen@chromium.org 2a13d4f41d Correct remote URL when uploading from a repo cloned from a git_cache.
R=bradnelson@google.com, hinoka@chromium.org
BUG=None

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@276858 0039d316-1c4b-4281-b951-d872f2087c98
11 years ago
sheyang@chromium.org 152cf83378 Upload project option in 'gcl' and 'git cl' uploading commands.
BUG=374398

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@276491 0039d316-1c4b-4281-b951-d872f2087c98
11 years ago
thestig@chromium.org 5839eb5eb4 Handle the case of git cl lint when the CL is empty.
Review URL: https://codereview.chromium.org/293153004

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@273852 0039d316-1c4b-4281-b951-d872f2087c98
11 years ago
szager@chromium.org d057f9af03 Explicitly print diff stats to sys.stdout, if possible.
This makes it possible to effectively re-route the stdout by
re-assigning sys.stdout.

BUG=

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@273595 0039d316-1c4b-4281-b951-d872f2087c98
11 years ago
bauerb@chromium.org 279c21881c Use `git rev-list A..B` to get the list of commits to be uploaded to Gerrit by git cl.
BUG=374121

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@270972 0039d316-1c4b-4281-b951-d872f2087c98
11 years ago
sheyang@chromium.org a656e70574 Revert of use canonical base URL for projects (https://codereview.chromium.org/271703010/)
Reason for revert:
CQ rejects all chromium projects because of this change.

Original issue's description:
> use canonical base URL for projects
> 
> BUG=372645
> R=iannucci@chromium.org, sergeyberezin@chromium.org
> 
> Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=270460

TBR=iannucci@chromium.org,sergeyberezin@chromium.org
NOTREECHECKS=true
NOTRY=true
BUG=372645

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@270803 0039d316-1c4b-4281-b951-d872f2087c98
11 years ago
sheyang@google.com 6a9ead263f use canonical base URL for projects
BUG=372645
R=iannucci@chromium.org, sergeyberezin@chromium.org

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@270460 0039d316-1c4b-4281-b951-d872f2087c98
11 years ago
pgervais@chromium.org cee6dc461f git cl push -> git cl land
BUG=

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@268835 0039d316-1c4b-4281-b951-d872f2087c98
11 years ago
bauerb@chromium.org f75c230c9c Warn before uploading more than one commit to Gerrit.
BUG=none

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@267480 0039d316-1c4b-4281-b951-d872f2087c98
11 years ago
agable@chromium.org ea84ef1828 Get presubmit_support to compute diffs against a given upstream.
R=hinoka@chromium.org
BUG=368720

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@267309 0039d316-1c4b-4281-b951-d872f2087c98
11 years ago
bauerb@chromium.org c9cf90ae99 Clear configured merge-base when switching upstream.
Otherwise, the old merge-base value can confuse the hell out of `git cl upload`.

BUG=none

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@266648 0039d316-1c4b-4281-b951-d872f2087c98
11 years ago
jrobbins@chromium.org a4c03054cb Process first branch status request before spawning threads.
BUG=341052

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

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