10
10
11
11
lgr = logging .getLogger (__name__ )
12
12
13
- MIN_VERSION = '0.12.4'
13
+ from .. info import MIN_DATALAD_VERSION as MIN_VERSION
14
14
15
15
16
16
def prepare_datalad (studydir , outdir , sid , session , seqinfo , dicoms , bids ):
@@ -105,8 +105,7 @@ def add_to_datalad(topdir, studydir, msg, bids):
105
105
# Previously we did not have it as a submodule, and since no
106
106
# automagic migration is implemented, we just need to check first
107
107
# if any path under .heudiconv is already under git control
108
- if any (x [0 ].startswith ('.heudiconv/' ) for x in
109
- ds .repo .repo .index .entries .keys ()):
108
+ if any (x .startswith ('.heudiconv/' ) for x in ds .repo .get_files ()):
110
109
lgr .warning ("%s has .heudiconv not as a submodule from previous"
111
110
" versions of heudiconv. No automagic migration is "
112
111
"yet provided" , ds )
@@ -119,11 +118,11 @@ def add_to_datalad(topdir, studydir, msg, bids):
119
118
# we place all files under annex and then add
120
119
if create_file_if_missing (op .join (dsh_path , '.gitattributes' ),
121
120
"""* annex.largefiles=anything""" ):
122
- ds .add ('.heudiconv/.gitattributes' ,
121
+ ds .save ('.heudiconv/.gitattributes' ,
123
122
to_git = True ,
124
123
message = "Added gitattributes to place all .heudiconv content"
125
124
" under annex" )
126
- ds .add ('.' , recursive = True , save = False ,
125
+ ds .save ('.' , recursive = True
127
126
# not in effect! ?
128
127
#annex_add_opts=['--include-dotfiles']
129
128
)
0 commit comments