The novel addition here is to not convert a checkout into an update when no
files were checked out. Also delete the directory to increase the chances of
success.
TEST=wait for google code to fail again
BUG=32783
Review URL: http://codereview.chromium.org/2858003
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@49788 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
configured for it when figuring out the patch to upload to the try
server. This prevents git installations where the diff is configured
to use an interactive tool to work without doing nasty workarounds.
BUG=none
TEST=none
Review URL: http://codereview.chromium.org/1958002
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@47661 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
Raise an exception in case an upstream branch can't be found.
Fix an exception that was occuring just before when no upstream is found.
Review URL: http://codereview.chromium.org/1755018
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@46011 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
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
Similar to r43313, this CL makes |git try| use the same patch that |git cl upload| uploads.
Review URL: http://codereview.chromium.org/1595018
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@44097 0039d316-1c4b-4281-b951-d872f2087c98
scenario I encountered was I've added another one of my machines as a
remote, and because we preferred the last ref my diffs were always
against my remote machine rather than local trunk. This change prefers
the first over the last. Another option would be to prefer something
like remotes/origin/trunk. Let me know what you think.
I've got a similar change to git-cl, but I'll wait until we agree upon
this before uploading that one.
Review URL: http://codereview.chromium.org/1622011
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@44094 0039d316-1c4b-4281-b951-d872f2087c98
With this CL, the patch that is sent to the code review site includes only changes from the nearest common ancestor of the local and the upstream branch.
A diagram:
/----B <- local branch
----A-----C <- upstream
Previously, the diff would be simply between C and B, whereas now it's between A and C, even if you update C.
This allows you to continously update origin/trunk without having to rebase/merge your local changes all the time, resulting in the need for less rebuilds.
Review URL: http://codereview.chromium.org/1583003
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@43113 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
in_directory was not being set to the correct cwd. This caused commands to
always run in the dir from which gclient was executed.
Review URL: http://codereview.chromium.org/554142
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@37697 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
TEST=send a try job with a file moved with modified content
BUG=6825
Review URL: http://codereview.chromium.org/554013
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@36828 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
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
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
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
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
Subversion's client just bails out too early too often.
Review URL: http://codereview.chromium.org/437015
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@32967 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