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

add doesn't error out if asked to add some bogus path #1880

Closed
yarikoptic opened this issue Oct 6, 2017 · 4 comments · Fixed by #1881
Closed

add doesn't error out if asked to add some bogus path #1880

yarikoptic opened this issue Oct 6, 2017 · 4 comments · Fixed by #1881
Labels
fix-implemented A fix is available, but has not been merged or released, yet.

Comments

@yarikoptic
Copy link
Member

What is the problem?

$> datalad create buga; datalad add -d buga buga/nonexisting
[INFO   ] Creating a new annex repo at /tmp/buga 
create(ok): /tmp/buga (dataset)                                                                                 
add(notneeded): /tmp/buga (dataset)
2 13993.....................................:Fri 06 Oct 2017 07:48:29 AM EDT:.
hopa:/tmp
$> echo $?
0

Is there anything else that would be useful to know in this context?

I just woke up

@bpoldrack
Copy link
Member

Looks like add doesn't respect the guideline to report on raw_input and treats it as if it was a discovered one.

bpoldrack added a commit to bpoldrack/datalad that referenced this issue Oct 6, 2017
bpoldrack added a commit to bpoldrack/datalad that referenced this issue Oct 6, 2017
@bpoldrack
Copy link
Member

Fixed.

$> datalad create buga; datalad add -d buga buga/nonexisting            
[INFO   ] Creating a new annex repo at /tmp/buga 
create(ok): /tmp/buga (dataset)                                                                     
[WARNING] path does not exist: /tmp/buga/buga/nonexisting [add(/tmp/buga/buga/nonexisting)] 
add(impossible): buga/nonexisting [path does not exist: /tmp/buga/buga/nonexisting]
$> echo $?
1

Yes, there's a logging issue, but that's another story ;-)

@bpoldrack bpoldrack added the fix-implemented A fix is available, but has not been merged or released, yet. label Oct 6, 2017
@bpoldrack
Copy link
Member

Oh, and: You specified a wrong path anyway in case you didn't notice. Using -d a relative path will be interpreted as relative to that dataset!

@yarikoptic
Copy link
Member Author

Right... In real use case paths were full paths

bpoldrack added a commit to bpoldrack/datalad that referenced this issue Oct 7, 2017
bpoldrack added a commit to bpoldrack/datalad that referenced this issue Oct 11, 2017
yarikoptic added a commit to yarikoptic/datalad that referenced this issue Oct 13, 2017
* origin/master: (127 commits)
  BF: If 'modified' was set, AnnotatePaths failed to report on unavailable paths. (Closes datalad#1880)
  RF: Remove log-level, pbs-runner and --version from subcommand man page. These are global options
  ENH: use disable_logger instead of swallow_logs in crawler.dbs.files
  Remove imports and leave a note.
  TST: Mark V6 failures
  BF: Fix docstrings
  RF: Switch Runner's log levels from ERROR and DEBUG to 11 and 9 respectively (Closes datalad#1753)
  ENH: Provide context manager disable_logger and use it to make sure logging is not polluting stdout when talking to datalad's special remote
  PY3 compat
  ENH: in wtf - provide information about externals versions
  ENH: Improve wtf plugin with essential bits stolen from PyMVPA
  Github renders the 2nd-level heading wayyy to big
  TST: Fails only sometimes in PY3
  RF: Move error detection from 'siblings' to 'GitRepo.remove_remote()'
  Adding TODOs
  RF: Move call of git-describe to a dedicated method of GitRepo
  RF: Remove swallow_logs from everything but the crawler
  DOC: Remove outdated docstring RF: Remove swallow_log from GitRepo RF: lower log level for instantiation of GitPython's Repo
  RF: Remove swallow_logs from AnnexRepo RF: lower log level to trigger --debug option for git-annex
  RF: Remove swallow_logs() from Dataset.repo and lower log level for detection logging
  ...
yarikoptic added a commit to yarikoptic/datalad that referenced this issue Oct 13, 2017
* origin/master: (148 commits)
  BF: If 'modified' was set, AnnotatePaths failed to report on unavailable paths. (Closes datalad#1880)
  RF: Remove log-level, pbs-runner and --version from subcommand man page. These are global options
  ENH: use disable_logger instead of swallow_logs in crawler.dbs.files
  Remove imports and leave a note.
  TST: Mark V6 failures
  BF: Fix docstrings
  RF: Switch Runner's log levels from ERROR and DEBUG to 11 and 9 respectively (Closes datalad#1753)
  ENH: Provide context manager disable_logger and use it to make sure logging is not polluting stdout when talking to datalad's special remote
  PY3 compat
  ENH: in wtf - provide information about externals versions
  ENH: Improve wtf plugin with essential bits stolen from PyMVPA
  Github renders the 2nd-level heading wayyy to big
  TST: Fails only sometimes in PY3
  RF: Move error detection from 'siblings' to 'GitRepo.remove_remote()'
  Adding TODOs
  RF: Move call of git-describe to a dedicated method of GitRepo
  RF: Remove swallow_logs from everything but the crawler
  DOC: Remove outdated docstring RF: Remove swallow_log from GitRepo RF: lower log level for instantiation of GitPython's Repo
  RF: Remove swallow_logs from AnnexRepo RF: lower log level to trigger --debug option for git-annex
  RF: Remove swallow_logs() from Dataset.repo and lower log level for detection logging
  ...
yarikoptic added a commit to yarikoptic/datalad that referenced this issue Oct 13, 2017
* origin/master: (2345 commits)
  BF: If 'modified' was set, AnnotatePaths failed to report on unavailable paths. (Closes datalad#1880)
  RF: Remove log-level, pbs-runner and --version from subcommand man page. These are global options
  ENH: use disable_logger instead of swallow_logs in crawler.dbs.files
  Remove imports and leave a note.
  TST: Mark V6 failures
  BF: Fix docstrings
  RF: Switch Runner's log levels from ERROR and DEBUG to 11 and 9 respectively (Closes datalad#1753)
  ENH: Provide context manager disable_logger and use it to make sure logging is not polluting stdout when talking to datalad's special remote
  PY3 compat
  ENH: in wtf - provide information about externals versions
  ENH: Improve wtf plugin with essential bits stolen from PyMVPA
  Github renders the 2nd-level heading wayyy to big
  TST: Fails only sometimes in PY3
  RF: Move error detection from 'siblings' to 'GitRepo.remove_remote()'
  Adding TODOs
  RF: Move call of git-describe to a dedicated method of GitRepo
  RF: Remove swallow_logs from everything but the crawler
  DOC: Remove outdated docstring RF: Remove swallow_log from GitRepo RF: lower log level for instantiation of GitPython's Repo
  RF: Remove swallow_logs from AnnexRepo RF: lower log level to trigger --debug option for git-annex
  RF: Remove swallow_logs() from Dataset.repo and lower log level for detection logging
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
fix-implemented A fix is available, but has not been merged or released, yet.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants