Commit Graph

46 Commits (7bbcfc345cda8f5c8c061d81eaa0d1fd72e66e5f)

Author SHA1 Message Date
maruel@chromium.org 2a74d37e28 Move git_cl back into depot_tools.
Remove git_cl_hooks.py since it's now unnecessary.

BUG=
TEST=

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@79715 0039d316-1c4b-4281-b951-d872f2087c98
14 years ago
maruel@chromium.org de568681f1 Disable owners.sh for now since it's known to fail.
R=dpranke@chromium.org
BUG=
TEST=

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@79682 0039d316-1c4b-4281-b951-d872f2087c98
14 years ago
maruel@chromium.org 8062cc3a49 Align local_rietveld.py at +2 like the rest of the code.
No behavior change.

R=dpranke@chromium.org
BUG=
TEST=

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@79522 0039d316-1c4b-4281-b951-d872f2087c98
14 years ago
maruel@chromium.org 03cc6ee972 Update rietveld to r681.
Remove django since it's not necessary anymore, rietveld now uses django 1.2 and
it's included in GAE SDK.

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@79521 0039d316-1c4b-4281-b951-d872f2087c98
14 years ago
dpranke@chromium.org 0a2bb37a5f improve logging slightly
Review URL: http://codereview.chromium.org/6736018

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@79356 0039d316-1c4b-4281-b951-d872f2087c98
14 years ago
maruel@chromium.org 2295005511 Make sure the GAE SDK don't look for SDK updates while running presubmit checks
Otherwise the local Rietveld instance could mysteriously hang.

TEST=presubmit check won't fail even if an old version of the SDK is used
BUG=none

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@79338 0039d316-1c4b-4281-b951-d872f2087c98
14 years ago
maruel@chromium.org fbe3d3015c Update upload.py to r680 from upstream.
Removed all the local hacks as they are not necessary anymore.

R=dpranke@chromium.org
BUG=none
TEST=manually verified that HTTP 302 redirect works fine.

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@79296 0039d316-1c4b-4281-b951-d872f2087c98
14 years ago
dpranke@chromium.org 20254fc742 Revert r79002 - bug processing reviewer lists
TBR=maruel@chromium.org

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@79005 0039d316-1c4b-4281-b951-d872f2087c98
14 years ago
dpranke@chromium.org 0c20c2fc23 The parsing of change descriptions had a lot of overlap and inconsistencies between gcl and git-cl. In particular, we weren't handling TBR= consistently, or probably a few other things.
This change moves most of the code into presubmit_support and gclient_utils and just leaves the formatting differences for the messages between the two tools.

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@79002 0039d316-1c4b-4281-b951-d872f2087c98
14 years ago
bauerb@chromium.org 866276c2ec Add support for wildcards in svn remote configuration.
BUG=none
TEST=manual

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@78741 0039d316-1c4b-4281-b951-d872f2087c98
14 years ago
dpranke@chromium.org 6a2d08300c fix failed rename of args
TBR=maruel@chromium.org

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@78668 0039d316-1c4b-4281-b951-d872f2087c98
14 years ago
dpranke@chromium.org 97ae58eb0a Make git_cl (and everything else not skipped under depot_tools)
pass pylint cleanly.

There should be no functional changes in this patch, although there's at least one minor bug that lint caught.

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@78638 0039d316-1c4b-4281-b951-d872f2087c98
14 years ago
mhm@chromium.org 7a09961f47 Reland again Msysgit Support for gcl and git-cl.
EDITOR environment variable shouldn't be required anymore
can contain quotes and multiple arguments.

Uses shell=True to let the shell parse the quoted string
instead of handling all forms of quotes ourselves. 

By default, msysgit ships with the TERM environment variable
set, when set to 'msys', we prepend 'env' to the executed
command. That is required so msys knows which program
to run the given file.

BUG=none
TEST=On many platforms. Win7, WinXP, Ubuntu.
Review URL: http://codereview.chromium.org/6685062

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@78332 0039d316-1c4b-4281-b951-d872f2087c98
14 years ago
dpranke@chromium.org 5ac2101164 This change moves the code I added to git-cl to parse the results of the presubmit hooks into presubmit_support itself. It also removes a lot of the text-file parsing that is no longer necessary since everything is in process.
It also simplifies all of the PresubmitResult* objects and the way we're using output streams since we can assume more about how the callers are calling us.

Note that I uses PEP-8 style method names where I was adding entirely new classes (or rewriting existing classes completely) since per maruel@ he is trying to new that style for new code.

This change also contains two small changes to git_cl to fix bugs and restore the previous behavior of --force skipping the presubmit checks.

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@78328 0039d316-1c4b-4281-b951-d872f2087c98
14 years ago
dpranke@chromium.org dc276cba14 minor cleanup w/ chases's feedback from CL 6665018.
http://codereview.chromium.org/6665018/

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@78098 0039d316-1c4b-4281-b951-d872f2087c98
14 years ago
dpranke@chromium.org 4347027778 Don't buffer output in-memory for rietveld server - it logs to stdout by
default and can fill the pipe used by subprocess.Popen(), leading to
hangs.

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@78084 0039d316-1c4b-4281-b951-d872f2087c98
14 years ago
dpranke@chromium.org 1a5cb6e5a8 fix git-cl test scripts. I'm not sure when, but if these ever passed,
then at some point prior to my recent changes "git-cl upload master..."
stopped working and you need to do only "git-cl upload master".

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@78082 0039d316-1c4b-4281-b951-d872f2087c98
14 years ago
thomasvl@chromium.org 68f2746262 Better revert
BUG=none
TEST=none
Review URL: http://codereview.chromium.org/6690012

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@78029 0039d316-1c4b-4281-b951-d872f2087c98
14 years ago
thomasvl@chromium.org ca7953a5e8 Revert part of 77946 and 77978 so things work against when EDITOR is set to
something with spaces in it.

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@78027 0039d316-1c4b-4281-b951-d872f2087c98
14 years ago
dpranke@chromium.org 5a2fefb9eb Fix prompting - had the logic backwards. The git-cl unit tests actually test the prompting correctly (once they are modified to pass otherwise).
Review URL: http://codereview.chromium.org/6679032

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@77985 0039d316-1c4b-4281-b951-d872f2087c98
14 years ago
mhm@chromium.org 3e48aa74c0 Reland Usage of TERM to distinguish between msys and cygwin.
BUG=70548
TEST=check $TERM in windows
Review URL: http://codereview.chromium.org/6683035

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@77978 0039d316-1c4b-4281-b951-d872f2087c98
14 years ago
jam@chromium.org 7888d9796b Revert 77954 - Use TERM to distinguish between console and msysgit.
It is cleaner this way since in Win32 console, the
value is always "dumb" while in msysgit it is always
"msys" The user shouldn't change the value of $TERM
in msysgit otherwise their whole copy of msysgit
will be flaky.

BUG=70548
TEST=check $TERM in windows

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

TBR=mhm@chromium.org
Review URL: http://codereview.chromium.org/6683033

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@77972 0039d316-1c4b-4281-b951-d872f2087c98
14 years ago
mhm@chromium.org eceda5af1e Use TERM to distinguish between console and msysgit.
It is cleaner this way since in Win32 console, the
value is always "dumb" while in msysgit it is always
"msys" The user shouldn't change the value of $TERM
in msysgit otherwise their whole copy of msysgit
will be flaky.

BUG=70548
TEST=check $TERM in windows

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@77954 0039d316-1c4b-4281-b951-d872f2087c98
14 years ago
mhm@chromium.org d161d848cf Reland - Support msysgit in gcl and git-cl
An explicit msysgit check is needed since it requires
the usage of 'env' to open the editor.

BUG=70550, 70548
TEST=Win,Linux 
Review URL: http://codereview.chromium.org/6680019

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@77946 0039d316-1c4b-4281-b951-d872f2087c98
14 years ago
jam@chromium.org 93efa03156 Revert 77913 - Regression: Editor Linux Fix for gcl.
Editor doesn't come up due to Shell=True

BUG=none
TEST=linux and win works
Review URL: http://codereview.chromium.org/6679023

TBR=mhm@chromium.org
Review URL: http://codereview.chromium.org/6684022

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@77928 0039d316-1c4b-4281-b951-d872f2087c98
14 years ago
dpranke@chromium.org 37248c0bba fix prompting if there were errors in the hooks. Still need to write unit tests.
TBR=maruel@chromium.org

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@77922 0039d316-1c4b-4281-b951-d872f2087c98
14 years ago
mhm@chromium.org 3843692019 Regression: Editor Linux Fix for gcl.
Editor doesn't come up due to Shell=True

BUG=none
TEST=linux and win works
Review URL: http://codereview.chromium.org/6679023

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@77913 0039d316-1c4b-4281-b951-d872f2087c98
14 years ago
mhm@chromium.org 3d4d7edc3d msysgit - Fix issue where git cl doesn't recognize editor.
The unix editor doesn't popup resulting in a unsuccessful upload. This change successfully fixes it.

BUG=70550
TEST=git cl upload works as expected under msysgit.
Review URL: http://codereview.chromium.org/6679019

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@77910 0039d316-1c4b-4281-b951-d872f2087c98
14 years ago
dpranke@chromium.org 5dae94ac92 restore accidentally deleted test file
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@77900 0039d316-1c4b-4281-b951-d872f2087c98
14 years ago
dpranke@chromium.org 970c522f0f Make git-cl work with OWNERS file hooks properly.
This version calls into presubmit_support directly to support the OWNERS hooks. We do not need both this patch and http://codereview.chromium.org/6646009/

This patch depends on http://codereview.chromium.org/6665018/ .

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@77898 0039d316-1c4b-4281-b951-d872f2087c98
14 years ago
dpranke@chromium.org 23beb9e0a3 Remove support for generic "hook files" in git-cl, and just call into
the git_cl_hooks library in depot_tools. Also remove support for
post-commit hooks. This binds git-cl tighter to depot_tools, but also
makes things a lot simpler and cleaner.

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@77889 0039d316-1c4b-4281-b951-d872f2087c98
14 years ago
dpranke@chromium.org a185145f88 Make git-cl tests work on Mac SnowLeopard
This required making the location on 'true' consistently
path-independent and working around a weird subversion
issue.

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@77883 0039d316-1c4b-4281-b951-d872f2087c98
14 years ago
bauerb@chromium.org b4a75c4cd4 Use reset --soft to squash before dcomitting.
Using reset --soft doesn't require touching the working copy, so it should be faster and not require rebuilds.

BUG=none
TEST=none

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@77267 0039d316-1c4b-4281-b951-d872f2087c98
14 years ago
maruel@chromium.org b92e4804a8 Set cwd to the root of the git checkout when running git svn info.
URL value is dependent on the local directory. The current directory would
affect Base URL on Rietveld otherwise.

Do not use Repository Root instead of URL since git svn clone foo -T bar
wouldn't be correctly based.

Update RunCommand() to be able to pass cwd argument.

TEST=git cl upload is broken if I break this code.
BUG=none

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@76791 0039d316-1c4b-4281-b951-d872f2087c98
14 years ago
bauerb@chromium.org ade368c40d Add configuration option for upstream branch and improve guessing the svn branch.
The svn branch heuristic does roughly the same thing git-svn does: We first iterate backwards over the history to find the svn URL (like svn://svn.chromium.org/chrome/trunk/src). Then we go through all defined svn-remote section looking for one where the URL is the root of the svn URL (svn://svn.chromium.org/chrome in that case), and the fetch spec looks like "trunk/src:remotes/origin/trunk". If the base URL + left part (trunk/src) is the full URL, the right part (remotes/origin/trunk) is the git ref that is updated when we do a `git svn fetch`! This works for git-svn branches that fetch from trunk as well as milestone branches.

BUG=none
TEST=none

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@76364 0039d316-1c4b-4281-b951-d872f2087c98
14 years ago
maruel@chromium.org b2a7c3358f Add support for git cl upload --cc foo@example.com
It is useful sometimes to cc someone without marking this person as a reviewer.

TEST=none
BUG=none

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@76093 0039d316-1c4b-4281-b951-d872f2087c98
14 years ago
chase@chromium.org f340d1d6a7 Only set --cc when it's the first upload.
BUG=none
TEST=second git-cl upload of a CL doesn't set CC again
Review URL: http://codereview.chromium.org/6546042

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@75531 0039d316-1c4b-4281-b951-d872f2087c98
14 years ago
maruel@chromium.org e04657a2c5 Fix a bug in git_cl/PRESUBMIT.py causing it to fail.
When I renamed setup_mock to local_rietveld, I had forgot one place in
PRESUBMIT.py.

TBR=evan
BUG=none
TEST=none

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@74627 0039d316-1c4b-4281-b951-d872f2087c98
14 years ago
maruel@chromium.org 5b78c7262b Move rietveld local server setup in a separate file.
This makes the code more comprehensible and reusable.

BUG=none
TEST=none

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@74623 0039d316-1c4b-4281-b951-d872f2087c98
14 years ago
maruel@chromium.org 082cccdbb4 Partial update of upload.py with r660 patch.
Make json files known as a text mimetype so that they can be seen in reviews.

Original review at http://codereview.appspot.com/4133046/

Also make sure that the copy in third_party and in git_cl are the same. I'll
remove the copy in git_cl in a later change.

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@74116 0039d316-1c4b-4281-b951-d872f2087c98
14 years ago
msb@chromium.org bf1a7ba957 Update git_cl to look at right Tree Status URL for Chromium OS.
Improves output of git cl tree to use Chromium OS status, not Chromium Status.

BUG=chromium-os:11449
TEST=Output of 'git cl tree' for Chromium OS includes output from Chromium OS instead of from Chromium.

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@73292 0039d316-1c4b-4281-b951-d872f2087c98
14 years ago
thakis@chromium.org cde3bb69d2 Tweak an informative message that has mislead at least 3 people so far.
Review URL: http://codereview.chromium.org/6331008

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@71893 0039d316-1c4b-4281-b951-d872f2087c98
14 years ago
maruel@chromium.org df947ea846 Improve parsing of committed hash to be more resilient.
TEST=Verified that if this code breaks, the presubmit checks fail.
BUG=none

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@71229 0039d316-1c4b-4281-b951-d872f2087c98
14 years ago
maruel@chromium.org 0ba7f967e1 Add support for post-dcommit/post-push hooks.
Patch contributed by sadrul@chromium.org

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@71097 0039d316-1c4b-4281-b951-d872f2087c98
14 years ago
chase@chromium.org c76e675fb5 Update the index in SendUpstream before tree check.
BUG=none
TEST=git cl dcommit/push performs an index update before
checking if the tree is dirty
Review URL: http://codereview.chromium.org/6172003

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@70908 0039d316-1c4b-4281-b951-d872f2087c98
14 years ago
chase@chromium.org cc51cd03e0 Move git-cl into depot_tools.
BUG=none
TEST=git-cl works after move
Review URL: http://codereview.chromium.org/5012006

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