-
Notifications
You must be signed in to change notification settings - Fork 1.3k
diff/metics diff: update argument descriptions, et al. #3244
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
Changes from all commits
bfa1d3e
2430cb5
b10057a
b3ff72c
d0139a7
1672cdf
aa849ab
4403d66
039f196
5019fe1
611c1d6
6984546
e70d5fd
c27f6ef
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -120,9 +120,8 @@ def run(self): | |
|
|
||
| def add_parser(subparsers, parent_parser): | ||
| DIFF_DESCRIPTION = ( | ||
| "Compare two different versions of your DVC project (tracked by Git)" | ||
| " and shows a list of paths grouped in the following categories:" | ||
| " added, modified, or deleted." | ||
| "Compare two versions of the DVC repository.\n" | ||
| "Shows the list of paths added, modified, or deleted" | ||
| ) | ||
| diff_parser = subparsers.add_parser( | ||
| "diff", | ||
|
|
@@ -134,17 +133,17 @@ def add_parser(subparsers, parent_parser): | |
| diff_parser.add_argument( | ||
| "a_ref", | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We need to rename |
||
| help=( | ||
| "Git reference to the old version that you want to compare" | ||
| " (defaults to HEAD)" | ||
| "Git reference to the older version to compare " | ||
| "(defaults to HEAD)" | ||
| ), | ||
| nargs="?", | ||
| default="HEAD", | ||
| ) | ||
| diff_parser.add_argument( | ||
| "b_ref", | ||
| help=( | ||
| "Git reference to the new version that you want to compare." | ||
| " (defaults to the working tree)" | ||
| "Git reference to the newer version to compare " | ||
| "(defaults to the current workspace)" | ||
| ), | ||
| nargs="?", | ||
| ) | ||
|
|
@@ -156,7 +155,7 @@ def add_parser(subparsers, parent_parser): | |
| ) | ||
| diff_parser.add_argument( | ||
| "--checksums", | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Will need to rename
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. For the record, this question has been extracted to #3311 |
||
| help="Display checksums for each entry", | ||
| help="Display hash value for each entry", | ||
| action="store_true", | ||
| default=False, | ||
| ) | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -11,7 +11,7 @@ | |
|
|
||
|
|
||
| def _generate_version(base_version): | ||
| """Generate a version with information about the git repository""" | ||
| """Generate a version with information about the Git repository.""" | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. To be honest, not a big fan of such changes in the code. It only pollutes the history and doesn't provide any value.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'm used to making copy edits on docs all the time so this is kind of automatic for me but whatever policies you tell me for the core repo I'll abide to the best of my ability. Personally I don't understand the problem of history pollution but I guess it complicates your release management? Anyway, I'll follow your lead on these things of course. |
||
| pkg_dir = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) | ||
|
|
||
| if not _is_git_repo(pkg_dir) or not _have_git(): | ||
|
|
@@ -28,7 +28,7 @@ def _generate_version(base_version): | |
|
|
||
|
|
||
| def _is_git_repo(dir_path): | ||
| """Is the given directory version-controlled with git?""" | ||
| """Is the given directory version-controlled with Git?""" | ||
| return os.path.exists(os.path.join(dir_path, ".git")) | ||
|
|
||
|
|
||
|
|
@@ -57,7 +57,7 @@ def _is_release(dir_path, base_version): | |
|
|
||
|
|
||
| def _git_revision(dir_path): | ||
| """Get the SHA-1 of the HEAD of a git repository.""" | ||
| """Get SHA of the HEAD of a Git repository.""" | ||
| return subprocess.check_output( | ||
| ["git", "rev-parse", "HEAD"], cwd=dir_path | ||
| ).strip() | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.