Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updates to 1. zsh autocomplete script and 2. slow link type warning message #2003

Merged
merged 13 commits into from
May 24, 2019
Merged
Show file tree
Hide file tree
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
11 changes: 5 additions & 6 deletions dvc/remote/local/slow_link_detection.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,12 @@ def __call__(self, *args, **kwargs):
and self.should_display()
):
msg = (
"You can cut execution time considerably. Check:\n"
"You can cut execution time considerably by using a different"
" `cache.type` configuration.\nSee "
"{blue}https://dvc.org/doc/commands-reference/config#cache{"
"reset}"
"\nfor "
"more information.\nTo disable this message, run:\n'dvc "
"config "
"cache.slow_link_warning False'".format(
"reset} for more information.\n"
"To disable this message, run:\n"
"'dvc config cache.slow_link_warning false'".format(
jorgeorpinel marked this conversation as resolved.
Show resolved Hide resolved
blue=colorama.Fore.BLUE, reset=colorama.Fore.RESET
)
)
Expand Down
16 changes: 8 additions & 8 deletions dvc/scm/git/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -260,15 +260,14 @@ def get_tree(self, rev):

def _get_diff_trees(self, a_ref, b_ref):
"""Private method for getting the trees and commit hashes of 2 git
references.
Requires `gitdb` module (from gitpython package).
references. Requires `gitdb` module (from gitpython package).

Args:
a_ref(str) - git reference
b_ref(str) - second git reference. If None, uses HEAD
a_ref (str): git reference
b_ref (str): second git reference. If None, uses HEAD

Returns:
tuple - tuple with elements: (trees, commits)
tuple: tuple with elements: (trees, commits)
"""
from gitdb.exc import BadObject, BadName

Expand All @@ -294,11 +293,12 @@ def get_diff_trees(self, a_ref, b_ref=None):
Returns the dvc hash names of changed file/directory

Args:
a_ref(str) - git reference
b_ref(str) - optional second git reference, default None
a_ref (str): git reference
b_ref (str): optional second git reference, default None

Returns:
dict - dictionary with keys: (a_tree, b_tree, a_ref, b_ref, equal)
dict: dictionary with keys: (a_tree, b_tree, a_ref, b_ref,
equal)
"""
diff_dct = {DIFF_EQUAL: False}
trees, commits = self._get_diff_trees(a_ref, b_ref)
Expand Down
Loading