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

Side by Side Diff: gclient

Issue 523166: git svn --version doesn't work when called outside a git checkout. (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 test_git_svn 45 # Skip this call since it fails outside a git checkout.
46 #test_git_svn
Nasser Grainawi 2010/01/08 18:10:30 what if we cd to $base_dir first? Since we just ve
46 (cd "$base_dir"; git svn rebase -q -q) 47 (cd "$base_dir"; git svn rebase -q -q)
47 fi 48 fi
48 49
49 if [ "X$DEPOT_TOOLS_UPDATE" != "X0" -a -e "$base_dir/git-cl-repo/.git" ] 50 if [ "X$DEPOT_TOOLS_UPDATE" != "X0" -a -e "$base_dir/git-cl-repo/.git" ]
50 then 51 then
51 test_git 52 test_git
52 (cd "$base_dir/git-cl-repo"; git pull -q) 53 (cd "$base_dir/git-cl-repo"; git pull -q)
53 fi 54 fi
54 55
55 # Use the batch file as an entry point if on cygwin. 56 # Use the batch file as an entry point if on cygwin.
56 if [ "${OSTYPE}" = "cygwin" -a "${TERM}" != "xterm" ]; then 57 if [ "${OSTYPE}" = "cygwin" -a "${TERM}" != "xterm" ]; then
57 ${base_dir}/gclient.bat "$@" 58 ${base_dir}/gclient.bat "$@"
58 exit 59 exit
59 fi 60 fi
60 61
61 62
62 # We're on POSIX (not cygwin). We can now safely look for svn checkout. 63 # We're on POSIX (not cygwin). We can now safely look for svn checkout.
63 if [ "X$DEPOT_TOOLS_UPDATE" != "X0" -a -e "$base_dir/.svn" ] 64 if [ "X$DEPOT_TOOLS_UPDATE" != "X0" -a -e "$base_dir/.svn" ]
64 then 65 then
65 # Update the bootstrap directory to stay up-to-date with the latest 66 # Update the bootstrap directory to stay up-to-date with the latest
66 # depot_tools. 67 # depot_tools.
67 svn -q up "$base_dir" 68 svn -q up "$base_dir"
68 fi 69 fi
69 70
70 exec python "$base_dir/gclient.py" "$@" 71 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