Skip to content

Commit

Permalink
Comment tweaks, and fix 'ppath' typo
Browse files Browse the repository at this point in the history
  • Loading branch information
johnpaulalex committed Dec 30, 2022
1 parent 696527c commit add0745
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
2 changes: 1 addition & 1 deletion manic/repository_factory.py
Original file line number Diff line number Diff line change
Expand Up @@ -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':
Expand Down
9 changes: 6 additions & 3 deletions manic/sourcetree.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.
"""
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand Down

0 comments on commit add0745

Please sign in to comment.