Merge lp:~dawgfoto/duplicity/fixup1251 into lp:~duplicity-team/duplicity/0.8-series

Proposed by Martin Nowak
Status: Merged
Merged at revision: 1298
Proposed branch: lp:~dawgfoto/duplicity/fixup1251
Merge into: lp:~duplicity-team/duplicity/0.8-series
Diff against target: 20 lines (+10/-0)
1 file modified
duplicity/collections.py (+10/-0)
To merge this branch: bzr merge lp:~dawgfoto/duplicity/fixup1251
Reviewer Review Type Date Requested Status
duplicity-team Pending
Review via email: mp+336393@code.launchpad.net

Description of the change

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.

To post a comment you must log in.
Revision history for this message
Kenneth Loafman (kenneth-loafman) wrote :

Thanks for the catch! Not sure how it got deleted.

Revision history for this message
edso (ed.so) wrote :

On 1/21/2018 12:19, Kenneth Loafman wrote:
> Thanks for the catch! Not sure how it got deleted.
>

hey,

had a quick look just to find our where it got missing and _couldn't find_ a point where it existed earlier. checked
  http://bazaar.launchpad.net/~duplicity-team/duplicity/0.6-series/view/head:/duplicity/collections.py
  http://bazaar.launchpad.net/~duplicity-team/duplicity/0.7-series/view/head:/duplicity/collections.py
  http://bazaar.launchpad.net/~duplicity-team/duplicity/0.8-series/view/head:/duplicity/collections.py
and sampled some earlier revisions in each.

can someone point to a revision of collection.py that held this code in the past?

..ede/duply.net

Revision history for this message
Kenneth Loafman (kenneth-loafman) wrote :

All in series-8 - it was added in rev 1209 to support replicate, then
removed in 1251 by accident.

On Sun, Jan 21, 2018 at 5:42 AM, edso <email address hidden> wrote:

> On 1/21/2018 12:19, Kenneth Loafman wrote:
> > Thanks for the catch! Not sure how it got deleted.
> >
>
> hey,
>
> had a quick look just to find our where it got missing and _couldn't find_
> a point where it existed earlier. checked
> http://bazaar.launchpad.net/~duplicity-team/duplicity/0.6-
> series/view/head:/duplicity/collections.py
> http://bazaar.launchpad.net/~duplicity-team/duplicity/0.7-
> series/view/head:/duplicity/collections.py
> http://bazaar.launchpad.net/~duplicity-team/duplicity/0.8-
> series/view/head:/duplicity/collections.py
> and sampled some earlier revisions in each.
>
> can someone point to a revision of collection.py that held this code in
> the past?
>
> ..ede/duply.net
>
> --
> https://code.launchpad.net/~dawgfoto/duplicity/fixup1251/+merge/336393
> You are subscribed to branch lp:duplicity.
>

Revision history for this message
edso (ed.so) wrote :

ahhh.. makes sense, thanks for clearing this up!.. ede

On 1/21/2018 13:21, Kenneth Loafman wrote:
> All in series-8 - it was added in rev 1209 to support replicate, then
> removed in 1251 by accident.
>
>
> On Sun, Jan 21, 2018 at 5:42 AM, edso <email address hidden> wrote:
>
>> On 1/21/2018 12:19, Kenneth Loafman wrote:
>>> Thanks for the catch! Not sure how it got deleted.
>>>
>>
>> hey,
>>
>> had a quick look just to find our where it got missing and _couldn't find_
>> a point where it existed earlier. checked
>> http://bazaar.launchpad.net/~duplicity-team/duplicity/0.6-
>> series/view/head:/duplicity/collections.py
>> http://bazaar.launchpad.net/~duplicity-team/duplicity/0.7-
>> series/view/head:/duplicity/collections.py
>> http://bazaar.launchpad.net/~duplicity-team/duplicity/0.8-
>> series/view/head:/duplicity/collections.py
>> and sampled some earlier revisions in each.
>>
>> can someone point to a revision of collection.py that held this code in
>> the past?
>>
>> ..ede/duply.net
>>
>> --
>> https://code.launchpad.net/~dawgfoto/duplicity/fixup1251/+merge/336393
>> You are subscribed to branch lp:duplicity.
>>
>

On 1/21/2018 13:21, Kenneth Loafman wrote:
> All in series-8 - it was added in rev 1209 to support replicate, then
> removed in 1251 by accident.
>
>
> On Sun, Jan 21, 2018 at 5:42 AM, edso <email address hidden> wrote:
>
>> On 1/21/2018 12:19, Kenneth Loafman wrote:
>>> Thanks for the catch! Not sure how it got deleted.
>>>
>>
>> hey,
>>
>> had a quick look just to find our where it got missing and _couldn't find_
>> a point where it existed earlier. checked
>> http://bazaar.launchpad.net/~duplicity-team/duplicity/0.6-
>> series/view/head:/duplicity/collections.py
>> http://bazaar.launchpad.net/~duplicity-team/duplicity/0.7-
>> series/view/head:/duplicity/collections.py
>> http://bazaar.launchpad.net/~duplicity-team/duplicity/0.8-
>> series/view/head:/duplicity/collections.py
>> and sampled some earlier revisions in each.
>>
>> can someone point to a revision of collection.py that held this code in
>> the past?
>>
>> ..ede/duply.net
>>
>> --
>> https://code.launchpad.net/~dawgfoto/duplicity/fixup1251/+merge/336393
>> You are subscribed to branch lp:duplicity.
>>
>

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'duplicity/collections.py'
2--- duplicity/collections.py 2017-12-21 21:10:02 +0000
3+++ duplicity/collections.py 2018-01-20 02:18:01 +0000
4@@ -300,6 +300,16 @@
5 """
6 return len(self.volume_name_dict.keys())
7
8+ def __eq__(self, other):
9+ """
10+ Return whether this backup set is equal to other
11+ """
12+ return self.type == other.type and \
13+ self.time == other.time and \
14+ self.start_time == other.start_time and \
15+ self.end_time == other.end_time and \
16+ len(self) == len(other)
17+
18
19 class BackupChain:
20 """

Subscribers

People subscribed via source and target branches