In the attached file you can find the patch that allows to choose a single trx option.
To be able to do it, the header of the file must have a /KT. T indicating that it will be a single trx file. When a record fails it stops there and rollback all the previous records.
In the CSV Importer the process commits once for every row in the file.
It can be useful to have a way to choose an option to allow a single trx for the whole file. If one line fails all the records are rollback.