Fixing usage of whitelist in commit script
Description of bug
The commit script would cd
into the directories that we wanted to add to a commit and list the files locally, which given the new rules would not pass the whitelist rules, since they would not have the [0-9]{3}xxx/[0-9]{6}
prefix.
Changes introduced
- Commit script will not
cd
into the directories to be added to the commit, instead the contents in a given directory will be listed and passed to thecheckWhiteList
call with their full paths - Changed the behaviour of the commit script to not add whole directories like
Sherpa_i
but instead list their contents and add the files in those directories according to the whitelist rules. Practically onlyGENERATOR/*.py
files are allowed. - Removed all directories from the whitelist
Tests
Checked that
-
python files are recognised both in DSID directories and in DSID/Sherpa_i
etc -
dat
files are recognised successfully when they are directly in the DSID directory (DSID/sample.dat
) and they are blocked when residing inDSID/GENERATOR/sample.dat
(in the example below950xxx/950031/Sherpa_i/sample.dat
is skipped) -
GRID files added as links also seem to be recognised correctly
This should solve the problem experienced in !256 (merged)
Closes #78 (closed)
Edited by Spyros Argyropoulos