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
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
- 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
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
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
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
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
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
(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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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