Commit Graph

52 Commits (4b5321ac01db374f23e43eda8d1782cb8f237009)

Author SHA1 Message Date
maruel@chromium.org 85a3192f9c Group SCM-specific functions in classes to simplify generalization of the interface.
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
16 years ago
msb@chromium.org d5a035eb15 TBR: maruel@chromium.org
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@31916 0039d316-1c4b-4281-b951-d872f2087c98
16 years ago
msb@chromium.org ac915bb6af gclient: fix another bug where ssh urls weren't parsed correctly
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
16 years ago
maruel@chromium.org e3608dfc1a Run pychecker over most scripts in depot_tools. Catched a few bugs.
TEST=unit tests
BUG=none

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@31590 0039d316-1c4b-4281-b951-d872f2087c98
16 years ago
msb@chromium.org 0f282063d9 gclient: Make revinfo work on git.
* 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
16 years ago
dpranke@google.com 22e29d4ec5 Make 'gclient update' and 'gclient status' quieter by default - they don't
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
16 years ago
maruel@chromium.org 7753d24625 Revert "Un-revert the reverted 28058, so that we get quiet again."
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
16 years ago
dpranke@google.com 2a6e20ca4a Un-revert the reverted 28058, so that we get quiet again.
BUG=none
  R=maruel
  TEST=none

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@28185 0039d316-1c4b-4281-b951-d872f2087c98
16 years ago
maruel@chromium.org 9344e97ada Revert "Modify the output of gclient update, gclient status to only print out"
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
16 years ago
dpranke@google.com 1a77f1dc15 Modify the output of gclient update, gclient status to only print out
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
16 years ago
msb@chromium.org 8301701a81 gclient: fix to support reading .gclient_entries in old list format
Review URL: http://codereview.chromium.org/249021

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@27386 0039d316-1c4b-4281-b951-d872f2087c98
16 years ago
msb@chromium.org 2e38de7be5 gclient: don't make SVN-specific calls in RunOnDeps
Replaced a call to CaptureSVNStatus with a SCMWrapper::status

gclient: store gclient_entries as a dict

Currently we only store the relative path for entries.
We need to also store the url so that learn the repo type: git or snv.

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@27370 0039d316-1c4b-4281-b951-d872f2087c98
16 years ago
msb@chromium.org 770ff9ee21 gclient: store revision as a string and not int
Currently, revision numbers are stored as int. This won't work
for git's SHA1s. So storing revisions as strings.

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@26940 0039d316-1c4b-4281-b951-d872f2087c98
16 years ago
yaar@chromium.org f132804ce5 GClient should allow having 'url': None in .gclient
This is for situations where the solution is checked out by another SCM
mechanism (e.g. update-webkit or just svn co) but we want to use gclient to
fetch the dependencies.

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@26876 0039d316-1c4b-4281-b951-d872f2087c98
16 years ago
msb@chromium.org cb5442bf76 gclient_scm: add test for unsupported scm
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
16 years ago
maruel@chromium.org 754960e99b Fix gclient revert for external, switched and conflicted directories.
TEST=gclient revert more stuff but stops reverting external directories
BUG=none

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


git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@26672 0039d316-1c4b-4281-b951-d872f2087c98
16 years ago
maruel@chromium.org 5e73b0cfa1 Revert "Use a factory method to abstract SCMWrapper creation." totally broke gclient.
TBR=msb
TEST=none
BUG=none

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


git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@26606 0039d316-1c4b-4281-b951-d872f2087c98
16 years ago
msb@chromium.org 56237087e9 Use a factory method to abstract SCMWrapper creation.
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
16 years ago
maruel@chromium.org 167b9e63c7 Fix PyChecker errors caused by r26423.
Patch contributed by msb@

TEST=unit test
BUG=none

Review url: http://codereview.chromium.org/213006


git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@26457 0039d316-1c4b-4281-b951-d872f2087c98
16 years ago
maruel@chromium.org 5f3eee3bab gclient: remove wildcard import from git_scm
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
16 years ago
gspencer@google.com df2d59059d This adds a feature to gclient to allow the (optional) specification of the
name of the top level "DEPS" file of a solution from within the .gclient spec.

This allows users to edit their gclient once and use a different (perhaps
experimental) DEPS file instead of the traditionally named "DEPS".

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@26031 0039d316-1c4b-4281-b951-d872f2087c98
16 years ago
kbr@google.com ab318594b3 Added "gclient pack" subcommand, which generates a patch relative to
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
16 years ago
maruel@chromium.org 5df6a46313 Enforce --force when running gclient runhooks
Review URL: http://codereview.chromium.org/173174


git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@24761 0039d316-1c4b-4281-b951-d872f2087c98
16 years ago
maruel@chromium.org 57e893ef48 Improves the 'gclient revinfo' display info.
Patch contributed by thiago.farina@gmail.com

Review url: http://codereview.chromium.org/172028

BUG=None
TEST=None


git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@23718 0039d316-1c4b-4281-b951-d872f2087c98
16 years ago
phajdan.jr@chromium.org d83b2b28a0 Make gclient pass correct relative paths to the hooks.
Review URL: http://codereview.chromium.org/165070

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@23026 0039d316-1c4b-4281-b951-d872f2087c98
16 years ago
phajdan.jr@chromium.org 68f2e09652 Splice matching_files_list in $matching_files' place in gclient.py.
Based on Mark Mentovai's mail.
Review URL: http://codereview.chromium.org/164068

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@22616 0039d316-1c4b-4281-b951-d872f2087c98
16 years ago
maruel@chromium.org c5e9aec590 Fix output on Windows when gclient warns the user about a stale directory.
TEST=unit test
BUG=none

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@22290 0039d316-1c4b-4281-b951-d872f2087c98
16 years ago
phajdan.jr@chromium.org 71b4068161 Pass matching file list to the hook in gclient.
Review URL: http://codereview.chromium.org/160294

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@22224 0039d316-1c4b-4281-b951-d872f2087c98
16 years ago
evan@chromium.org 67820efbf0 Add a --nohooks to gclient to update/sync/revert without calling the hooks
BUG=16856

Patch from Fabien Tassin <fta@sofaraway.org>.


git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@21655 0039d316-1c4b-4281-b951-d872f2087c98
16 years ago
phajdan.jr@chromium.org 644aa0cfaa Add export command to gclient.py
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@20990 0039d316-1c4b-4281-b951-d872f2087c98
16 years ago
maruel@chromium.org b8b6b871f5 Add help for --head.
TEST=none
BUG=none

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@19622 0039d316-1c4b-4281-b951-d872f2087c98
16 years ago
ajwong@chromium.org 8399dc0549 Fix silly typo issue. Not sure how the original code worked on my box.
Review URL: http://codereview.chromium.org/146050

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@19063 0039d316-1c4b-4281-b951-d872f2087c98
16 years ago
ajwong@chromium.org cdcee80cd8 Modify gclient to only delete unversioned trees during an update if
the --delete_unversioned flag is specified.  This only affects the update
command.  Reverts will still delete the unversioned tree.

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@19021 0039d316-1c4b-4281-b951-d872f2087c98
16 years ago
maruel@chromium.org 1ab7ffcce9 Fix gclient config with a trailing backslash.
Review URL: http://codereview.chromium.org/118160

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@17487 0039d316-1c4b-4281-b951-d872f2087c98
16 years ago
skylined@chromium.org df0032c057 Add code to handle errors in .gclient configuration files and output human readble information rather than a raw exception stack.
Review URL: http://codereview.chromium.org/113968

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@17179 0039d316-1c4b-4281-b951-d872f2087c98
16 years ago
maruel@chromium.org 672343d7f4 Fix the print_error parsing, which caused spurious errors on gcl usage.
Review URL: http://codereview.chromium.org/113656

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@16513 0039d316-1c4b-4281-b951-d872f2087c98
16 years ago
maruel@chromium.org 1998c6d137 Raise an human readable exception if an unversioned directory exists.
Review URL: http://codereview.chromium.org/115354

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@16156 0039d316-1c4b-4281-b951-d872f2087c98
16 years ago
maruel@chromium.org 2806acc58c Remove two seams options.gclient and options.scm_wrapper in gclient.
Review URL: http://codereview.chromium.org/115322

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@16155 0039d316-1c4b-4281-b951-d872f2087c98
16 years ago
maruel@chromium.org 0329e67bae Remove the options.path_exists which only existed as a seam. It's not really needed in python.
Also fix 2 other mocks.
Review URL: http://codereview.chromium.org/115286

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@15976 0039d316-1c4b-4281-b951-d872f2087c98
16 years ago
maruel@chromium.org 8626ff72df Finally implement the code to automatically switch checkout when there is no local modification.
Bail off as soon as there is anything showing up on svn status.

TBR=sgk
Review URL: http://codereview.chromium.org/113319

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@15929 0039d316-1c4b-4281-b951-d872f2087c98
16 years ago
maruel@chromium.org 4810a96600 Deprecate gcl.GetSVNStatus() for gclient.CaptureSVNStatus() and fix some status information that was lost.
This was breaking gclient revert on unversioned files.

TEST=ran "for %a in (tests\*test.py) do python %a" and all tests succeeded.
Review URL: http://codereview.chromium.org/115264

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@15894 0039d316-1c4b-4281-b951-d872f2087c98
16 years ago
maruel@chromium.org 5c3a2ff6a2 Add a flag not print errors in CaptureSVN()
Review URL: http://codereview.chromium.org/113288

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@15887 0039d316-1c4b-4281-b951-d872f2087c98
16 years ago
maruel@chromium.org df7a3134bd Simplify some functions by removing the options.stdout mock. Fix the unit test accordingly.
Fix breakage caused by r15861 and add a regression test.
Review URL: http://codereview.chromium.org/113278

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@15872 0039d316-1c4b-4281-b951-d872f2087c98
16 years ago
maruel@chromium.org 96b9171280 Revert 15861 because of
File "D:\b\depot_tools\bootstrap\\..\gclient.py", line 446, in SubprocessCallAndCapture
   out.write(in_byte)

TBR=nsylvain
Review URL: http://codereview.chromium.org/115244

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@15862 0039d316-1c4b-4281-b951-d872f2087c98
16 years ago
maruel@chromium.org e77173e573 Simplify some functions by removing the options.stdout mock. Fix the unit test accordingly.
Review URL: http://codereview.chromium.org/113272

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@15861 0039d316-1c4b-4281-b951-d872f2087c98
16 years ago
maruel@chromium.org 11e0fd6997 Revert changes 15823 and 15824 because they broke gclient revert.
TBR=sgk
Review URL: http://codereview.chromium.org/115217

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@15827 0039d316-1c4b-4281-b951-d872f2087c98
16 years ago
maruel@chromium.org 09b3ba2160 Cleanup gclient.py use of options where unnecessary.
Review URL: http://codereview.chromium.org/113216

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@15823 0039d316-1c4b-4281-b951-d872f2087c98
16 years ago
maruel@chromium.org 2dc8a4d3d4 Change CaptureSVNInfo() to return a dictionary instead of a object.
Review URL: http://codereview.chromium.org/113086

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@15750 0039d316-1c4b-4281-b951-d872f2087c98
16 years ago
maruel@chromium.org 483b0089b6 Slowly start moving XML parsing function in gcl to glcient.
Review URL: http://codereview.chromium.org/115040

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@15497 0039d316-1c4b-4281-b951-d872f2087c98
16 years ago
maruel@chromium.org edd27d1770 - Add '!' and 'L' status support.
- Fix gclient revert/status when one of the dependency directory is deleted.
- Remove an unneeded svn update after svn checkout.
- Updated tests.
Review URL: http://codereview.chromium.org/100256

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