diff options
Diffstat (limited to 'project.py')
| -rw-r--r-- | project.py | 7 |
1 files changed, 5 insertions, 2 deletions
| @@ -2147,8 +2147,8 @@ class Project(object): | |||
| 2147 | try: | 2147 | try: |
| 2148 | self._CheckDirReference(self.objdir, self.gitdir, share_refs=False) | 2148 | self._CheckDirReference(self.objdir, self.gitdir, share_refs=False) |
| 2149 | except GitError as e: | 2149 | except GitError as e: |
| 2150 | print("Retrying clone after deleting %s" % force_sync, file=sys.stderr) | ||
| 2151 | if force_sync: | 2150 | if force_sync: |
| 2151 | print("Retrying clone after deleting %s" % self.gitdir, file=sys.stderr) | ||
| 2152 | try: | 2152 | try: |
| 2153 | shutil.rmtree(os.path.realpath(self.gitdir)) | 2153 | shutil.rmtree(os.path.realpath(self.gitdir)) |
| 2154 | if self.worktree and os.path.exists( | 2154 | if self.worktree and os.path.exists( |
| @@ -2285,7 +2285,10 @@ class Project(object): | |||
| 2285 | # Fail if the links are pointing to the wrong place | 2285 | # Fail if the links are pointing to the wrong place |
| 2286 | if src != dst: | 2286 | if src != dst: |
| 2287 | raise GitError('--force-sync not enabled; cannot overwrite a local ' | 2287 | raise GitError('--force-sync not enabled; cannot overwrite a local ' |
| 2288 | 'work tree') | 2288 | 'work tree. If you\'re comfortable with the ' |
| 2289 | 'possibility of losing the work tree\'s git metadata,' | ||
| 2290 | ' use `repo sync --force-sync {0}` to ' | ||
| 2291 | 'proceed.'.format(self.relpath)) | ||
| 2289 | 2292 | ||
| 2290 | def _ReferenceGitDir(self, gitdir, dotgit, share_refs, copy_all): | 2293 | def _ReferenceGitDir(self, gitdir, dotgit, share_refs, copy_all): |
| 2291 | """Update |dotgit| to reference |gitdir|, using symlinks where possible. | 2294 | """Update |dotgit| to reference |gitdir|, using symlinks where possible. |
