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

Side by Side Diff: gclient_utils.py

Issue 213002: Fixing errors in gclient on a gclient revert --nohooks on windows.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/tools/depot_tools/
Patch Set: '' Created 11 years, 3 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 | Annotate | Revision Log
« no previous file with comments | « gclient_scm.py ('k') | 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 # Copyright 2009 Google Inc. All Rights Reserved. 1 # Copyright 2009 Google Inc. All Rights Reserved.
2 # 2 #
3 # Licensed under the Apache License, Version 2.0 (the "License"); 3 # Licensed under the Apache License, Version 2.0 (the "License");
4 # you may not use this file except in compliance with the License. 4 # you may not use this file except in compliance with the License.
5 # You may obtain a copy of the License at 5 # You may obtain a copy of the License at
6 # 6 #
7 # http://www.apache.org/licenses/LICENSE-2.0 7 # http://www.apache.org/licenses/LICENSE-2.0
8 # 8 #
9 # Unless required by applicable law or agreed to in writing, software 9 # Unless required by applicable law or agreed to in writing, software
10 # distributed under the License is distributed on an "AS IS" BASIS, 10 # distributed under the License is distributed on an "AS IS" BASIS,
11 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 11 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 # See the License for the specific language governing permissions and 12 # See the License for the specific language governing permissions and
13 # limitations under the License. 13 # limitations under the License.
14 14
15 import os 15 import os
16 import stat
16 import subprocess 17 import subprocess
17 import sys 18 import sys
18 import xml.dom.minidom 19 import xml.dom.minidom
19 20
20 ## Generic utils 21 ## Generic utils
21 22
22 23
23 def ParseXML(output): 24 def ParseXML(output):
24 try: 25 try:
25 return xml.dom.minidom.parseString(output) 26 return xml.dom.minidom.parseString(output)
(...skipping 204 matching lines...) Expand 10 before | Expand all | Expand 10 after
230 raise Error(msg) 231 raise Error(msg)
231 232
232 233
233 def IsUsingGit(root, paths): 234 def IsUsingGit(root, paths):
234 """Returns True if we're using git to manage any of our checkouts. 235 """Returns True if we're using git to manage any of our checkouts.
235 |entries| is a list of paths to check.""" 236 |entries| is a list of paths to check."""
236 for path in paths: 237 for path in paths:
237 if os.path.exists(os.path.join(root, path, '.git')): 238 if os.path.exists(os.path.join(root, path, '.git')):
238 return True 239 return True
239 return False 240 return False
OLDNEW
« no previous file with comments | « gclient_scm.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698