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

Side by Side Diff: gclient_utils.py

Issue 501171: Add full_move flag to GIT.GenerateDiff and Factor out FindGclientRootDir into gclient_utils. (Closed)
Patch Set: Created 10 years, 12 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 | « gcl.py ('k') | scm.py » ('j') | 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,
(...skipping 289 matching lines...) Expand 10 before | Expand all | Expand 10 after
300 raise Error(msg) 300 raise Error(msg)
301 301
302 302
303 def IsUsingGit(root, paths): 303 def IsUsingGit(root, paths):
304 """Returns True if we're using git to manage any of our checkouts. 304 """Returns True if we're using git to manage any of our checkouts.
305 |entries| is a list of paths to check.""" 305 |entries| is a list of paths to check."""
306 for path in paths: 306 for path in paths:
307 if os.path.exists(os.path.join(root, path, '.git')): 307 if os.path.exists(os.path.join(root, path, '.git')):
308 return True 308 return True
309 return False 309 return False
310
311 def FindGclientRoot(from_dir):
312 """Tries to find the gclient root."""
313 path = os.path.realpath(from_dir)
314 while not os.path.exists(os.path.join(path, '.gclient')):
315 next = os.path.split(path)
316 if not next[1]:
317 return None
318 path = next[0]
319 return path
OLDNEW
« no previous file with comments | « gcl.py ('k') | scm.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698