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

create -d DSPATH -c procedure SUBDSPATH leaves DSPATH dirty #3591

Closed
yarikoptic opened this issue Aug 8, 2019 · 2 comments
Closed

create -d DSPATH -c procedure SUBDSPATH leaves DSPATH dirty #3591

yarikoptic opened this issue Aug 8, 2019 · 2 comments

Comments

@yarikoptic
Copy link
Member

@yarikoptic yarikoptic commented Aug 8, 2019

I guess either save for adding a new subdataset comes too early (before calling the cfg_ procedure) or we need a second save to store adjusted (by the procedure) state.

$> datalad create /tmp/testds && datalad create -d /tmp/testds -c text2git subds  && datalad -C /tmp/testds status
[INFO   ] Creating a new annex repo at /tmp/testds 
create(ok): /tmp/testds (dataset)                                                                               
[INFO   ] Creating a new annex repo at /tmp/testds/subds 
create(ok): subds (dataset)                                                                                     
[INFO   ] Running procedure cfg_text2git 
[INFO   ] == Command start (output follows) ===== 
[INFO   ] == Command exit (modification check follows) ===== 
action summary:
  add (ok: 2)
  create (ok: 1)
  save (ok: 1)
 modified: subds (dataset)

DataLad 0.12.0rc4-327-g6307824f2
NB Ran into while testing a use case workflow using reproman run.

@yarikoptic
Copy link
Member Author

@yarikoptic yarikoptic commented Aug 8, 2019

or may be it is just due to the "feature" of not saving updated state of the subds if there is no explicit --dataset?

$> datalad save -m "Due to https://github.com/datalad/datalad/issues/3591" data/mriqc

$> git status                                                                        
On branch master
Changes not staged for commit:
  (use "git add <file>..." to update what will be committed)
  (use "git checkout -- <file>..." to discard changes in working directory)

	modified:   data/mriqc (new commits)

no changes added to commit (use "git add" and/or "git commit -a")

$> datalad save -m "Due to https://github.com/datalad/datalad/issues/3591" -d . data/mriqc
add(ok): data/mriqc (file)
save(ok): . (dataset)
action summary:
  add (ok: 1)
  save (ok: 1)

Loading

@kyleam
Copy link
Contributor

@kyleam kyleam commented Aug 8, 2019

I think it might just be a matter of order. I'll take a closer look.

Loading

@kyleam kyleam self-assigned this Aug 8, 2019
kyleam added a commit to kyleam/datalad that referenced this issue Aug 8, 2019
When a dataset is explicitly specified together with a --cfg-proc
procedure, the created subdataset shows up as modified in the
reference dataset because cfg_* procedures create a commit with their
changes.  Save the reference dataset after running procedures so that
we register the up-to-date version of the subdataset.

Fixes datalad#3591.
@kyleam kyleam removed their assignment Aug 8, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

2 participants