Commit Graph

67 Commits (3c55d981110faadb588ba98d932cff3b2fb728c0)

Author SHA1 Message Date
nasser@codeaurora.org b2b4631780 Make gclient.git.revert reset to DEPS revision
BUG=http://crosbug.com/2897

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

Change-Id: I1398a349f1af728b593f0d4ea877831f25aed1f4

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@46113 0039d316-1c4b-4281-b951-d872f2087c98
15 years ago
maruel@chromium.org fd87617b28 Standardize automatic retry and add a 15 seconds sleep to increase the chances of success
Review URL: http://codereview.chromium.org/1812001

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@46067 0039d316-1c4b-4281-b951-d872f2087c98
15 years ago
maruel@chromium.org 81e012ce41 Modify scm.GIT.GetUpstreamBranch to behave like git-cl.
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
15 years ago
tony@chromium.org 5756466130 Fix File() to work with SVN 1.4 by using svn export in place
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
15 years ago
tony@chromium.org 4b5b1779fb Add the ability to check out a single file from a repo.
The syntax is:
deps {
  'path': File('http://svn..../path/file@42')
}

This will checkout a single file and use scm.update to
keep it up to date.

See https://bugs.webkit.org/show_bug.cgi?id=36578#c7 for a
description of why I want to add this.

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@43911 0039d316-1c4b-4281-b951-d872f2087c98
15 years ago
nasser@codeaurora.org 5d63eb8382 revinfo: Properly use git HEAD or svn BASE revisions
BUG=http://crosbug.com/1658

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@42555 0039d316-1c4b-4281-b951-d872f2087c98
15 years ago
nasser@codeaurora.org 7080e94277 Fix @hash in DEPS file
Broken by the @branchname support

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@41585 0039d316-1c4b-4281-b951-d872f2087c98
15 years ago
maruel@chromium.org 55e724e8fe Stop SVNWrapper and GitWrapper from inheriting from scm.SVN and scm.GIT.
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
15 years ago
maruel@chromium.org d0f854af68 Extract git version check code from gclient_scm.py into scm.py where it belongs.
Review URL: http://codereview.chromium.org/878001

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@41308 0039d316-1c4b-4281-b951-d872f2087c98
15 years ago
nasser@codeaurora.org 3b29de12a8 Ensure --revision is used when specified
BUG=http://crosbug.com/1669

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@40911 0039d316-1c4b-4281-b951-d872f2087c98
15 years ago
maruel@chromium.org 0b1c246cd7 Add automatic retry on "git remote update".
It does remote connection and can get HTTP 502 when used over http.

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@40330 0039d316-1c4b-4281-b951-d872f2087c98
15 years ago
nasser@codeaurora.org ece406f5b9 Require git version 1.6.6
Review URL: http://codereview.chromium.org/652125

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@39741 0039d316-1c4b-4281-b951-d872f2087c98
15 years ago
nasser@codeaurora.org d90ba3f136 sync @branchname git support
Also improve GIT.update error handling and verbosity levels

TEST=unit tests
BUG=http://crosbug.com/480
BUG=http://crosbug.com/1136

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@39717 0039d316-1c4b-4281-b951-d872f2087c98
15 years ago
davemoore@chromium.org 793796dcc6 Add gcl-reset option.
Review URL: http://codereview.chromium.org/647063

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@39457 0039d316-1c4b-4281-b951-d872f2087c98
15 years ago
maruel@chromium.org 2de10250a2 Add automatic retry on HTTP 502 for svn and connection drop for git.
TEST=totally untested
BUG=34793

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@38336 0039d316-1c4b-4281-b951-d872f2087c98
15 years ago
msb@chromium.org d8a637875f Make gclient cleanup a no-op for git
Patch-contributed-by: Nasser Grainawi <nasser@codeaurora.org>

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@37021 0039d316-1c4b-4281-b951-d872f2087c98
15 years ago
msb@chromium.org eafef3b33e Use --force to reset a git repo before attempting to rebase during gclient sync/update
Patch Contributed By: Nasser Grainawi <nasser@codeaurora.org>

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@37020 0039d316-1c4b-4281-b951-d872f2087c98
15 years ago
msb@chromium.org 3904caa959 Always list the args in the same order
Patch-contributed-by: Nasser Grainawi <nasser@codeaurora.org>

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@37016 0039d316-1c4b-4281-b951-d872f2087c98
15 years ago
msb@chromium.org e4af1ab4cf gclient: Add better error reporting when path is not a git repo.
Review URL: http://codereview.chromium.org/505007

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@36172 0039d316-1c4b-4281-b951-d872f2087c98
15 years ago
msb@chromium.org d6504218f2 Update docs for git usage
chromium-os BUG=1189

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@36129 0039d316-1c4b-4281-b951-d872f2087c98
15 years ago
msb@chromium.org e6f78352a7 gclient: git relative url implementation
Redo relative url implementation per maruel's comments here:
http://codereview.chromium.org/500015

Instead of adding an option, implement relative urls differently for
git urls.

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@36126 0039d316-1c4b-4281-b951-d872f2087c98
15 years ago
maruel@chromium.org d2e78ff631 Allow gclient revert to remove symlinks
Previously links weren't caught at the appropriate point and instead passed to RemoveDirectory which then rejected them because they were links.

Patch contributed by Nasser <nasser@codeaurora>

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@35936 0039d316-1c4b-4281-b951-d872f2087c98
15 years ago
maruel@chromium.org f3909bf2d3 Check for the existence of git before running commands.
Checks in the gclient wrapper and when running any gclient git command.

TEST=none
BUG=none

Patch contributed by Nasser <nasser@codeaurora>

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@35762 0039d316-1c4b-4281-b951-d872f2087c98
15 years ago
maruel@chromium.org ee4071d443 Add gclient_scm.GitWrapper.pack()
TEST=none
BUG=none

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@35177 0039d316-1c4b-4281-b951-d872f2087c98
15 years ago
msb@chromium.org c532e17e1b gclient: implement a less hacky relative URL implementation
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
15 years ago
msb@chromium.org 5bde485307 gclient: Add better error reporting and handling when there is a rebase conflict
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
15 years ago
msb@chromium.org ba9b239c41 gclient: Don't change directories when checking git version.
Review URL: http://codereview.chromium.org/495003

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@34392 0039d316-1c4b-4281-b951-d872f2087c98
15 years ago
msb@chromium.org 83376f2f5a gclient: fix git version check to handle 1.6.5.2.5.g7c3ba.dirty
Review URL: http://codereview.chromium.org/486036

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@34386 0039d316-1c4b-4281-b951-d872f2087c98
15 years ago
msb@chromium.org 923a0373c8 gclient: Add a minimum git version check.
Review URL: http://codereview.chromium.org/490021

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@34377 0039d316-1c4b-4281-b951-d872f2087c98
15 years ago
maruel@chromium.org ffe96f07a9 Fix default cwd value and the timing of the result code check
Review URL: http://codereview.chromium.org/474002

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@34166 0039d316-1c4b-4281-b951-d872f2087c98
15 years ago
msb@chromium.org f237063dce gclient: handle case for upstream has rebased
gclient sync will potentially fail if the upstream git tree has been rebased.
This CL fixes this by using rebase --onto to only rebase our local changes.

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@33011 0039d316-1c4b-4281-b951-d872f2087c98
15 years ago
msb@chromium.org 1b8779ae3f gclient: Fix bug where urls with revisions are not parsed correctly.
Review URL: http://codereview.chromium.org/402084

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@32521 0039d316-1c4b-4281-b951-d872f2087c98
16 years ago
msb@chromium.org 161d548e28 gclient: fix regression in revision handling code in GitWrapper::update
Review URL: http://codereview.chromium.org/399040

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@32200 0039d316-1c4b-4281-b951-d872f2087c98
16 years ago
maruel@chromium.org 5aeb7dd54c Reapply 32057, 32058, 32059, 32062 and fixes problems introduced by these changes.
Noteworthy change is scm.SVN.GetFileProperty calls Capture instead of Run.

TEST=unit tests
BUG=none

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@32181 0039d316-1c4b-4281-b951-d872f2087c98
16 years ago
maruel@chromium.org 261eeb5e93 Revert 32057, 32058, 32059, 32062 because they still have unwanted side-effects.
Revert "Group SCM-specific functions in classes to simplify generalization of the interface."
Revert "Fix 2 recently introduced errors."
Revert "Fix a variable aliasing error."
Revert "Fix typo."

TBR=dpranke
TEST=none
BUG=none

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@32065 0039d316-1c4b-4281-b951-d872f2087c98
16 years ago
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 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 d5800f1996 Split scm-specific functions out of gclient_scm.py to scm.py.
Reapplies r31809 is typo fixed.

TEST=unit tests fixed and reclassified
BUG=none

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@31812 0039d316-1c4b-4281-b951-d872f2087c98
16 years ago
maruel@chromium.org 0563d6c747 Revert "Split scm-specific functions out of gclient_scm.py to scm.py."
This reverts commit 7489404c56dcc725c7c13214f410b2d375a6630a.

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@31810 0039d316-1c4b-4281-b951-d872f2087c98
16 years ago
maruel@chromium.org 8ce0a13a85 Split scm-specific functions out of gclient_scm.py to scm.py.
TEST=unit tests fixed and reclassified
BUG=none

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@31809 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 7780c28b92 gclient: fix bug where ssh urls with a username weren't parse correctly
ssh://test@example.org/test.git was not parsed correctly because we
would split at the '@' assuming what followed was a revision.

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@31444 0039d316-1c4b-4281-b951-d872f2087c98
16 years ago
msb@chromium.org b1a22bfe7a gclient: make sync more verbose on git
Requirement for build system.

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@31362 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
msb@chromium.org e8e60e5810 gclient: make git path more verbose
Review URL: http://codereview.chromium.org/353001

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@30752 0039d316-1c4b-4281-b951-d872f2087c98
16 years ago
msb@chromium.org 260c65333a Add directory check to Git revert.
Review URL: http://codereview.chromium.org/339037

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@30317 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
chase@chromium.org 8e416c83a8 Git support in presubmit tests.
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
16 years ago