diff options
Diffstat (limited to 'git_superproject.py')
-rw-r--r-- | git_superproject.py | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/git_superproject.py b/git_superproject.py index 07bc2645..5d00bd72 100644 --- a/git_superproject.py +++ b/git_superproject.py | |||
@@ -18,7 +18,7 @@ For more information on superproject, check out: | |||
18 | https://en.wikibooks.org/wiki/Git/Submodules_and_Superprojects | 18 | https://en.wikibooks.org/wiki/Git/Submodules_and_Superprojects |
19 | 19 | ||
20 | Examples: | 20 | Examples: |
21 | superproject = Superproject() | 21 | superproject = Superproject(manifest, name, remote, revision) |
22 | UpdateProjectsResult = superproject.UpdateProjectsRevisionId(projects) | 22 | UpdateProjectsResult = superproject.UpdateProjectsRevisionId(projects) |
23 | """ | 23 | """ |
24 | 24 | ||
@@ -99,8 +99,8 @@ class Superproject(object): | |||
99 | self._work_git_name = git_name + _SUPERPROJECT_GIT_NAME | 99 | self._work_git_name = git_name + _SUPERPROJECT_GIT_NAME |
100 | self._work_git = os.path.join(self._superproject_path, self._work_git_name) | 100 | self._work_git = os.path.join(self._superproject_path, self._work_git_name) |
101 | 101 | ||
102 | # The following are command arguemnts, rather then superproject attributes, | 102 | # The following are command arguemnts, rather than superproject attributes, |
103 | # and where included here originally. They should eventually become | 103 | # and were included here originally. They should eventually become |
104 | # arguments that are passed down from the public methods, instead of being | 104 | # arguments that are passed down from the public methods, instead of being |
105 | # treated as attributes. | 105 | # treated as attributes. |
106 | self._git_event_log = None | 106 | self._git_event_log = None |
@@ -329,7 +329,8 @@ class Superproject(object): | |||
329 | """Update revisionId of every project in projects with the commit id. | 329 | """Update revisionId of every project in projects with the commit id. |
330 | 330 | ||
331 | Args: | 331 | Args: |
332 | projects: List of projects whose revisionId needs to be updated. | 332 | projects: a list of projects whose revisionId needs to be updated. |
333 | git_event_log: an EventLog, for git tracing. | ||
333 | 334 | ||
334 | Returns: | 335 | Returns: |
335 | UpdateProjectsResult | 336 | UpdateProjectsResult |
@@ -431,9 +432,15 @@ def UseSuperproject(use_superproject, manifest): | |||
431 | Args: | 432 | Args: |
432 | use_superproject: option value from optparse. | 433 | use_superproject: option value from optparse. |
433 | manifest: manifest to use. | 434 | manifest: manifest to use. |
435 | |||
436 | Returns: | ||
437 | Whether the superproject should be used. | ||
434 | """ | 438 | """ |
435 | 439 | ||
436 | if use_superproject is not None: | 440 | if not manifest.superproject: |
441 | # This (sub) manifest does not have a superproject definition. | ||
442 | return False | ||
443 | elif use_superproject is not None: | ||
437 | return use_superproject | 444 | return use_superproject |
438 | else: | 445 | else: |
439 | client_value = manifest.manifestProject.use_superproject | 446 | client_value = manifest.manifestProject.use_superproject |