- Changed the algorithm from breadth-first to depth-first.
- Added infinite recursion support.
- Fixed From() of From() dependency.
- Fixed cross solution custom deps aliasing.
- Removed support code for old .gclient_entries format.
- Removed IsGitCheckout() in favor for a direct check for .git presence.
TEST=all test pass
Review URL: http://codereview.chromium.org/2867047
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@51760 0039d316-1c4b-4281-b951-d872f2087c98
TEST=none, no big deal. I'll get a breakpad report otherwise anyway. This is solely to *reduce* the number of breakpad stack trace that this is done.
Review URL: http://codereview.chromium.org/2885020
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@51739 0039d316-1c4b-4281-b951-d872f2087c98
Remove SUPPORTED_COMMANDS since it is not necessary, change the formating to not introduce an empty line.
Review URL: http://codereview.chromium.org/2836042
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@51640 0039d316-1c4b-4281-b951-d872f2087c98
This allows to recurse in all the entries to operate on them.
Review URL: http://codereview.chromium.org/2862039
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@51419 0039d316-1c4b-4281-b951-d872f2087c98
Fix gclient diff & pack to not throw uncatched exceptions when a directory is missing.
Reorder things in gclient.py for easier diff later
Update revinfo help
Add GetScmName(), it will be needed later.
TEST=unit tests
BUG=none
Review URL: http://codereview.chromium.org/2786013
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@49565 0039d316-1c4b-4281-b951-d872f2087c98
The recursive DEPS is to be used with From() testing.
Didn't enable From() yet since it broke tests and to simplify this change.
Review URL: http://codereview.chromium.org/2699005
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@49427 0039d316-1c4b-4281-b951-d872f2087c98
Add a lot of checking for stdout and fix one mis-assumption.
Make the code much more compact.
Make the git_hashes 'revisions' 1-based for consistency.
Review URL: http://codereview.chromium.org/2594001
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@48925 0039d316-1c4b-4281-b951-d872f2087c98
Turns out that this was added in svn 1.5 and the mac bots
use svn 1.4.4.
Review URL: http://codereview.chromium.org/2623002
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@48899 0039d316-1c4b-4281-b951-d872f2087c98
command line to gclient, pass the flag to svn update and
svn co too.
This allows updates when we have dirty files left around.
For example, an update may remove a directory, but the
directory still has .vcproj or .mk files in it. If we
try to re-add that directory, svn will error out. If
we add --force, it'll happily allow the update.
Review URL: http://codereview.chromium.org/2560001
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@48897 0039d316-1c4b-4281-b951-d872f2087c98
I found including a git repo in my DEPS file to be unreliable, esp
since I pinning to a specific commit. Whenever I changed the commit
in the DEPS file, gclient would attempt to do a rebase and this was
failing due to how rebase was being invoked.
While investigating the problem, I decided it might be better to take
a different approach. Namely, when cloning gclient should just checkout
the working tree to a detached HEAD. In this way, gclient can more
easily determine if the user has made any changes in the cloned repo.
Future updates (as long as there are no changes) become a much simpler
operation w/no need to invoke rebase.
This is a series of five commits, but sadly, git cl will squash them
into this single review. Here are the original commit messages:
commit 8cd2213f006a6f4b3f6b8c448a1362b9410d47f1
Author: Jay Soffian <jaysoffian@gmail.com>
Date: Wed Apr 14 18:29:18 2010 -0400
Use rev-parse to determine current branch
Git branch is a so-called porcelain and its output cannot be relied upon;
use git rev-parse instead.
gclient_scm.py | 8 +++-----
1 files changed, 3 insertions(+), 5 deletions(-)
commit 1a09e04554acfa2671f9588ee9eef0bdbe677ed2
Author: Jay Soffian <jaysoffian@gmail.com>
Date: Wed Apr 14 22:16:53 2010 -0400
Detached HEAD does not always imply rebasing; use an _IsRebasing()
function instead.
gclient_scm.py | 11 ++++++++++-
1 files changed, 10 insertions(+), 1 deletions(-)
commit 45308a58c3f1e30b760f13abe3a6288267265fa8
Author: Jay Soffian <jaysoffian@gmail.com>
Date: Wed Apr 14 22:19:10 2010 -0400
Clarify comments to use common git terminology
gclient_scm.py | 14 ++++++++------
1 files changed, 8 insertions(+), 6 deletions(-)
commit 5e5a661b7dd9c83b2c9c35950f3267d15b7e840a
Author: Jay Soffian <jaysoffian@gmail.com>
Date: Tue May 4 12:15:40 2010 -0400
Make CaptureStatus use GetUpstreamBranch() instead of assuming 'origin'
scm.py | 6 +++++-
1 files changed, 5 insertions(+), 1 deletions(-)
commit 42a8bfebd2e1b1be01025c1324d75920ac6eb0e1
Author: Jay Soffian <jaysoffian@gmail.com>
Date: Wed Apr 14 22:19:29 2010 -0400
Use a detached HEAD when checking out a tag or commit
After cloning, if a tag or commit was specified, leave a detached HEAD. This way
we can reliably detect if the user changed the working tree (since HEAD would no
longer be detached). Further, this simplifies the code path when the dependency
is updated to a new tag/commit. As long as HEAD is detached when we update, we
simply checkout whatever we fetched w/o needing to worry about rebasing.
gclient_scm.py | 126 +++++++++++++++++++++++++++++++-------------
tests/gclient_scm_test.py | 6 +--
2 files changed, 91 insertions(+), 41 deletions(-)
Review URL: http://codereview.chromium.org/1652007
Patch from Jay Soffian <jaysoffian@gmail.com>.
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@48722 0039d316-1c4b-4281-b951-d872f2087c98
Make -r invalid@rev a warning and ignore the argument.
Make -r rev use the Nth solution.
Fix a bug in FakeRepos.assertTree().
TEST=updated the smoke test to reflect the new behavior which should be the most compatible with the current buildbot behavior
BUG=chromium-os:3465
Review URL: http://codereview.chromium.org/2430001
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@48607 0039d316-1c4b-4281-b951-d872f2087c98
Make it work with 'coverage'.
Make FakeRepos initialization lazy. Only generate the repository when needed. It's in part intended for gclient_scm_tests.py but I left it out of this review.
To use:
easy_install coverage
./tests/gclient_smoke.py -c
coverage report
Current coverage with gclient_smoke:
Name Stmts Exec Cover
-----------------------------------------------
gclient 557 416 74%
gclient_scm 496 270 54%
gclient_utils 195 117 60%
scm 439 180 41%
(ignoring irrelevant files)
It's quite good in fact, 74% of gclient.py being executed with the smoke test.
Review URL: http://codereview.chromium.org/2352002
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@48501 0039d316-1c4b-4281-b951-d872f2087c98
Automatically generate help and enforce stricter argument parsing.
Stops from throwing an exception when run outside a subversion checkout.
Fixed gcl lint.
Review URL: http://codereview.chromium.org/2301003
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@48386 0039d316-1c4b-4281-b951-d872f2087c98
This may not make sense in practice but is necessary for testing. Add regression test.
TBR=msb
TEST=smoke test
BUG=23328
Review URL: http://codereview.chromium.org/2238004
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@48317 0039d316-1c4b-4281-b951-d872f2087c98
"""
Enable automatic command and one-liner doc. Reformat pydoc accordingly.
Add parser as an argument and parse_args hook in preparation to move parse_args at the right place, inside the CMDxx functions.
R.I.P. gclient_test.py
"""
original code review at: http://codereview.chromium.org/2253002
In addition:
- Add more smoke tests: vars, hooks, runhooks
- Bugs filed about misbehavior with git checkout
- Fixed gclient runhooks
TEST=smoke test
BUG=23328
Review URL: http://codereview.chromium.org/2265002
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@48309 0039d316-1c4b-4281-b951-d872f2087c98
"""
Enable automatic command and one-liner doc. Reformat pydoc accordingly.
Add parser as an argument and parse_args hook in preparation to move parse_args at the right place, inside the CMDxx functions.
R.I.P. gclient_test.py
"""
original code review at: http://codereview.chromium.org/2253002
In addition:
- Add more smoke tests: vars, hooks, runhooks
- Bugs filed about misbehavior with git checkout
- Fixed gclient runhooks
TEST=smoke test
BUG=23328
Review URL: http://codereview.chromium.org/2265002
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@48289 0039d316-1c4b-4281-b951-d872f2087c98
Add parser as an argument and parse_args hook in preparation to move parse_args at the right place, inside the CMDxx functions.
R.I.P. gclient_test.py
Review URL: http://codereview.chromium.org/2253002
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@48271 0039d316-1c4b-4281-b951-d872f2087c98
gclient sync, revert and status are tested.
GClientSmokeGIT.testRevertAndStatus is known to fail since git-backed revert doesn't work.
Review URL: http://codereview.chromium.org/2189001
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@48239 0039d316-1c4b-4281-b951-d872f2087c98
The unit tests are unbearable and the next change forces me to trash them.
Thus adding smoke tests before. The current tests aren't involved enough yet but
are a good base for further testing.
I plan to only test the most important functionalities, the ones used in the continuous build and try server.
TEST=new smoke test
BUG=23328
Review URL: http://codereview.chromium.org/2092012
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@47580 0039d316-1c4b-4281-b951-d872f2087c98
Enable automatic command and one-liner doc. Reformat pydoc accordingly.
Add parser as an argument and parse_args hook in preparation to move parse_args at the right place, inside the CMDxx functions.
Update unit tests
Review URL: http://codereview.chromium.org/2129005
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@47449 0039d316-1c4b-4281-b951-d872f2087c98
The next step will be to generate help automatically and remove the command
check loop.
TEST=not much
BUG=me
Review URL: http://codereview.chromium.org/2096003
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@47291 0039d316-1c4b-4281-b951-d872f2087c98
This fixes issues with Chromium OS checkout.
BUG=crosbug:3132.
TEST=none
Review URL: http://codereview.chromium.org/2016006
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@46761 0039d316-1c4b-4281-b951-d872f2087c98
svn diff would only generate a diff for modified files but the current code
would not respect full_move=True. full_move=True is necessary to make it work on
the try server.
TEST=svn move chrome chrome2; echo foo>>PRESUBMIT.py
The try job should fail but the diff should be right.
BUG=none
Review URL: http://codereview.chromium.org/1965001
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@46566 0039d316-1c4b-4281-b951-d872f2087c98
It now defaults to origin/master when no branch is tracked.
TEST=git-try on untracked branch now doesn't result in an empty diff
BUG=none
Review URL: http://codereview.chromium.org/1739021
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@45935 0039d316-1c4b-4281-b951-d872f2087c98
On a chromeos checkout, -j 10 brings down null sync time from 2 minutes to 16 seconds
Currently -j may break some assumptions about ordering of commands (which may be fine for some clients, but not all), so it's not on by default.
Review URL: http://codereview.chromium.org/1640001
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@44869 0039d316-1c4b-4281-b951-d872f2087c98
of svn co --depth.
This should work even if you change svn versions between gclient syncs.
Review URL: http://codereview.chromium.org/1560029
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@44441 0039d316-1c4b-4281-b951-d872f2087c98
allow From() to import when the URL is relative.
For example, if src/DEPS is:
deps = {
'base' = 'svn://svn/base@123',
'main' = From('base', 'src/main'),
}
and base/DEPS is:
deps = {
'src/main': '/main@100',
}
This will checkout svn://svn/main@100 in main.
Review URL: http://codereview.chromium.org/1547026
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@44044 0039d316-1c4b-4281-b951-d872f2087c98
These are the same that the one in chromium's src/PRESUBMIT.py but slightly more
resilitent to exceptions.
Empirical studies have shown that exceptions in presubmit checks result in
disorientation and lack of willingness to commit.
TEST=OMG new unit tests!
Review URL: http://codereview.chromium.org/1119003
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@42102 0039d316-1c4b-4281-b951-d872f2087c98
This simplifies the unit tests and clarify what is what.
Ran pychecker on a few files.
Review URL: http://codereview.chromium.org/874002
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@41310 0039d316-1c4b-4281-b951-d872f2087c98
Moved tests/pymox to third_party/pymox
Moved upload.py to third_party/upload.py
Fixed tests so they can run standalone
Fixed the executable bit on some scripts
TEST=none
BUG=34376
Review URL: http://codereview.chromium.org/562031
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@37987 0039d316-1c4b-4281-b951-d872f2087c98
We now return the stderr half of the tuple.
This required a clean up of any usage of CheckCall and GIT.Capture.
Patch contributed by Nasser Grainawi <nasser@codeaurora.org>
Review URL: http://codereview.chromium.org/551215
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@37650 0039d316-1c4b-4281-b951-d872f2087c98
It does a regexp search on the file contents to make sure it contains expected license boiler plate.
It is a generalization to implement the equivalent of ubuntu's license check script into the corresponding PRESUBMIT.py files.
TEST=unit tests
BUG=28291
Review URL: http://codereview.chromium.org/558007
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@37338 0039d316-1c4b-4281-b951-d872f2087c98
By default, filters out 'ChangeLog'. A pain directly coming from Webkit.
TEST=none
BUG=none
Review URL: http://codereview.chromium.org/543012
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@36008 0039d316-1c4b-4281-b951-d872f2087c98
Some external contributors need their CL's try'd quickly, but currently its not easy unless we patch locally. This will allow you to submit the rietveld issue number and will do the rest automatically. As well, renable the dry_run option. It was removed.
BUG=None
TEST=git try --issue 12345
Review URL: http://codereview.chromium.org/481006
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@35881 0039d316-1c4b-4281-b951-d872f2087c98
This is mostly useful with git when diffing against arbitrary branches.
Review URL: http://codereview.chromium.org/524046
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@35684 0039d316-1c4b-4281-b951-d872f2087c98
It was somehow ripped out by accident.
TEST=none
BUG=none
TBR=bradnelson
Review URL: http://codereview.chromium.org/515037
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@35284 0039d316-1c4b-4281-b951-d872f2087c98
Add real logging support.
Fix the patch path mungling that was broken earlier.
Add and proper refactor automatic gclient and gcl settings detection.
Factored so it is possible to add other autodetection algorithms.
Now works standalone in hybrid svn&git checkouts within a gclient meta-checkout.
TEST=bah
BUG=none
TBR=bradnelson
Review URL: http://codereview.chromium.org/517005
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@35218 0039d316-1c4b-4281-b951-d872f2087c98
This adds the functionality to try a job spread across multiple checkouts.
TEST=fixed unit tests and tested with hybrid svn-git checkouts
BUG=none
Review URL: http://codereview.chromium.org/504085
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@35168 0039d316-1c4b-4281-b951-d872f2087c98
Make lack of email address an error.
TEST=none
BUG=none
Review URL: http://codereview.chromium.org/507072
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@35167 0039d316-1c4b-4281-b951-d872f2087c98
The goal is to (almost) completely remove git-try.
TEST=none
Review URL: http://codereview.chromium.org/501166
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@35144 0039d316-1c4b-4281-b951-d872f2087c98
Fix standalone trychange usage on both svn and git.
Remove implicit dependency on git-cl.
TEST=unit test
Review URL: http://codereview.chromium.org/507061
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@35121 0039d316-1c4b-4281-b951-d872f2087c98
Remove upload dependency.
This is towards making trychange.py work mostly standalone for the webkit try server.
TEST=unit tests and tested both gcl try and git-try.
Review URL: http://codereview.chromium.org/501143
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@35071 0039d316-1c4b-4281-b951-d872f2087c98
This is to reduce trychange.py dependency on gcl.py
Review URL: http://codereview.chromium.org/502085
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@35055 0039d316-1c4b-4281-b951-d872f2087c98
Doing something like basename when concatenating base_url with
relative url.
Added use_relative_urls2 to enable switching between old
implementation and new implementation. Once the old implementation
is deprecated we can remove the use_relative_urls2.
Review URL: http://codereview.chromium.org/500015
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@34563 0039d316-1c4b-4281-b951-d872f2087c98
When a rebase generates a conflict, report an error and exit immediately.
If in an existing conflict (no branch), report an error and exit immediately.
Review URL: http://codereview.chromium.org/496003
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@34459 0039d316-1c4b-4281-b951-d872f2087c98
It is much cleaner and works for cases where the directory is not writeable.
Also fix an unrelated unit test.
Review URL: http://codereview.chromium.org/464068
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@34080 0039d316-1c4b-4281-b951-d872f2087c98
On a new Linux box, during git cl dcommit I observed
the error:
fatal: invalid diff option/value: -r
This was caused by the git cl presubmit hooks running:
git diff --name-status -r refs/remotes/origin/trunk.. /path/to/src
By passing a relative path (given by git rev-parse
--show-cdup) instead of an absolute path for
/path/to/src, git diff --name-status does not print an
error and returns the expected list of changed files.
Also fix some broken scm and gclient_scm unit tests.
BUG=none
TEST=git presubmit hooks work from main working
directory
Review URL: http://codereview.chromium.org/438012
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@32999 0039d316-1c4b-4281-b951-d872f2087c98
Save the CL locally prior to attempting to submit
to Rietveld. The CL is saved locally with a dirty-bit
before the upload is attempted. If successful, the CL
is saved locally again with a clean-bit.
On loading a dirty CL for editing, we only load the
CL description from Rietveld if the local CL is clean
(there are no pending changes to upload). Clean CLs
continue to retrieve updated descriptions directly
from Rietveld.
BUG=none
TEST=gcl change <name> saves CL description local
prior to uploading. gcl change <name> after a failed
Rietveld upload uses local CL description instead of
using the associated issue's description from Rietveld.
Changes in this state are reset to the 'clean' state
after the Rietveld update completes.
Review URL: http://codereview.chromium.org/428001
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@32791 0039d316-1c4b-4281-b951-d872f2087c98
add this to PRESUBMIT.py in the chromium tree later).
- Update cpplint.py to the latest version from the style guide.
Review URL: http://codereview.chromium.org/395022
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@32180 0039d316-1c4b-4281-b951-d872f2087c98
TEST=none
BUG=none
Move scm functions into a class to make it simpler to manage.
Review URL: http://codereview.chromium.org/391052
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@32057 0039d316-1c4b-4281-b951-d872f2087c98
ssh://test@example.com wasn't being parsed correctly for revinfo.
Fixed by factoring out all code which splits url into a base_url
and revision.
Review URL: http://codereview.chromium.org/391048
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@31910 0039d316-1c4b-4281-b951-d872f2087c98
* Add revinfo as part of SCMWrapper interface.
* Implement revinfo for git and svn.
* Add unit tests.
Review URL: http://codereview.chromium.org/362008
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@31280 0039d316-1c4b-4281-b951-d872f2087c98
If you're not running gclient sync with --verbose and you get a conflict on
a file, the conflict message prints *before* the message that you're running
update in the appropriate directory. This is happening because we intercept
stdout but not stderr, and the conflict prompt goes to stderr. redirecting
stderr in the popen() to the pipe fixes this.
R=maruel@chromium.org
BUG=none
TEST=none
Review URL: http://codereview.chromium.org/373003
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@31276 0039d316-1c4b-4281-b951-d872f2087c98
I've added two settings to codereview.settings - LINT_REGEX and
LINT_IGNORE_REGEX - to specify which files should be linted. The default
is to lint anything that ends in .cpp, .cc, .inl, or .h, and to ignore
nothing.
I have also modified GetCachedFile() to look for a locally modified version
of codereview.settings before looking in the repository.
R=maruel@chromium.org
TEST=none
BUG=none
Review URL: http://codereview.chromium.org/257054
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@30415 0039d316-1c4b-4281-b951-d872f2087c98
print messages unless the underlying commands actually generate output.
This is a more conservative version of r28271.
BUG=none
TEST=none
R=maruel
Review URL: http://codereview.chromium.org/344004
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@30296 0039d316-1c4b-4281-b951-d872f2087c98
pymox auto-checkout never really worked well so check-in pymox directly.
pprint.pformat is non-determinist in one test. Worked around the issue.
TEST=unit tests
BUG=none
Review URL: http://codereview.chromium.org/266043
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@29398 0039d316-1c4b-4281-b951-d872f2087c98
as an answer.
Review URL: http://codereview.chromium.org/268023
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@28557 0039d316-1c4b-4281-b951-d872f2087c98
This reverts commit 28058.
BUG=24081
TEST=gclient sync without --force is not working anymore.
TBR=dpranke
Review URL: http://codereview.chromium.org/269006
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@28271 0039d316-1c4b-4281-b951-d872f2087c98
Expand presubmit_support and gclient_scm to support
getting basic status and changed files from a Git
checkout.
BUG=5339
TEST=presubmit_support.py works from a git checkout,
gcl presubmit works from a svn checkout
Review URL: http://codereview.chromium.org/242140
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@28092 0039d316-1c4b-4281-b951-d872f2087c98
Its side-effect caused tree breakages, at least on the try slaves.
TBR=dpranke
BUG=none
TEST=none
Review URL: http://codereview.chromium.org/251095
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@28058 0039d316-1c4b-4281-b951-d872f2087c98
messages when --verbose is specified or when something actually happens.
Also, remove --manually_grab_svn_rev, because we need this to happen all
the time to get gclient update to shut up if we're comparing against HEAD.
It doesn't look like there are any real side effects of removing this.
An alternative change would be to wrap this behind a --quiet flag.
Note that the change to tests/trychange_unittest.py is an unrelated fix to get
all the tests to pass.
R=maruel@chromium.org
TEST=none
BUG=none
Review URL: http://codereview.chromium.org/257023
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@28039 0039d316-1c4b-4281-b951-d872f2087c98
gclient_tests: add GitWrapper test cases
gclient_scm: make RunGit private and add url check
gclient_scm: add revert, run_hooks, and status
gclient_scm: add git implementations of cleanup, diff, and export
gclient_scm: implment GitSCM::update
gclient_scm: add a checks for unsupported scm and unimplemented method
Review URL: http://codereview.chromium.org/235005
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@27241 0039d316-1c4b-4281-b951-d872f2087c98
gclient_scm: use a map for deciding whether or not the scm is supported
gclient_scm: add a checks for unsupported scm and unimplemented method
git_scm: pull out svn code into SVNWrapper
gclient_scm: create a create_scm factory method
Use a factory method to abstract SCMWrapper creation. This method
will eventually return the correct subclass of SCMWrapper. Initially,
there will only be SVNWrapper.
Review URL: http://codereview.chromium.org/215022
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@26823 0039d316-1c4b-4281-b951-d872f2087c98
This method will eventually return the correct subclass of SCMWrapper. Initially, there will only be SVNWrapper.
gclient_scm: add test for unsupported scm
gclient_scm: make SCMWrapper constructor parameters non-optional
gclient_scm: add a checks for unsupported scm and unimplemented method
git_scm: pull out svn code into SVNWrapper
gclient_scm: create a create_scm factory method
TEST=
BUG=none
Review URL: http://codereview.chromium.org/216014
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@26602 0039d316-1c4b-4281-b951-d872f2087c98
Add a test case for the UnversionedUnexpected file code path.
TEST=This test case will catch the bug fixed by r26425.
BUG=none
Patch contributed by msb@
Review URL: http://codereview.chromium.org/214005
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@26458 0039d316-1c4b-4281-b951-d872f2087c98
Part of a larger refactoring to abstract SCM-specific bits.
presubmit_support, revert, gcl: modify to import gclient_scm and gclient_utils
Part of a larger refactoring to abstract SCM-specific bits.
revert, gcl: modify to import gclient_scm and gclient_utils
Part of a larger refactoring to abstract SCM-specific bits.
gclient: pull out SCM bits
Pulled out SCMWrapper into gcliet_scm.py as part of a larger refactoring to
abstract SCM-specific bits. Plan is to evenutally add git support.
Pulling out SCMWrapper also required pulling out utility functions into
a gclient_utility.py.
Patch contributed by msb@
TEST=none
BUG=none
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@26423 0039d316-1c4b-4281-b951-d872f2087c98
the root of the source tree. It is similar to "gclient diff", and
shares much of the implementation, but it seems that developers may
want the semantics of each in different situations, which is why it is
being added as a new command.
Generalized SubprocessCallAndCapture into SubprocessCallAndFilter.
Added RunSVNAndFilterOutput; changed RunSVNAndGetFileList to use it.
Fixed problem in presubmit_canned_checks.py where it was not working
on Windows. Updated unit tests for gclient.
Review URL: http://codereview.chromium.org/193004
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@25410 0039d316-1c4b-4281-b951-d872f2087c98
1) don't save empty changelists to begin with. This guards against an accidental or canceled "gcl change" creating an empty file.
2) create a "clearempties" command which clears all changelists that don't have any files in them.
Review URL: http://codereview.chromium.org/160139
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@22538 0039d316-1c4b-4281-b951-d872f2087c98