Merge lp:~ben-a/u1db/fixes--1262956 into lp:u1db

Proposed by B Carrillo
Status: Rejected
Rejected by: dobey
Proposed branch: lp:~ben-a/u1db/fixes--1262956
Merge into: lp:u1db
Diff against target: 17 lines (+3/-4)
1 file modified
u1db/sync.py (+3/-4)
To merge this branch: bzr merge lp:~ben-a/u1db/fixes--1262956
Reviewer Review Type Date Requested Status
dobey (community) Needs Fixing
Review via email: mp+199739@code.launchpad.net

Description of the change

avoids double iteration

To post a comment you must log in.
lp:~ben-a/u1db/fixes--1262956 updated
444. By B Carrillo

Avoid double iteration

Revision history for this message
dobey (dobey) wrote :

This change results in 25 tests failing. You can run the tests with: (mkdir -p build && cd build && cmake .. && make check)

These tests will have to not fail, and it would be nice if there were a way to test this specific change as well.

review: Needs Fixing
Revision history for this message
dobey (dobey) wrote :

A month with no replies, so rejecting this.

Unmerged revisions

444. By B Carrillo

Avoid double iteration

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'u1db/sync.py'
--- u1db/sync.py 2012-10-09 17:00:12 +0000
+++ u1db/sync.py 2013-12-20 03:49:42 +0000
@@ -134,10 +134,9 @@
134 # prepare to send all the changed docs134 # prepare to send all the changed docs
135 docs_to_send = self.source.get_docs(changed_doc_ids,135 docs_to_send = self.source.get_docs(changed_doc_ids,
136 check_for_conflicts=False, include_deleted=True)136 check_for_conflicts=False, include_deleted=True)
137 # TODO: there must be a way to not iterate twice137 docs_by_generation = (
138 docs_by_generation = zip(138 (doc, gen, trans)
139 docs_to_send, (gen for _, gen, _ in changes),139 for (doc, (_, gen, trans)) in zip(docs_to_send, changes))
140 (trans for _, _, trans in changes))
141140
142 # exchange documents and try to insert the returned ones with141 # exchange documents and try to insert the returned ones with
143 # the target, return target synced-up-to gen142 # the target, return target synced-up-to gen

Subscribers

People subscribed via source and target branches