Chromium Code Reviews| Index: checkout.py |
| diff --git a/checkout.py b/checkout.py |
| index a303b338aca4d2b35ff0caea8c81f3536b8c39dd..9104e1f19d3745541b46e99412b2b295e1a2c915 100644 |
| --- a/checkout.py |
| +++ b/checkout.py |
| @@ -479,15 +479,18 @@ class SvnCheckout(CheckoutBase, SvnMixIn): |
| flags = ['--ignore-externals'] |
| if revision: |
| flags.extend(['--revision', str(revision)]) |
| - if not os.path.isdir(self.project_path): |
| + if os.path.isdir(self.project_path): |
| + # This call may as well remove the whole checkout. |
|
Peter Mayo
2012/12/19 14:05:19
I think you mean "This call may remove the whole c
M-A Ruel
2012/12/19 14:18:24
done.
|
| + scm.SVN.Revert(self.project_path, no_ignore=True) |
| + |
| + if os.path.isdir(self.project_path): |
| + # Revive files that were deleted in scm.SVN.Revert(). |
| + self._check_call_svn(['update', '--force'] + flags) |
| + else: |
| logging.info( |
| 'Directory %s is not present, checking it out.' % self.project_path) |
| self._check_call_svn( |
| ['checkout', self.svn_url, self.project_path] + flags, cwd=None) |
| - else: |
| - scm.SVN.Revert(self.project_path, no_ignore=True) |
| - # Revive files that were deleted in scm.SVN.Revert(). |
| - self._check_call_svn(['update', '--force'] + flags) |
| return self._get_revision() |
| def _get_revision(self): |