diff options
| -rw-r--r-- | docs/manifest-format.txt | 7 | ||||
| -rw-r--r-- | manifest_xml.py | 4 |
2 files changed, 11 insertions, 0 deletions
diff --git a/docs/manifest-format.txt b/docs/manifest-format.txt index f4629a55..59f6a2fd 100644 --- a/docs/manifest-format.txt +++ b/docs/manifest-format.txt | |||
| @@ -57,6 +57,7 @@ following DTD: | |||
| 57 | <!ATTLIST project sync-s CDATA #IMPLIED> | 57 | <!ATTLIST project sync-s CDATA #IMPLIED> |
| 58 | <!ATTLIST project upstream CDATA #IMPLIED> | 58 | <!ATTLIST project upstream CDATA #IMPLIED> |
| 59 | <!ATTLIST project clone-depth CDATA #IMPLIED> | 59 | <!ATTLIST project clone-depth CDATA #IMPLIED> |
| 60 | <!ATTLIST project force-path CDATA #IMPLIED> | ||
| 60 | 61 | ||
| 61 | <!ELEMENT annotation (EMPTY)> | 62 | <!ELEMENT annotation (EMPTY)> |
| 62 | <!ATTLIST annotation name CDATA #REQUIRED> | 63 | <!ATTLIST annotation name CDATA #REQUIRED> |
| @@ -227,6 +228,12 @@ Attribute `clone-depth`: Set the depth to use when fetching this | |||
| 227 | project. If specified, this value will override any value given | 228 | project. If specified, this value will override any value given |
| 228 | to repo init with the --depth option on the command line. | 229 | to repo init with the --depth option on the command line. |
| 229 | 230 | ||
| 231 | Attribute `force-path`: Set to true to force this project to create the | ||
| 232 | local mirror repository according to its `path` attribute (if supplied) | ||
| 233 | rather than the `name` attribute. This attribute only applies to the | ||
| 234 | local mirrors syncing, it will be ignored when syncing the projects in a | ||
| 235 | client working directory. | ||
| 236 | |||
| 230 | Element annotation | 237 | Element annotation |
| 231 | ------------------ | 238 | ------------------ |
| 232 | 239 | ||
diff --git a/manifest_xml.py b/manifest_xml.py index 4eef748f..51d51b95 100644 --- a/manifest_xml.py +++ b/manifest_xml.py | |||
| @@ -690,6 +690,10 @@ class XmlManifest(object): | |||
| 690 | default_groups = ['all', 'name:%s' % name, 'path:%s' % relpath] | 690 | default_groups = ['all', 'name:%s' % name, 'path:%s' % relpath] |
| 691 | groups.extend(set(default_groups).difference(groups)) | 691 | groups.extend(set(default_groups).difference(groups)) |
| 692 | 692 | ||
| 693 | if self.IsMirror and node.hasAttribute('force-path'): | ||
| 694 | if node.getAttribute('force-path').lower() in ("yes", "true", "1"): | ||
| 695 | gitdir = os.path.join(self.topdir, '%s.git' % path) | ||
| 696 | |||
| 693 | project = Project(manifest = self, | 697 | project = Project(manifest = self, |
| 694 | name = name, | 698 | name = name, |
| 695 | remote = remote.ToRemoteSpec(name), | 699 | remote = remote.ToRemoteSpec(name), |
