diff --git a/README.md b/README.md index ef0f43c17a9c7c14172b9b767265a9540cba50a5..2330c4a3be4521338a74e384bebbd7999ad1fc17 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,5 @@ -[![Build Status](https://travis-ci.org/ikus060/rdiffweb.svg?branch=master)](https://travis-ci.org/ikus060/rdiffweb) +[![Build Status](https://git.patrikdufresne.com/pdsl/rdiffweb/badges/master/pipeline.svg)](https://git.patrikdufresne.com/pdsl/rdiffweb/pipelinesb) + rdiffweb ======== diff --git a/rdiffweb/librdiff.py b/rdiffweb/librdiff.py index 7b7fb032b30f4fe70890155dcab95a02a5e395e2..0ff0567874cb6b02b1802c0d5a9b8c4618ab040b 100755 --- a/rdiffweb/librdiff.py +++ b/rdiffweb/librdiff.py @@ -400,7 +400,7 @@ class DirEntry(object): return self._change_dates # Compute the dates - self._change_dates = [] + change_dates = set() for increment in self._increments: # Skip "invisible" increments if not increment.has_suffix: @@ -412,18 +412,17 @@ class DirEntry(object): if not increment.is_snapshot and increment.is_missing: change_date = self._get_first_backup_after_date(change_date) - if change_date and change_date not in self._change_dates: - self._change_dates.append(change_date) + if change_date: + change_dates.add(change_date) # If the directory exists, add the last known backup date. - if (self.exists and - self._repo.last_backup_date and - self._repo.last_backup_date not in self._change_dates): - self._change_dates.append(self._repo.last_backup_date) + if self.exists and self._repo.last_backup_date: + change_dates.add(self._repo.last_backup_date) # No need to sort the change date since increments are already sorted. # Return the list of dates. + self._change_dates = sorted(change_dates) return self._change_dates @property