Commit Graph

890 Commits (5a2fefb9ebf89806b6b6a5aeead5dad5855fc476)
 

Author SHA1 Message Date
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
dpranke@chromium.org 330f534792 Although there appear to be one or two tests that are flaky on both mac and linux.
Review URL: http://codereview.chromium.org/6681019

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@77955 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
maruel@chromium.org 1edee69142 Fix win32api and win32con definition order.
It would fail on win32 when these modules are not present.

BUG=75902
TEST=none

R=mhm@chromium.org

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@77947 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 7b8d18f0f0 Revert 77909 - msysgit - Fix issue where gcl doesn't recognize the editor.
gcl is now fully compatible with msysgit.

BUG=70550
TEST=gcl change through msysgit.

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

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@77929 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
mhm@chromium.org 0f9ee77b9a msysgit - Fix issue where gcl doesn't recognize the editor.
gcl is now fully compatible with msysgit.

BUG=70550
TEST=gcl change through msysgit.

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@77909 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 627ea67f26 Actually check Rietveld for LGTMs ...
This change requires us to change the previous signature for the CheckOwners() hook to provide the server address and email regexp to use for parsing approvals from Rietveld.

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@77891 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
dpranke@chromium.org d945f368d2 suppress some unimportant lint warnings
Review URL: http://codereview.chromium.org/6658013

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@77882 0039d316-1c4b-4281-b951-d872f2087c98
14 years ago
dpranke@chromium.org ff5a87adfb suppress messages for PresubmitAddText results
Review URL: http://codereview.chromium.org/6646040

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@77700 0039d316-1c4b-4281-b951-d872f2087c98
14 years ago
dpranke@chromium.org 3ae183fbb7 add PresubmitAddText() result class to indicate that text needs to be passed back to git cl / gcl.
Also, this properly wires up the presubmit code to the owners code and adds unit tests.

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@77523 0039d316-1c4b-4281-b951-d872f2087c98
14 years ago
dpranke@chromium.org 86bbf19ccf Add more tests for owners.py, remove unneeded code, make syntax errors more helpful
Review URL: http://codereview.chromium.org/6639010

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@77522 0039d316-1c4b-4281-b951-d872f2087c98
14 years ago
dpranke@chromium.org 7eea259694 use PEP-8 naming for method names in owners.py, tests/owners_unittest.py
Review URL: http://codereview.chromium.org/6646007

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@77521 0039d316-1c4b-4281-b951-d872f2087c98
14 years ago
dpranke@chromium.org 5fe603e8c7 add owners_unittest to PRESUBMIT.py
Review URL: http://codereview.chromium.org/6651009

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@77518 0039d316-1c4b-4281-b951-d872f2087c98
14 years ago
bauerb@chromium.org b88c38bc4b Revert "Don't ignore first argument in TryChange."
This reverts commit 39d5bf3d5f.

TBR=maruel

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@77475 0039d316-1c4b-4281-b951-d872f2087c98
14 years ago
bauerb@chromium.org 39d5bf3d5f Don't ignore first argument in TryChange.
BUG=none
TEST=`git try foo` gives a proper error message.

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@77470 0039d316-1c4b-4281-b951-d872f2087c98
14 years ago
maruel@chromium.org f9040728dc Shorten RemoveDirectory and rename to rmtree. Remove rmtree from fake_repos.
Keep an alias to RemoveDirectory, will be removed in a later change.

TEST=new unit test to test this function
BUG=none

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@77463 0039d316-1c4b-4281-b951-d872f2087c98
14 years ago
maruel@chromium.org 924158a717 Add code to correctly revert a svn add'ed file.
Improve test to make sure svn status comes out clean.

TEST=improved unit tests and scm.SVN.Revert() should now do the right thing
BUG=none

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@77391 0039d316-1c4b-4281-b951-d872f2087c98
14 years ago
dpranke@chromium.org ee2fa0692c add set noparent just for clarity
Review URL: http://codereview.chromium.org/6648015

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@77385 0039d316-1c4b-4281-b951-d872f2087c98
14 years ago
dpranke@chromium.org 6477d68408 fix typo in nicholas's addr
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@77371 0039d316-1c4b-4281-b951-d872f2087c98
14 years ago
dpranke@chromium.org 884d11b5b2 add OWNERS file - split out from #6626065
Review URL: http://codereview.chromium.org/6649007

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@77368 0039d316-1c4b-4281-b951-d872f2087c98
14 years ago
dpranke@chromium.org add5df4c4a fix typos in CheckOwners()
Review URL: http://codereview.chromium.org/6628072

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@77361 0039d316-1c4b-4281-b951-d872f2087c98
14 years ago
dpranke@chromium.org 6dada4eef1 make tests work, implement 'set noparent', owners propagating down
Review URL: http://codereview.chromium.org/6627059

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@77351 0039d316-1c4b-4281-b951-d872f2087c98
14 years ago
thomasvl@chromium.org 9ea49d29da When listing things for pruning, include anything that has an override dependency of None.
BUG=none
TEST=none
Review URL: http://codereview.chromium.org/6621043

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@77284 0039d316-1c4b-4281-b951-d872f2087c98
14 years ago
maruel@chromium.org 7dfb9b747c Add trial_dir to manage automatic trial directory creation and deletion.
The tests now base the directory in mkdtemp() which is much safer than using the
source's file directory as before.

BUG=none
TEST=none

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@77278 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
dpranke@chromium.org ae43f83fe3 add owners_file() convenience constructor function for testing, make user names a bit more generic
Review URL: http://codereview.chromium.org/6632014

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@77178 0039d316-1c4b-4281-b951-d872f2087c98
14 years ago
dpranke@chromium.org 3c08dd45cc Add some unit tests. They don't pass yet.
Review URL: http://codereview.chromium.org/6612011

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@76980 0039d316-1c4b-4281-b951-d872f2087c98
14 years ago
dpranke@chromium.org 898a10e4bb rename OwnersFor() to ReviewersFor(), add SyntaxError exception, ANYONE wildcard constant
neither SyntaxError or ANYONE is used at, but they will be shortly.

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@76978 0039d316-1c4b-4281-b951-d872f2087c98
14 years ago
maruel@chromium.org 5257081dbf Remove FakeReposBase.HOST and add svn_base and git_base.
Ease support for different port if necessary.

BUG=none
TEST=none

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@76968 0039d316-1c4b-4281-b951-d872f2087c98
14 years ago
maruel@chromium.org bd21c51d98 Correctly kill 'git daemon' child process, fixing a lot of testing issues.
Add code to wait for the bound port to open and close correctly, removing race
conditions.

BUG=test reliability
TEST=better

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@76966 0039d316-1c4b-4281-b951-d872f2087c98
14 years ago
maruel@chromium.org 80277cf4e7 Clean gclient_smoketest import and call of super class.
BUG=none
TEST=none

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@76965 0039d316-1c4b-4281-b951-d872f2087c98
14 years ago
maruel@chromium.org af45349294 Improve SVN.Revert() to catch more corner cases.
Add a unit test to catch potential regressions. Remove an old test new code broke.

TEST=unit tests
BUG=none

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@76805 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
dpranke@chromium.org 0c4a6a3a70 add source_file_filter to CheckOwners() presubmit check
Review URL: http://codereview.chromium.org/6591064

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@76459 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
dpranke@chromium.org 2a00962421 Add first changes needed for OWNERS file support.
This changes adds the first pass of code needed for OWNERS files.
In total there should probably be maybe four user-visible changes:
  * new gcl/git-cl "suggest-reviewers" command
  * a presubmit hook on upload to automatically add the reviewers
  * an addition to gcl/git-cl status command that tells you
    which files still need review/approval.
  * a presubmit hook on commit to ensure all of the needed reviewers
    have approved the file.

This change implements a core "owners Database" object with the
dumbest possible algorithm for determining a covering set of reviewers,
and the skeleton of the presubmit hooks. This code will not be
used by anything yet, and is also missing unit tests.

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@76342 0039d316-1c4b-4281-b951-d872f2087c98
14 years ago
mhm@chromium.org 7ace24df73 Support msysgit with Chromium.
First step to remove cygwin dependencies. This will remove dependencies with zcsh and allow python scripts to be executed as hooks.

BUG=70550, 70549
TEST=checkout chrome with git, use git cl to upload a cl, revise a cl, commit a cl.

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@76232 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
maruel@chromium.org 885d6e890f Fix scm.SVN.GetCheckoutRoot() so it is not confused by intermixed checkouts
from the same repository.

TEST=added regression test.
BUG=none

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

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