Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(106)

Side by Side Diff: gclient

Issue 530001: Change to a git repo before checking git-svn version (Closed)
Patch Set: Created 10 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #!/bin/bash 1 #!/bin/bash
2 # Copyright (c) 2009 The Chromium Authors. All rights reserved. 2 # Copyright (c) 2009 The Chromium Authors. All rights reserved.
3 # Use of this source code is governed by a BSD-style license that can be 3 # Use of this source code is governed by a BSD-style license that can be
4 # found in the LICENSE file. 4 # found in the LICENSE file.
5 5
6 # This script will try to sync the bootstrap directories and then defer control. 6 # This script will try to sync the bootstrap directories and then defer control.
7 7
8 base_dir=$(dirname "$0") 8 base_dir=$(dirname "$0")
9 9
10 # Test git and git --version. 10 # Test git and git --version.
(...skipping 24 matching lines...) Expand all
35 if ((GITD[0] < 1 || (GITD[0] == 1 && GITD[1] < 6) )); then 35 if ((GITD[0] < 1 || (GITD[0] == 1 && GITD[1] < 6) )); then
36 echo "git version is ${GITV}, please update to a version later than 1.6" 36 echo "git version is ${GITV}, please update to a version later than 1.6"
37 exit 1 37 exit 1
38 fi 38 fi
39 } 39 }
40 40
41 41
42 # Update git checkouts prior the cygwin check, we don't want to use msysgit. 42 # Update git checkouts prior the cygwin check, we don't want to use msysgit.
43 if [ "X$DEPOT_TOOLS_UPDATE" != "X0" -a -e "$base_dir/.git" ] 43 if [ "X$DEPOT_TOOLS_UPDATE" != "X0" -a -e "$base_dir/.git" ]
44 then 44 then
45 # Skip this call since it fails outside a git checkout. 45 cd $base_dir
46 #test_git_svn 46 test_git_svn
47 (cd "$base_dir"; git svn rebase -q -q) 47 git svn rebase -q -q
48 cd - > /dev/null
48 fi 49 fi
49 50
50 if [ "X$DEPOT_TOOLS_UPDATE" != "X0" -a -e "$base_dir/git-cl-repo/.git" ] 51 if [ "X$DEPOT_TOOLS_UPDATE" != "X0" -a -e "$base_dir/git-cl-repo/.git" ]
51 then 52 then
52 test_git 53 test_git
53 (cd "$base_dir/git-cl-repo"; git pull -q) 54 (cd "$base_dir/git-cl-repo"; git pull -q)
54 fi 55 fi
55 56
56 # Use the batch file as an entry point if on cygwin. 57 # Use the batch file as an entry point if on cygwin.
57 if [ "${OSTYPE}" = "cygwin" -a "${TERM}" != "xterm" ]; then 58 if [ "${OSTYPE}" = "cygwin" -a "${TERM}" != "xterm" ]; then
58 ${base_dir}/gclient.bat "$@" 59 ${base_dir}/gclient.bat "$@"
59 exit 60 exit
60 fi 61 fi
61 62
62 63
63 # We're on POSIX (not cygwin). We can now safely look for svn checkout. 64 # We're on POSIX (not cygwin). We can now safely look for svn checkout.
64 if [ "X$DEPOT_TOOLS_UPDATE" != "X0" -a -e "$base_dir/.svn" ] 65 if [ "X$DEPOT_TOOLS_UPDATE" != "X0" -a -e "$base_dir/.svn" ]
65 then 66 then
66 # Update the bootstrap directory to stay up-to-date with the latest 67 # Update the bootstrap directory to stay up-to-date with the latest
67 # depot_tools. 68 # depot_tools.
68 svn -q up "$base_dir" 69 svn -q up "$base_dir"
69 fi 70 fi
70 71
71 exec python "$base_dir/gclient.py" "$@" 72 exec python "$base_dir/gclient.py" "$@"
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698