Skip to content

Commit

Permalink
Merge pull request #344 from JrGoodle/refactor
Browse files Browse the repository at this point in the history
Fix bug in parallel output
  • Loading branch information
JrGoodle committed Oct 24, 2017
2 parents b6c7e61 + a17e415 commit 9707ea2
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions clowder/clowder/model/project.py
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,8 @@ def herd(self, branch=None, tag=None, depth=None, rebase=False, parallel=False):
self._print_output = not parallel

herd_depth = depth if depth is not None else self._depth
repo = self._repo(self.full_path(), self._remote, self._ref, self._recursive, parallel=parallel)
repo = self._repo(self.full_path(), self._remote, self._ref, self._recursive,
parallel=parallel, print_output=self._print_output)

if branch:
self._herd_branch(repo, branch, herd_depth, rebase)
Expand Down Expand Up @@ -236,7 +237,8 @@ def reset(self, timestamp=None, parallel=False):

self._print_output = not parallel

repo = self._repo(self.full_path(), self._remote, self._ref, self._recursive, parallel=parallel)
repo = self._repo(self.full_path(), self._remote, self._ref, self._recursive,
parallel=parallel, print_output=self._print_output)
self._reset(repo, timestamp=timestamp)

def run(self, command, ignore_errors, parallel=False):
Expand Down Expand Up @@ -306,7 +308,8 @@ def sync(self, rebase=False, parallel=False):

self._print_output = not parallel

repo = self._repo(self.full_path(), self._remote, self._ref, self._recursive, parallel=parallel)
repo = self._repo(self.full_path(), self._remote, self._ref, self._recursive,
parallel=parallel, print_output=self._print_output)
self._sync(repo, rebase)

@staticmethod
Expand All @@ -321,7 +324,6 @@ def _herd_branch(self, repo, branch, depth, rebase):
"""Clone project or update latest from upstream"""

if self.fork is None:
self._print(self.status())
repo.herd_branch(self._url, branch, depth=depth, rebase=rebase)
return

Expand All @@ -338,7 +340,6 @@ def _herd_ref(self, repo, depth, rebase):
"""Clone project or update latest from upstream"""

if self.fork is None:
self._print(self.status())
repo.herd(self._url, depth=depth, rebase=rebase)
return

Expand All @@ -355,7 +356,6 @@ def _herd_tag(self, repo, tag, depth, rebase):
"""Clone project or update latest from upstream"""

if self.fork is None:
self._print(self.status())
repo.herd_tag(self._url, tag, depth=depth, rebase=rebase)
return

Expand Down Expand Up @@ -401,7 +401,6 @@ def _reset(self, repo, timestamp=None):
"""Clone project or update latest from upstream"""

if self.fork is None:
self._print(self.status())
if timestamp:
repo.reset_timestamp(timestamp, self._timestamp_author, self._ref)
return
Expand Down

0 comments on commit 9707ea2

Please sign in to comment.