Saugat Pachhai
63dba45c14
ui: write gets a styled param for rich console printing ( #6037 )
2021-05-28 09:30:56 +05:45
Saugat Pachhai
b9000ed926
pre-commit: update black to 21.5b1 ( #6032 )
...
* pre-commit: update black to 21.5b1
also updated others, but black is more noticeable
* remove magic trailing comma
2021-05-18 15:51:15 +00:00
Saugat Pachhai
789faa4f11
ui: migrate checkout to ui.write ( #6028 )
2021-05-18 13:55:11 +02:00
Saugat Pachhai
a9ccf70439
cmd: imports lazy ( #5226 )
...
They are not a major pain point though
2021-01-07 11:45:58 +05:45
Dmitry Petrov and Ruslan Kuprieiev
59409be7ab
pull: target message ( #4192 )
...
* pull: target message
* update fetch/status/etc help
Co-authored-by: Ruslan Kuprieiev <[email protected] >
2020-07-13 02:52:02 +03:00
Casper da Costa-Luis
5d2ac9fca2
completion: update dependency ( #4148 )
...
* completion: use new simpler `shtab` API
* completion: use FILE|DIR
2020-07-02 00:15:39 +03:00
Casper da Costa-Luis
061513a2ae
completion: misc fixes ( #4076 )
...
* command: add metavars
- makes help output look the same as before #3921
* deps: update shtab version
Part of #4070
2020-06-22 02:09:43 +03:00
Casper da Costa-Luis
fa0f182028
completion: autogenerate ( #3921 )
...
* cli: split main_parser
* cli: basic parser tree printing
* cli: major completion tidy
* completion: more missing root commands
* completion: much automagic such beauty
- fixes #2985 automatically generate bash completion
* tests: bash completion
* tests: completion: tidy script a little
* minor tidy
* command: positional name consistency
* completion: bash: add logging
* double-check renames and consistency
* cli: add completion subcommand
* ci: completion: update test
* minor logging
* more completion logging verbosity
* fix completion of files
* add shtab
* purge unneeded completion => shtab
* completion: neaten UI
* completion: use `shtab>=0.0.2`
* completion: purge hardcoded completions!
* revert unneeded renames for now
* fix isort
* completion: tidy CLI API
* fix snap build
* fix snap build again
* snap: internally build completion
* allow repo-less completion
* command: tidy headless logic
* use CmdBaseNoRepo
* better DVC-file completion
* merge command.choices -> command.completion
* drop choices class
* remove completion optionals
* tidy docs
2020-06-19 04:54:20 +03:00
Casper da Costa-Luis
2bb7257a06
lint: isort pre-commit & misc improvements ( #3749 )
...
* test: clean flake8 config root clutter
* test: pre-commit: add isort
Compatible with black (see https://github.com/timothycrosley/isort/issues/694 )
* lint: reorder imports
* lint: more complex imports
* lint: fix deepsource
* config: isort: add first party dvc
* tests: restyled: add isort
* temp commit to revert before merge
* Revert "temp commit to revert before merge"
This reverts commit 11db0fd8e95fe891597cbb9bf804480909b19e24.
2020-05-06 23:56:07 +03:00
Saugat Pachhai
d00bd4dfe5
pull/fetch/push: add stats ( #3735 )
...
* pull/fetch/push: add stats
* fix typo: s/logging/logger
* pull: make stats detailed, with summary at the bottom
* tests: mock properly, set return_value
* add a line space
2020-05-05 16:10:50 +03:00
Saugat Pachhai
1455e9551e
pull/checkout: fix empty output if no state gets changed ( #3520 )
2020-03-24 13:48:06 +02:00
Saugat Pachhai and Jorge Orpinel
066ccea733
checkout: show summary by default and introduce --show-changes flag ( #3401 )
...
* checkout: implement --show-changes flag to show detailed checkout details
Show summary by default on checkout
checkout: show directory modified even when files are removed from inside it
checkout: refactor template logic
checkout: change output format
checkout: do not show summary if nothing's changed
checkout: do not show summary if show_changes is specified
checkout: show '/' at the end if it's a directory
rename variable name
test: cover stats for checkout
checkout: show relink as not modified
checkout: remove unwanted message during empty checkout
pull: show summary on checkout
import/get: change external_repo to catch CheckoutError
fix tests and check if path is url
checkout: support external deps/outputs
tests: checkout on external outputs
* fix tests
* checkout: make show changes default and introduce summary flag to show summary
* address suggestions
* exceptions: remove extra spacing on erorr
* Update dvc/command/checkout.py
Co-Authored-By: Jorge Orpinel <[email protected] >
Co-authored-by: Jorge Orpinel <[email protected] >
2020-03-16 16:29:36 +02:00
Mr. Outis
94a0914bba
py3: get rid of future imports
2019-12-30 19:35:48 -06:00
Alexander Schepanovski
6c0cda8c7b
ui: reorder checkout options to go from common to rare
...
This is the order we use in docs. It also makes sense.
2019-12-17 18:40:26 +07:00
Alexander Schepanovski
5d1f01d58f
checkout: iron out --relink related messages
2019-12-13 19:00:06 +07:00
Alexander Schepanovski
2f79e362f4
dvc: add checkout --relink
2019-12-09 13:25:32 +03:00
Ruslan Kuprieiev
95fe1578bb
dvc: automatically reorder imports
2019-11-05 02:34:40 +02:00
Ruslan Kuprieiev
59e62a7227
checkout: accept multiple targets ( #2640 )
...
Make `Repo.checkout` accept a list of targets, instead of having to feed
it targets one-by-one. This allows us to properly handle checkout
errors.
Fixes #2580
2019-10-21 17:06:21 +03:00
Jorge Orpinel
a2f3d7fcfa
command: add missing space in optional targets ard usage output
2019-06-27 13:39:05 -05:00
Jorge Orpinel
936f941bf0
help: update usage for commands that use the targets argument
2019-06-26 23:25:58 -05:00
vibhor98
62ee6b6b9a
Made review changes.
2019-06-19 20:55:46 +05:30
Jorge Orpinel
3dffe8e5c0
dvc: i/DVC file[s]?/ -> /DVC-file($1)/
...
Standardizes way to refer to DVC-file(s)
(Related to #2102 )
2019-06-07 03:33:20 -05:00
Ivan Shcheklein
4a9188c0b5
Move man doc links to descriptions, fix some help copies ( #1805 )
...
* move man doc links to descriptions, fix some help copies
* minor init force message fix
* deal with ugly inheritance in lock base
* remove unnecessary super calls
* add return back to python lock/unlock run functions
2019-03-29 03:56:41 +02:00
pared
ace92cb422
repo: fix stages gathering for checkout
2019-03-28 12:13:39 +01:00
Lee Yi Jie Joel
2ba657c77a
Add links to documentation for all commands ( #1767 )
2019-03-22 20:32:06 +02:00
Ruslan Kuprieiev
ba8d83e9b1
dvc: refactor dvc project class
...
1) split Project's methods into separate files;
2) rename Project into Repo(similar to gitpython's Repo)
Signed-off-by: Ruslan Kuprieiev <[email protected] >
2019-02-13 03:31:23 +02:00
Ruslan Kuprieiev
4896f08ddf
dvc: comply with both flake8 and black
...
flake8 provides some additional features like unused vars check, etc, so
it makes total sense to use it as well.
Signed-off-by: Ruslan Kuprieiev <[email protected] >
2019-02-04 00:10:36 +02:00
Ruslan Kuprieiev
4069e34130
dvc: use black instead of flake8
...
Fixes #1546
Signed-off-by: Ruslan Kuprieiev <[email protected] >
2019-01-30 03:48:36 +02:00
Mr. Outis
0d46921ec7
py2: add unicode literals
...
Fix #1512
2019-01-27 20:40:21 -06:00
Ruslan Kuprieiev
6fec8b16cd
RFC: conform to pylint
...
Signed-off-by: Ruslan Kuprieiev <[email protected] >
2019-01-16 14:12:19 +02:00
Mr. Outis
d406361bd3
checkout: Prompt when deleting files from working dir
...
Close #1328
2018-11-17 19:36:47 -06:00
Ruslan Kuprieiev
7720c35544
checkout: add --with-deps support
...
Fixes #1296
Signed-off-by: Ruslan Kuprieiev <[email protected] >
2018-11-06 14:19:38 +02:00
Ruslan Kuprieiev
0e9774a3f8
RFC: follow flake8 rules
...
Signed-off-by: Ruslan Kuprieiev <[email protected] >
2018-07-25 17:28:58 +03:00
Ruslan Kuprieiev
2cab8e03be
command: remove unused code
...
Signed-off-by: Ruslan Kuprieiev <[email protected] >
2018-07-19 07:00:39 +03:00
Ruslan Kuprieiev
52c08b2926
dvc: checkout single file
...
Fixes #666
Signed-off-by: Ruslan Kuprieiev <[email protected] >
2018-04-24 13:45:30 +03:00
Ruslan Kuprieiev
200d1dec29
dvc: move remove_untracked_hardlinks to inside the project
...
Signed-off-by: Ruslan Kuprieiev <[email protected] >
2018-03-10 19:15:06 +02:00
Ruslan Kuprieiev
dce1935651
checkout: optimize lost hardlink search
...
Speeds up checkout for 30K files from 6sec to 3.5sec
Signed-off-by: Ruslan Kuprieiev <[email protected] >
2018-03-10 13:10:15 +02:00
Ruslan Kuprieiev
c1d35df630
checkout: don't forget to set perms back
...
Fixes #505
Signed-off-by: Ruslan Kuprieiev <[email protected] >
2018-03-04 15:50:17 +02:00
Ruslan Kuprieiev
2cf3838560
checkout: don't forget to chmod before removing
...
Signed-off-by: Ruslan Kuprieiev <[email protected] >
2018-01-15 15:58:52 +02:00
Ruslan Kuprieiev
b73af1f636
checkout: check if dirname actually returned directory
...
Signed-off-by: Ruslan Kuprieiev <[email protected] >
2018-01-14 22:20:06 +02:00
Dmitry
d2790f9306
Refactoring: move find_cache() to Cache class
2018-01-06 04:15:23 -08:00
Dmitry
4a1363de76
Refactoring: use lambda in untracked_hardlinks_files()
2017-12-24 22:22:15 -08:00
Dmitry
d29c94f001
dvc checkout: remove untracked files
2017-12-24 22:08:44 -08:00
Ruslan Kuprieiev
a779424a36
WIP RFC
...
Signed-off-by: Ruslan Kuprieiev <[email protected] >
2017-12-23 09:37:40 +02:00
Dmitry
1d3e5a2dcc
dvc checkout: remove files from previous branch
2017-12-16 01:16:18 -08:00
Ruslan Kuprieiev
927d58cfad
dvc: introduce stage files instead of state files
...
These describe single stage of pipeline and are allowed to
be placed anywhere in current or parent directories(up to
project's root) of the data file.
By default, 'dvc run' writes stage file to ./stage.dvc, but
it can be changed by using '-f' option(see functest/test-repro.py).
For now we're traversing project tree to find needed stage files for
specific data files. This is very wasteful and not optimal, but will
do for now, as this patch is aimed at stabilizing design of our repo
files.
Signed-off-by: Ruslan Kuprieiev <[email protected] >
2017-12-07 22:52:18 +02:00
Dmitry
6a3fad1a4b
Checkout: no warnings when file doesn't exist
2017-11-28 21:56:51 -08:00
Ruslan Kuprieiev
c5648a33ec
merge: don't forget to checkout cache_state file
...
Signed-off-by: Ruslan Kuprieiev <[email protected] >
2017-11-26 13:38:23 +02:00
Dmitry
db625e8213
Use DvcLock from CmdBase class only
2017-11-19 04:14:12 -08:00
Dmitry
1349589ec7
Move CmdBase class to common dir
2017-11-19 03:12:37 -08:00