fixing multiple errors in deltatar at once:
authorEduardo Robles Elvira <edulix@wadobo.com>
Sat, 14 Sep 2013 06:42:49 +0000 (08:42 +0200)
committerEduardo Robles Elvira <edulix@wadobo.com>
Sat, 14 Sep 2013 06:42:49 +0000 (08:42 +0200)
commitdf86af81861cab98435063a1dfea4cf10573c5ac
tree19df874d235e598a0a029261cdace438da31ef0d
parent8825be52718fadfa6b01c14a1863ea829d43f887
fixing multiple errors in deltatar at once:

* naming of the generated backups was incorrect because they were
always named as if they were full backups, even if it was a diff
one. This has been changed both at backup creation and at backup
finding.

Related to that is the backup volume "finder": it was trying to
find volumes with current date which is not what we want, so now
it guesses the date of the volume based on a prefix and a suffix
inside the backup directory.

* changing the ordering of the files in _recursive_walk_dir to
follow an ascending naming sorted Breadth First Search algorithm.
This has been fixed without having to retrieve the full list and
then apply a sort to be efficient, which was something Daniel
applied as a fix and got reverted for memory efficiency.

* fixing index iterator also removing the need to have the full
index in memory and allowing it to be used with the "with"
python statement.

* fixing collate_iterators sorting because when the second index
element was less than the first one, we were not taking into
account that in a BFS algorithm files nearer to the root in depth
go first regardless of the sorting.

* some optimizations and fixes related to the deletion of files
in restore_backup for diff backups have been done
deltatar/deltatar.py
runtests.py
testing/test_deltatar.py