Revert the order back to deleting then svn revert'ing, which is safer than the
reverse. Document a bit better the behavior.
R=dpranke@chromium.org
BUG=none
TEST=commit queue should die less often
Review URL: http://codereview.chromium.org/6681032
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@78224 0039d316-1c4b-4281-b951-d872f2087c98
Improve test to make sure svn status comes out clean.
TEST=improved unit tests and scm.SVN.Revert() should now do the right thing
BUG=none
Review URL: http://codereview.chromium.org/6650011
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@77391 0039d316-1c4b-4281-b951-d872f2087c98
Add a unit test to catch potential regressions. Remove an old test new code broke.
TEST=unit tests
BUG=none
Review URL: http://codereview.chromium.org/6613025
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@76805 0039d316-1c4b-4281-b951-d872f2087c98
The svn branch heuristic does roughly the same thing git-svn does: We first iterate backwards over the history to find the svn URL (like svn://svn.chromium.org/chrome/trunk/src). Then we go through all defined svn-remote section looking for one where the URL is the root of the svn URL (svn://svn.chromium.org/chrome in that case), and the fetch spec looks like "trunk/src:remotes/origin/trunk". If the base URL + left part (trunk/src) is the full URL, the right part (remotes/origin/trunk) is the git ref that is updated when we do a `git svn fetch`! This works for git-svn branches that fetch from trunk as well as milestone branches.
BUG=none
TEST=none
Review URL: http://codereview.chromium.org/6597004
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@76364 0039d316-1c4b-4281-b951-d872f2087c98
from the same repository.
TEST=added regression test.
BUG=none
Review URL: http://codereview.chromium.org/6578029
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@75937 0039d316-1c4b-4281-b951-d872f2087c98
To reproduce, svn delete a file, then svn merge -c -N the file to revive it.
Also fix a unit test that was broken for a while.
TEST=none
BUG=none
Review URL: http://codereview.chromium.org/6576005
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@75835 0039d316-1c4b-4281-b951-d872f2087c98
There is 2 changes while moving the code:
- Making externals handling an option.
- Not trapping EnvironmentError.
This code will be reused by the commit queue.
TEST=unit tests
BUG=none
Review URL: http://codereview.chromium.org/6250177
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@74181 0039d316-1c4b-4281-b951-d872f2087c98
Added try/except to the places where errors are tolerated.
Renamed scm.SVN.CaptureBaseRevision to CaptureRevision and removed CaptureHeadRevision.
BUG=54084
TEST=none
Review URL: http://codereview.chromium.org/3307016
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@58932 0039d316-1c4b-4281-b951-d872f2087c98
This starts at 5 seconds (used to be 15) and goes up to ~60 seconds on the tenth round.
BUG=None
TEST=None
Review URL: http://codereview.chromium.org/3326004
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@58488 0039d316-1c4b-4281-b951-d872f2087c98
This way the function is much more similar to subprocess.call(). Further changes
will be done, to be able to convert all the function, to be able to parallelize
output without corrupting it.
Used pylint to verify call graph correctness, causing some other unrelated
changes.
TEST=unit tests
BUG=none
Review URL: http://codereview.chromium.org/3117039
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@57369 0039d316-1c4b-4281-b951-d872f2087c98
It will eventually replace 'print_messages' and be used to annotate printed
lines when using --jobs.
Review URL: http://codereview.chromium.org/3174020
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@57092 0039d316-1c4b-4281-b951-d872f2087c98
Original Description:
Remove code duplication and improve style.
Create a Popen function to reduce code duplication.
Use RemoveDirectory where relevant.
Make drover slightly more posix friendly.
Review URL: http://codereview.chromium.org/3199011
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@57083 0039d316-1c4b-4281-b951-d872f2087c98
Create a Popen function to reduce code duplication.
Use RemoveDirectory where relevant.
Make drover slightly more posix friendly.
Review URL: http://codereview.chromium.org/3126020
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@56893 0039d316-1c4b-4281-b951-d872f2087c98
svn's client uses a different error format for HTTP 502 and I didn't recall how
the string was formatted. Luckily enough googlecode fails often enough it wasn't
long for me to reproduce the issue. :)
TBR=bradnelson
Review URL: http://codereview.chromium.org/3143030
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@56675 0039d316-1c4b-4281-b951-d872f2087c98
BUG=chromium-os:5305
TEST=gclient sync should be much more resistent
Review URL: http://codereview.chromium.org/3132021
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@56565 0039d316-1c4b-4281-b951-d872f2087c98
This is towards cleaning up the mess with 'options' in gclient_scm.py.
Review URL: http://codereview.chromium.org/3106014
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@56213 0039d316-1c4b-4281-b951-d872f2087c98
Right now if you svn cp or svn mv before uploading to rietveld,
there's no description in the patch at all of what was done; so you
get a diff, but it's for who knows what revision of what prior file
to some current version.
For code reviews this kinda works (you ask the guy what it was), but for
trying to apply patches (ala git patch) this fails badly. This patch
tries to add some metadata to the start of a rietveld patch that
describes these changes: both to a human (who can read them)
and to a potential clever future git-cl (which I'll do next).
The metadata looks like this after checking out a test repo, and
svn cp -r 1 foo nitz; svn cp bar quux; echo be good>>quux
### BEGIN SVN COPY METADATA
#$ svn cp -r 1 foo nitz ### WARNING: note non-trunk copy
#$ cp bar quux
### END SVN COPY METADATA
Index: nitz
Index: quux
===================================================================
--- quux (revision 0)
+++ quux (working copy)
@@ -1,2 +1,3 @@
hi mom
hi sister
+be good
I did a test, and this looks like it works in svn 1.4.4 as well.
BUG=none
TEST=none
Review URL: http://codereview.chromium.org/2824035
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@51121 0039d316-1c4b-4281-b951-d872f2087c98
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