Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 8 additions & 5 deletions manic/sourcetree.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,11 +90,11 @@ def get_local_path(self):

def status(self):
"""
If the repo destination directory exists, ensure it is correct (from
correct URL, correct branch or tag), and possibly update the external.
If the repo destination directory does not exist, checkout the correce
branch or tag.
If load_all is True, also load all of the the externals sub-externals.
Returns status of all components (if available).

Also returns, if available:
* Is this external optional/required
* Is local repository clean/dirty
"""

self._stat.path = self.get_local_path()
Expand All @@ -112,6 +112,7 @@ def status(self):
ext_stats = {}

if not os.path.exists(self._repo_dir_path):
# No local repository.
self._stat.sync_state = ExternalStatus.EMPTY
msg = ('status check: repository directory for "{0}" does not '
'exist.'.format(self._name))
Expand All @@ -126,9 +127,11 @@ def status(self):
else:
self._stat.expected_version = self._repo.tag() + self._repo.branch()
else:
# Local repository state (e.g. clean/dirty)
if self._repo:
self._repo.status(self._stat, self._repo_dir_path)

# Status of the entire source tree.
if self._externals and self._externals_sourcetree:
# we expect externals and they exist
cwd = os.getcwd()
Expand Down