← Back to team overview

duplicity-team team mailing list archive

[Merge] lp:~dawgfoto/duplicity/fixup1251 into lp:duplicity

 

Martin Nowak has proposed merging lp:~dawgfoto/duplicity/fixup1251 into lp:duplicity.

Requested reviews:
  duplicity-team (duplicity-team)

For more details, see:
https://code.launchpad.net/~dawgfoto/duplicity/fixup1251/+merge/336393

Avoid redundant replication of already present backup sets.

Fixed by adding back BackupSet.__eq__ which was accidentally(?) removed in 1251.
http://bazaar.launchpad.net/~duplicity-team/duplicity/0.8-series/revision/1251/duplicity/collections.py

Equality comparison is used here http://bazaar.launchpad.net/~duplicity-team/duplicity/0.8-series/view/head:/bin/duplicity?start_revid=1297#L1076.

Was already wondering why this stopped working.
-- 
Your team duplicity-team is requested to review the proposed merge of lp:~dawgfoto/duplicity/fixup1251 into lp:duplicity.
=== modified file 'duplicity/collections.py'
--- duplicity/collections.py	2017-12-21 21:10:02 +0000
+++ duplicity/collections.py	2018-01-20 02:18:01 +0000
@@ -300,6 +300,16 @@
         """
         return len(self.volume_name_dict.keys())
 
+    def __eq__(self, other):
+        """
+        Return whether this backup set is equal to other
+        """
+        return self.type == other.type and \
+            self.time == other.time and \
+            self.start_time == other.start_time and \
+            self.end_time == other.end_time and \
+            len(self) == len(other)
+
 
 class BackupChain:
     """


Follow ups