Skip to content
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
5 changes: 4 additions & 1 deletion dvc/command/remote.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
from dvc.command.base import fix_subparsers
from dvc.command.config import CmdConfig
from dvc.remote.config import RemoteConfig
from dvc.utils import format_link

logger = logging.getLogger(__name__)

Expand Down Expand Up @@ -99,7 +100,9 @@ def add_parser(subparsers, parent_parser):
remote_add_parser.add_argument("name", help="Name of the remote")
remote_add_parser.add_argument(
"url",
help="URL. See full list of supported urls at " "man.dvc.org/remote",
help="URL. See full list of supported urls at {}".format(
format_link("https://man.dvc.org/remote")
),
)
remote_add_parser.add_argument(
"-d",
Expand Down
6 changes: 4 additions & 2 deletions dvc/dagascii.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
from grandalf.routing import route_with_lines

from dvc.env import DVC_PAGER

from dvc.utils import format_link

logger = logging.getLogger(__name__)

Expand Down Expand Up @@ -45,7 +45,9 @@ def find_pager():

logger.warning(
"Unable to find `less` in the PATH. Check out "
"man.dvc.org/doc/command-reference/pipeline/show for more info."
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

man.dvc.org unrolls to https://dvc.org/doc/command-reference/ so we would get 404 here

"{} for more info.".format(
format_link("https://man.dvc.org/pipeline/show")
)
)
return pydoc.plainpager

Expand Down
9 changes: 5 additions & 4 deletions dvc/exceptions.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
"""Exceptions raised by the dvc."""

from dvc.utils import relpath
from dvc.utils import relpath, format_link


class DvcException(Exception):
Expand Down Expand Up @@ -244,9 +244,10 @@ def __init__(self, ignore_dirname):
class GitHookAlreadyExistsError(DvcException):
def __init__(self, hook_name):
super().__init__(
"Hook '{}' already exists. Please refer to "
"https://man.dvc.org/install "
"for more info.".format(hook_name)
"Hook '{}' already exists. Please refer to {} for more "
"info.".format(
hook_name, format_link("https://man.dvc.org/install")
)
)


Expand Down
4 changes: 2 additions & 2 deletions dvc/remote/gdrive.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
from dvc.remote.base import RemoteBASE
from dvc.config import Config
from dvc.exceptions import DvcException
from dvc.utils import tmp_fname
from dvc.utils import tmp_fname, format_link

logger = logging.getLogger(__name__)
FOLDER_MIME_TYPE = "application/vnd.google-apps.folder"
Expand Down Expand Up @@ -93,7 +93,7 @@ def init_drive(self):
raise DvcException(
"Please specify Google Drive's client id and "
"secret in DVC's config. Learn more at "
"https://man.dvc.org/remote/add."
"{}.".format(format_link("https://man.dvc.org/remote/add"))
)
self.gdrive_user_credentials_path = (
tmp_fname(os.path.join(self.repo.tmp_dir, ""))
Expand Down