diff options
-rw-r--r-- | manifest_xml.py | 3 | ||||
-rw-r--r-- | project.py | 5 |
2 files changed, 7 insertions, 1 deletions
diff --git a/manifest_xml.py b/manifest_xml.py index 7e719600..6dc01a47 100644 --- a/manifest_xml.py +++ b/manifest_xml.py | |||
@@ -303,6 +303,9 @@ class XmlManifest(object): | |||
303 | if p.sync_s: | 303 | if p.sync_s: |
304 | e.setAttribute('sync-s', 'true') | 304 | e.setAttribute('sync-s', 'true') |
305 | 305 | ||
306 | if p.clone_depth: | ||
307 | e.setAttribute('clone-depth', str(p.clone_depth)) | ||
308 | |||
306 | if p.subprojects: | 309 | if p.subprojects: |
307 | subprojects = set(subp.name for subp in p.subprojects) | 310 | subprojects = set(subp.name for subp in p.subprojects) |
308 | output_projects(p, e, list(sorted(subprojects))) | 311 | output_projects(p, e, list(sorted(subprojects))) |
@@ -2320,7 +2320,10 @@ class Project(object): | |||
2320 | # Fail if the links are pointing to the wrong place | 2320 | # Fail if the links are pointing to the wrong place |
2321 | if src != dst: | 2321 | if src != dst: |
2322 | raise GitError('--force-sync not enabled; cannot overwrite a local ' | 2322 | raise GitError('--force-sync not enabled; cannot overwrite a local ' |
2323 | 'work tree') | 2323 | 'work tree. If you\'re comfortable with the ' |
2324 | 'possibility of losing the work tree\'s git metadata,' | ||
2325 | ' use `repo sync --force-sync {0}` to ' | ||
2326 | 'proceed.'.format(self.relpath)) | ||
2324 | 2327 | ||
2325 | def _ReferenceGitDir(self, gitdir, dotgit, share_refs, copy_all): | 2328 | def _ReferenceGitDir(self, gitdir, dotgit, share_refs, copy_all): |
2326 | """Update |dotgit| to reference |gitdir|, using symlinks where possible. | 2329 | """Update |dotgit| to reference |gitdir|, using symlinks where possible. |