diff --git a/manic/repository_factory.py b/manic/repository_factory.py index 8e1b9aae3..18c73ffc4 100644 --- a/manic/repository_factory.py +++ b/manic/repository_factory.py @@ -15,7 +15,7 @@ def create_repository(component_name, repo_info, svn_ignore_ancestry=False): """Determine what type of repository we have, i.e. git or svn, and create the appropriate object. - Can return None if protocol is 'externals_only'. + Can return None (e.g. if protocol is 'externals_only'). """ protocol = repo_info[ExternalsDescription.PROTOCOL].lower() if protocol == 'git': diff --git a/manic/sourcetree.py b/manic/sourcetree.py index 4a907c1ff..eafd43e65 100644 --- a/manic/sourcetree.py +++ b/manic/sourcetree.py @@ -102,8 +102,8 @@ def status(self): """ Returns status of this component and all subcomponents (if available). - Returns a dict mapping our local path to an ExternalStatus dict (plus - additional entries for any subcomponents) + Returns a dict mapping our local path to an ExternalStatus dict. Any + subcomponents will have their own top-level key. Populates self._stat as a side effect. """ @@ -303,6 +303,9 @@ def __init__(self, root_dir, ext_description, svn_ignore_ancestry=False): def status(self, relative_path_base=LOCAL_PATH_INDICATOR): """Return a dictionary of local path->ExternalStatus. + Note that all traversed components, whether recursive or top-level, have + a top-level key in the returned dictionary. + FIXME(bja, 2017-10) what do we do about situations where the user checked out the optional components, but didn't add optional for running status? What do we do where the user @@ -328,7 +331,7 @@ def status(self, relative_path_base=LOCAL_PATH_INDICATOR): modified_path = os.path.join(relative_path_base, stat[name].path) stat_final[modified_path] = stat[name] - stat_final[modified_path].ppath = modified_path + stat_final[modified_path].path = modified_path summary.update(stat_final) return summary