You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
Go to file
msb@chromium.org 786fb68d39 gclient_scm.py: Make working with git more reliable
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
16 years ago
bootstrap Set bootstrap Python version to 2.6 16 years ago
tests gclient_scm.py: Make working with git more reliable 16 years ago
third_party Update upload.py to r529 16 years ago
zsh-goodies First take on zsh-completion functionality for gclient. 16 years ago
.gitignore Add basic gclient smoke tests. 16 years ago
LICENSE
PRESUBMIT.py Reapply 48271 for the third time with fix. 16 years ago
README Fix licensing headers and move most third party code to third_party/ 16 years ago
README.gclient This adds a feature to gclient to allow the (optional) specification of the 16 years ago
WATCHLISTS
breakpad.py Use https for stack trace upload. 16 years ago
chrome-update-create-task.bat Fix exit 1 to goto :EOF. 16 years ago
chrome-update.bat
chrome-update.py
codereview.settings Add codereview.settings to depot_tools. 16 years ago
cpplint.bat Add setlocal so {cpplin,gcl}.bat don't repeatedly add \depot_tools to %PATH%. 16 years ago
cpplint.py - Add a presubmit check that lints C++ files (will submit CLs that 16 years ago
create-chromium-git-src Make svn password prompt available during setup. 16 years ago
drover Make drover works in cygwin. 16 years ago
drover.bat Fix drover.py style. 16 years ago
drover.py Add option --local allowing for merging changes into a local working copy. 16 years ago
gcl Mark depot_tools scripts as bash scripts. 16 years ago
gcl.bat Add setlocal so {cpplin,gcl}.bat don't repeatedly add \depot_tools to %PATH%. 16 years ago
gcl.py Fix broken "gcl diff cl" command. We need to use full paths, not 16 years ago
gclient Fix for git-svn rebase bug 16 years ago
gclient.bat Fix using depot_tools from a git checkout on Windows. 16 years ago
gclient.py Move all revision parsing code to _EnforceRevisions. 16 years ago
gclient_scm.py gclient_scm.py: Make working with git more reliable 16 years ago
gclient_utils.py Revert r45652 and r45653. It broke the single file export 16 years ago
git-cl depot_tools: Make git-cl wrapper not fail when repo is missing. 16 years ago
git-cl-upload-hook Fixes based on maruel's comments. 16 years ago
git-gs depot_tools: Print line numbers in search results of git-gs 16 years ago
git-try More examples at the end of trychange.py help and move the -R flag to the right group 16 years ago
git_cl_hooks.py Enable CheckRietveldTryJobExecution for git-cl. 16 years ago
hammer
hammer.bat
presubmit_canned_checks.py Ignore case in tree status check 16 years ago
presubmit_support.py Fix presubmit_unittests on some versions of python2.5. 16 years ago
profile.xml
scm.py gclient_scm.py: Make working with git more reliable 16 years ago
trychange.py Certain versions of python for Windows don't support epilog in the constructor. 16 years ago
watchlists.py
weekly Adding weekly tool to help with weekly snippets 16 years ago
wtf Adding weekly tool to help with weekly snippets 16 years ago

README

This package contains tools for working with Chromium development.

The "gclient" wrapper knows how to keep this repository updated to
the latest versions of these tools as found at:

    http://src.chromium.org/svn/trunk/tools/depot_tools

This package contains:

  chrome-update-create-task.bat
    Creates a scheduled task to do an automatic local chromium build every day.

  cpplint.py
    A copy of our linting tool which enforces Google style. Fetched from
    http://google-styleguide.googlecode.com/svn/trunk/cpplint/cpplint.py

  gcl
    A tool for uploading and managing code reviews on the Chromium
    project, using the Rietveld code review tool.  More info at:
    http://code.google.com/p/rietveld/

  gclient
    A script for managing a workspace with modular dependencies that
    are each checked out independently from different repositories.
    More info at:
    http://code.google.com/p/gclient/

  hammer
    A wrapper script for building Chromium with the SCons software
    construction tool.  More info at:
    http://www.scons.org/

Note: svn and python will be installed automatically if not accessible (on
Windows only).

To update this distribution manually, run bootstrap\update.bat on Windows,
or bootstrap/update.sh on Linux or Mac.

To disable automatic updating, set the environment variable DEPOT_TOOLS_UPDATE=0