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

Side by Side Diff: checkout.py

Issue 10355014: Make checkout.*.prepare() to delete the svn:ignored files. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/depot_tools
Patch Set: Created 8 years, 7 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 | « no previous file | 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 # coding=utf8 1 # coding=utf8
2 # Copyright (c) 2012 The Chromium Authors. All rights reserved. 2 # Copyright (c) 2012 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 """Manages a project checkout. 5 """Manages a project checkout.
6 6
7 Includes support for svn, git-svn and git. 7 Includes support for svn, git-svn and git.
8 """ 8 """
9 9
10 import ConfigParser 10 import ConfigParser
(...skipping 375 matching lines...) Expand 10 before | Expand all | Expand 10 after
386 """ 386 """
387 flags = ['--ignore-externals'] 387 flags = ['--ignore-externals']
388 if revision: 388 if revision:
389 flags.extend(['--revision', str(revision)]) 389 flags.extend(['--revision', str(revision)])
390 if not os.path.isdir(self.project_path): 390 if not os.path.isdir(self.project_path):
391 logging.info( 391 logging.info(
392 'Directory %s is not present, checking it out.' % self.project_path) 392 'Directory %s is not present, checking it out.' % self.project_path)
393 self._check_call_svn( 393 self._check_call_svn(
394 ['checkout', self.svn_url, self.project_path] + flags, cwd=None) 394 ['checkout', self.svn_url, self.project_path] + flags, cwd=None)
395 else: 395 else:
396 scm.SVN.Revert(self.project_path) 396 scm.SVN.Revert(self.project_path, no_ignore=True)
397 # Revive files that were deleted in scm.SVN.Revert(). 397 # Revive files that were deleted in scm.SVN.Revert().
398 self._check_call_svn(['update', '--force'] + flags) 398 self._check_call_svn(['update', '--force'] + flags)
399 return self._get_revision() 399 return self._get_revision()
400 400
401 def _get_revision(self): 401 def _get_revision(self):
402 out = self._check_output_svn(['info', '.']) 402 out = self._check_output_svn(['info', '.'])
403 revision = int(self._parse_svn_info(out, 'revision')) 403 revision = int(self._parse_svn_info(out, 'revision'))
404 if revision != self._last_seen_revision: 404 if revision != self._last_seen_revision:
405 logging.info('Updated to revision %d' % revision) 405 logging.info('Updated to revision %d' % revision)
406 self._last_seen_revision = revision 406 self._last_seen_revision = revision
(...skipping 340 matching lines...) Expand 10 before | Expand all | Expand 10 after
747 user, message)) 747 user, message))
748 return 'FAKE' 748 return 'FAKE'
749 749
750 @property 750 @property
751 def project_name(self): 751 def project_name(self):
752 return self.checkout.project_name 752 return self.checkout.project_name
753 753
754 @property 754 @property
755 def project_path(self): 755 def project_path(self):
756 return self.checkout.project_path 756 return self.checkout.project_path
OLDNEW
« no previous file with comments | « no previous file | scm.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698