Merge lp:~gz/brz/i_unzipping into lp:brz

Proposed by Martin Packman on 2017-05-24
Status: Merged
Approved by: Martin Packman on 2017-05-24
Approved revision: 6634
Merge reported by: The Breezy Bot
Merged at revision: not available
Proposed branch: lp:~gz/brz/i_unzipping
Merge into: lp:brz
Diff against target: 451 lines (+52/-56)
15 files modified
breezy/config.py (+1/-2)
breezy/index.py (+1/-0)
breezy/knit.py (+4/-7)
breezy/log.py (+5/-11)
breezy/repofmt/knitpack_repo.py (+7/-5)
breezy/sixish.py (+2/-1)
breezy/tests/__init__.py (+1/-1)
breezy/tests/blackbox/test_log.py (+2/-3)
breezy/tests/per_controldir/test_controldir.py (+1/-3)
breezy/tests/per_repository/test_repository.py (+1/-1)
breezy/tests/per_transport.py (+6/-6)
breezy/tests/per_versionedfile.py (+7/-6)
breezy/transport/sftp.py (+4/-1)
breezy/versionedfile.py (+8/-7)
breezy/workingtree_4.py (+2/-2)
To merge this branch: bzr merge lp:~gz/brz/i_unzipping
Reviewer Review Type Date Requested Status
Jelmer Vernooij 2017-05-24 Approve on 2017-05-24
Review via email: mp+324552@code.launchpad.net

Commit message

Make use of zip Python 3 compatible

Description of the change

Fix uses of zip and itertools.izip to work across Python 2 and 3.

Using future_builtins in preference to conditional import of izip name.

Did some small refactoring of ancient code while touching things, stuff like knit wants to go away anyway.

To post a comment you must log in.
Jelmer Vernooij (jelmer) :
review: Approve
The Breezy Bot (the-breezy-bot) wrote :

Running landing tests failed
http://10.242.247.184:8080/job/brz-dev/3/

lp:~gz/brz/i_unzipping updated on 2017-05-24
6634. By Martin Packman on 2017-05-24

Fix per_versionedfile test failures and rethink future_builtins

Martin Packman (gz) wrote :

Fixed test failures from per_versionedfile tests also really needing an iterator. Also reshuffled comments and moved zip and map to commonly importable location.

lp:~gz/brz/i_unzipping updated on 2017-05-24
6635. By Martin Packman on 2017-05-24

Move remaining future_builtins zip imports

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'breezy/config.py'
--- breezy/config.py 2017-05-22 00:56:52 +0000
+++ breezy/config.py 2017-05-24 23:37:37 +0000
@@ -1191,8 +1191,7 @@
1191 else:1191 else:
1192 # Rely on zip truncating in length to the length of the shortest1192 # Rely on zip truncating in length to the length of the shortest
1193 # argument sequence.1193 # argument sequence.
1194 names = zip(location_parts, section_parts)1194 for name in zip(location_parts, section_parts):
1195 for name in names:
1196 if not fnmatch.fnmatch(name[0], name[1]):1195 if not fnmatch.fnmatch(name[0], name[1]):
1197 matched = False1196 matched = False
1198 break1197 break
11991198
=== modified file 'breezy/index.py'
--- breezy/index.py 2017-05-22 00:56:52 +0000
+++ breezy/index.py 2017-05-24 23:37:37 +0000
@@ -1449,6 +1449,7 @@
1449 """1449 """
1450 indices_info = zip(self._index_names, self._indices)1450 indices_info = zip(self._index_names, self._indices)
1451 if 'index' in debug.debug_flags:1451 if 'index' in debug.debug_flags:
1452 indices_info = list(indices_info)
1452 trace.mutter('CombinedGraphIndex reordering: currently %r, '1453 trace.mutter('CombinedGraphIndex reordering: currently %r, '
1453 'promoting %r', indices_info, hit_indices)1454 'promoting %r', indices_info, hit_indices)
1454 hit_names = []1455 hit_names = []
14551456
=== modified file 'breezy/knit.py'
--- breezy/knit.py 2017-05-22 00:56:52 +0000
+++ breezy/knit.py 2017-05-24 23:37:37 +0000
@@ -53,8 +53,6 @@
5353
54from __future__ import absolute_import54from __future__ import absolute_import
5555
56
57from itertools import izip
58import operator56import operator
59import os57import os
6058
@@ -471,7 +469,7 @@
471469
472 def __init__(self, lines):470 def __init__(self, lines):
473 KnitContent.__init__(self)471 KnitContent.__init__(self)
474 self._lines = lines472 self._lines = list(lines)
475473
476 def annotate(self):474 def annotate(self):
477 """Return a list of (origin, text) for each content line."""475 """Return a list of (origin, text) for each content line."""
@@ -504,7 +502,7 @@
504 return lines502 return lines
505503
506 def copy(self):504 def copy(self):
507 return AnnotatedKnitContent(self._lines[:])505 return AnnotatedKnitContent(self._lines)
508506
509507
510class PlainKnitContent(KnitContent):508class PlainKnitContent(KnitContent):
@@ -599,7 +597,7 @@
599 # but the code itself doesn't really depend on that.597 # but the code itself doesn't really depend on that.
600 # Figure out a way to not require the overhead of turning the598 # Figure out a way to not require the overhead of turning the
601 # list back into tuples.599 # list back into tuples.
602 lines = [tuple(line.split(' ', 1)) for line in content]600 lines = (tuple(line.split(' ', 1)) for line in content)
603 return AnnotatedKnitContent(lines)601 return AnnotatedKnitContent(lines)
604602
605 def parse_line_delta_iter(self, lines):603 def parse_line_delta_iter(self, lines):
@@ -1933,8 +1931,7 @@
1933 raw_data = self._access.get_raw_records(1931 raw_data = self._access.get_raw_records(
1934 [index_memo for key, index_memo in needed_records])1932 [index_memo for key, index_memo in needed_records])
19351933
1936 for (key, index_memo), data in \1934 for (key, index_memo), data in zip(needed_records, raw_data):
1937 izip(iter(needed_records), raw_data):
1938 content, digest = self._parse_record(key[-1], data)1935 content, digest = self._parse_record(key[-1], data)
1939 yield key, content, digest1936 yield key, content, digest
19401937
19411938
=== modified file 'breezy/log.py'
--- breezy/log.py 2017-05-22 00:56:52 +0000
+++ breezy/log.py 2017-05-24 23:37:37 +0000
@@ -87,16 +87,10 @@
87 )87 )
88from breezy.sixish import (88from breezy.sixish import (
89 BytesIO,89 BytesIO,
90 PY3,90 zip,
91 )91 )
9292
9393
94if PY3:
95 izip = zip
96else:
97 izip = itertools.izip
98
99
100def find_touching_revisions(branch, file_id):94def find_touching_revisions(branch, file_id):
101 """Yield a description of revisions which affect the file_id.95 """Yield a description of revisions which affect the file_id.
10296
@@ -834,7 +828,7 @@
834 # A single batch conversion is faster than many incremental ones.828 # A single batch conversion is faster than many incremental ones.
835 # As we have all the data, do a batch conversion.829 # As we have all the data, do a batch conversion.
836 nones = [None] * len(view_revisions)830 nones = [None] * len(view_revisions)
837 log_rev_iterator = iter([zip(view_revisions, nones, nones)])831 log_rev_iterator = iter([list(zip(view_revisions, nones, nones))])
838 else:832 else:
839 def _convert():833 def _convert():
840 for view in view_revisions:834 for view in view_revisions:
@@ -945,11 +939,11 @@
945 new_revs = []939 new_revs = []
946 if delta_type == 'full' and not check_fileids:940 if delta_type == 'full' and not check_fileids:
947 deltas = repository.get_deltas_for_revisions(revisions)941 deltas = repository.get_deltas_for_revisions(revisions)
948 for rev, delta in izip(revs, deltas):942 for rev, delta in zip(revs, deltas):
949 new_revs.append((rev[0], rev[1], delta))943 new_revs.append((rev[0], rev[1], delta))
950 else:944 else:
951 deltas = repository.get_deltas_for_revisions(revisions, fileid_set)945 deltas = repository.get_deltas_for_revisions(revisions, fileid_set)
952 for rev, delta in izip(revs, deltas):946 for rev, delta in zip(revs, deltas):
953 if check_fileids:947 if check_fileids:
954 if delta is None or not delta.has_changed():948 if delta is None or not delta.has_changed():
955 continue949 continue
@@ -1005,7 +999,7 @@
1005 revision_ids = [view[0] for view, _, _ in revs]999 revision_ids = [view[0] for view, _, _ in revs]
1006 revisions = repository.get_revisions(revision_ids)1000 revisions = repository.get_revisions(revision_ids)
1007 revs = [(rev[0], revision, rev[2]) for rev, revision in1001 revs = [(rev[0], revision, rev[2]) for rev, revision in
1008 izip(revs, revisions)]1002 zip(revs, revisions)]
1009 yield revs1003 yield revs
10101004
10111005
10121006
=== modified file 'breezy/repofmt/knitpack_repo.py'
--- breezy/repofmt/knitpack_repo.py 2017-05-22 00:56:52 +0000
+++ breezy/repofmt/knitpack_repo.py 2017-05-24 23:37:37 +0000
@@ -20,7 +20,6 @@
2020
21from ..lazy_import import lazy_import21from ..lazy_import import lazy_import
22lazy_import(globals(), """22lazy_import(globals(), """
23from itertools import izip
24import time23import time
2524
26from breezy import (25from breezy import (
@@ -68,6 +67,9 @@
68 PackRootCommitBuilder,67 PackRootCommitBuilder,
69 RepositoryPackCollection,68 RepositoryPackCollection,
70 )69 )
70from ..sixish import (
71 zip
72 )
71from ..vf_repository import (73from ..vf_repository import (
72 StreamSource,74 StreamSource,
73 )75 )
@@ -659,8 +661,8 @@
659 if self._reload_func is not None:661 if self._reload_func is not None:
660 self._reload_func()662 self._reload_func()
661 raise663 raise
662 for (names, read_func), (_1, _2, (key, eol_flag)) in \664 for (names, read_func), (_1, _2, (key, eol_flag)) in zip(
663 izip(reader.iter_records(), pack_readv_requests):665 reader.iter_records(), pack_readv_requests):
664 raw_data = read_func(None)666 raw_data = read_func(None)
665 # check the header only667 # check the header only
666 if output_lines is not None:668 if output_lines is not None:
@@ -711,8 +713,8 @@
711 if self._reload_func is not None:713 if self._reload_func is not None:
712 self._reload_func()714 self._reload_func()
713 raise715 raise
714 for (names, read_func), (key, eol_flag, references) in \716 for (names, read_func), (key, eol_flag, references) in zip(
715 izip(reader.iter_records(), node_vector):717 reader.iter_records(), node_vector):
716 raw_data = read_func(None)718 raw_data = read_func(None)
717 if output_lines:719 if output_lines:
718 # read the entire thing720 # read the entire thing
719721
=== modified file 'breezy/sixish.py'
--- breezy/sixish.py 2017-05-21 18:16:32 +0000
+++ breezy/sixish.py 2017-05-24 23:37:37 +0000
@@ -24,7 +24,6 @@
2424
25from six import (25from six import (
26 binary_type,26 binary_type,
27 PY2,
28 PY3,27 PY3,
29 reraise,28 reraise,
30 string_types,29 string_types,
@@ -40,6 +39,8 @@
40 import io as _io39 import io as _io
41 BytesIO = _io.BytesIO40 BytesIO = _io.BytesIO
42 StringIO = _io.StringIO41 StringIO = _io.StringIO
42 from builtins import zip, map
43else:43else:
44 from cStringIO import StringIO as BytesIO44 from cStringIO import StringIO as BytesIO
45 from StringIO import StringIO45 from StringIO import StringIO
46 from future_builtins import zip, map
4647
=== modified file 'breezy/tests/__init__.py'
--- breezy/tests/__init__.py 2017-05-22 00:56:52 +0000
+++ breezy/tests/__init__.py 2017-05-24 23:37:37 +0000
@@ -3456,7 +3456,7 @@
3456 # than the fastest.3456 # than the fastest.
3457 partitions = [list() for i in range(count)]3457 partitions = [list() for i in range(count)]
3458 tests = iter_suite_tests(suite)3458 tests = iter_suite_tests(suite)
3459 for partition, test in itertools.izip(itertools.cycle(partitions), tests):3459 for partition, test in zip(itertools.cycle(partitions), tests):
3460 partition.append(test)3460 partition.append(test)
3461 return partitions3461 return partitions
34623462
34633463
=== modified file 'breezy/tests/blackbox/test_log.py'
--- breezy/tests/blackbox/test_log.py 2017-05-21 18:10:28 +0000
+++ breezy/tests/blackbox/test_log.py 2017-05-24 23:37:37 +0000
@@ -17,7 +17,6 @@
1717
18"""Black-box tests for brz log."""18"""Black-box tests for brz log."""
1919
20from itertools import izip
21import os20import os
2221
23from breezy import (22from breezy import (
@@ -693,8 +692,8 @@
693 for r in self.get_captured_revisions()])692 for r in self.get_captured_revisions()])
694 # Now check the diffs, adding the revno in case of failure693 # Now check the diffs, adding the revno in case of failure
695 fmt = 'In revno %s\n%s'694 fmt = 'In revno %s\n%s'
696 for expected_rev, actual_rev in izip(expected,695 for expected_rev, actual_rev in zip(expected,
697 self.get_captured_revisions()):696 self.get_captured_revisions()):
698 revno, depth, expected_diff = expected_rev697 revno, depth, expected_diff = expected_rev
699 actual_diff = actual_rev.diff698 actual_diff = actual_rev.diff
700 self.assertEqualDiff(fmt % (revno, expected_diff),699 self.assertEqualDiff(fmt % (revno, expected_diff),
701700
=== modified file 'breezy/tests/per_controldir/test_controldir.py'
--- breezy/tests/per_controldir/test_controldir.py 2017-05-22 00:56:52 +0000
+++ breezy/tests/per_controldir/test_controldir.py 2017-05-24 23:37:37 +0000
@@ -16,8 +16,6 @@
1616
17"""Tests for control directory implementations - tests a controldir format."""17"""Tests for control directory implementations - tests a controldir format."""
1818
19from itertools import izip
20
21import breezy.branch19import breezy.branch
22from breezy import (20from breezy import (
23 bzrdir as _mod_bzrdir,21 bzrdir as _mod_bzrdir,
@@ -1560,7 +1558,7 @@
1560 self.assertPathExists(old_path)1558 self.assertPathExists(old_path)
1561 self.assertPathExists(new_path)1559 self.assertPathExists(new_path)
1562 for (((dir_relpath1, _), entries1),1560 for (((dir_relpath1, _), entries1),
1563 ((dir_relpath2, _), entries2)) in izip(1561 ((dir_relpath2, _), entries2)) in zip(
1564 osutils.walkdirs(old_path),1562 osutils.walkdirs(old_path),
1565 osutils.walkdirs(new_path)):1563 osutils.walkdirs(new_path)):
1566 self.assertEqual(dir_relpath1, dir_relpath2)1564 self.assertEqual(dir_relpath1, dir_relpath2)
15671565
=== modified file 'breezy/tests/per_repository/test_repository.py'
--- breezy/tests/per_repository/test_repository.py 2017-05-22 00:56:52 +0000
+++ breezy/tests/per_repository/test_repository.py 2017-05-24 23:37:37 +0000
@@ -421,7 +421,7 @@
421 revision_ids = ['a-rev', 'b-rev', 'c-rev']421 revision_ids = ['a-rev', 'b-rev', 'c-rev']
422 revisions = repo.get_revisions(revision_ids)422 revisions = repo.get_revisions(revision_ids)
423 self.assertEqual(len(revisions), 3)423 self.assertEqual(len(revisions), 3)
424 zipped = zip(revisions, revision_ids)424 zipped = list(zip(revisions, revision_ids))
425 self.assertEqual(len(zipped), 3)425 self.assertEqual(len(zipped), 3)
426 for revision, revision_id in zipped:426 for revision, revision_id in zipped:
427 self.assertEqual(revision.revision_id, revision_id)427 self.assertEqual(revision.revision_id, revision_id)
428428
=== modified file 'breezy/tests/per_transport.py'
--- breezy/tests/per_transport.py 2017-05-23 14:08:03 +0000
+++ breezy/tests/per_transport.py 2017-05-24 23:37:37 +0000
@@ -20,7 +20,6 @@
20TransportTestProviderAdapter.20TransportTestProviderAdapter.
21"""21"""
2222
23import itertools
24import os23import os
25import stat24import stat
26import sys25import sys
@@ -43,6 +42,7 @@
43from ..osutils import getcwd42from ..osutils import getcwd
44from ..sixish import (43from ..sixish import (
45 BytesIO,44 BytesIO,
45 zip,
46 )46 )
47from ..smart import medium47from ..smart import medium
48from . import (48from . import (
@@ -191,15 +191,15 @@
191 self.build_tree(files, transport=t, line_endings='binary')191 self.build_tree(files, transport=t, line_endings='binary')
192 self.check_transport_contents('contents of a\n', t, 'a')192 self.check_transport_contents('contents of a\n', t, 'a')
193 content_f = t.get_multi(files)193 content_f = t.get_multi(files)
194 # Use itertools.izip() instead of use zip() or map(), since they fully194 # Must use iter zip() from future not old version which will fully
195 # evaluate their inputs, the transport requests should be issued and195 # evaluate its inputs, the transport requests should be issued and
196 # handled sequentially (we don't want to force transport to buffer).196 # handled sequentially (we don't want to force transport to buffer).
197 for content, f in itertools.izip(contents, content_f):197 for content, f in zip(contents, content_f):
198 self.assertEqual(content, f.read())198 self.assertEqual(content, f.read())
199199
200 content_f = t.get_multi(iter(files))200 content_f = t.get_multi(iter(files))
201 # Use itertools.izip() for the same reason201 # Again this zip() must come from the future
202 for content, f in itertools.izip(contents, content_f):202 for content, f in zip(contents, content_f):
203 self.assertEqual(content, f.read())203 self.assertEqual(content, f.read())
204204
205 def test_get_unknown_file(self):205 def test_get_unknown_file(self):
206206
=== modified file 'breezy/tests/per_versionedfile.py'
--- breezy/tests/per_versionedfile.py 2017-05-22 00:56:52 +0000
+++ breezy/tests/per_versionedfile.py 2017-05-24 23:37:37 +0000
@@ -22,7 +22,7 @@
22# considered typical and check that it can be detected/corrected.22# considered typical and check that it can be detected/corrected.
2323
24from gzip import GzipFile24from gzip import GzipFile
25from itertools import chain, izip25import itertools
2626
27from .. import (27from .. import (
28 errors,28 errors,
@@ -45,6 +45,7 @@
45 )45 )
46from ..sixish import (46from ..sixish import (
47 BytesIO,47 BytesIO,
48 zip,
48 )49 )
49from . import (50from . import (
50 TestCase,51 TestCase,
@@ -2028,9 +2029,9 @@
2028 :param records: A list to collect the seen records.2029 :param records: A list to collect the seen records.
2029 :return: A generator of the records in stream.2030 :return: A generator of the records in stream.
2030 """2031 """
2031 # We make assertions during copying to catch things early for2032 # We make assertions during copying to catch things early for easier
2032 # easier debugging.2033 # debugging. This must use the iterating zip() from the future.
2033 for record, ref_record in izip(stream, expected):2034 for record, ref_record in zip(stream, expected):
2034 records.append(record)2035 records.append(record)
2035 self.assertEqual(ref_record.key, record.key)2036 self.assertEqual(ref_record.key, record.key)
2036 self.assertEqual(ref_record.storage_kind, record.storage_kind)2037 self.assertEqual(ref_record.storage_kind, record.storage_kind)
@@ -2444,7 +2445,7 @@
2444 origin_entries = source.get_record_stream(origin_keys, 'unordered', False)2445 origin_entries = source.get_record_stream(origin_keys, 'unordered', False)
2445 end_entries = source.get_record_stream(end_keys, 'topological', False)2446 end_entries = source.get_record_stream(end_keys, 'topological', False)
2446 start_entries = source.get_record_stream(start_keys, 'topological', False)2447 start_entries = source.get_record_stream(start_keys, 'topological', False)
2447 entries = chain(origin_entries, end_entries, start_entries)2448 entries = itertools.chain(origin_entries, end_entries, start_entries)
2448 try:2449 try:
2449 files.insert_record_stream(entries)2450 files.insert_record_stream(entries)
2450 except RevisionNotPresent:2451 except RevisionNotPresent:
@@ -2476,7 +2477,7 @@
2476 streams = []2477 streams = []
2477 for key in reversed(keys):2478 for key in reversed(keys):
2478 streams.append(source.get_record_stream([key], 'unordered', False))2479 streams.append(source.get_record_stream([key], 'unordered', False))
2479 deltas = chain(*streams[:-1])2480 deltas = itertools.chain.from_iterable(streams[:-1])
2480 files = self.get_versionedfiles()2481 files = self.get_versionedfiles()
2481 try:2482 try:
2482 files.insert_record_stream(deltas)2483 files.insert_record_stream(deltas)
24832484
=== modified file 'breezy/transport/sftp.py'
--- breezy/transport/sftp.py 2017-05-22 00:56:52 +0000
+++ breezy/transport/sftp.py 2017-05-24 23:37:37 +0000
@@ -49,6 +49,9 @@
49 ParamikoNotPresent,49 ParamikoNotPresent,
50 )50 )
51from ..osutils import fancy_rename51from ..osutils import fancy_rename
52from ..sixish import (
53 zip,
54 )
52from ..trace import mutter, warning55from ..trace import mutter, warning
53from ..transport import (56from ..transport import (
54 FileFileStream,57 FileFileStream,
@@ -202,7 +205,7 @@
202 # short readv.205 # short readv.
203 data_stream = itertools.chain(fp.readv(requests),206 data_stream = itertools.chain(fp.readv(requests),
204 itertools.repeat(None))207 itertools.repeat(None))
205 for (start, length), data in itertools.izip(requests, data_stream):208 for (start, length), data in zip(requests, data_stream):
206 if data is None:209 if data is None:
207 if cur_coalesced is not None:210 if cur_coalesced is not None:
208 raise errors.ShortReadvError(self.relpath,211 raise errors.ShortReadvError(self.relpath,
209212
=== modified file 'breezy/versionedfile.py'
--- breezy/versionedfile.py 2017-05-22 00:56:52 +0000
+++ breezy/versionedfile.py 2017-05-24 23:37:37 +0000
@@ -43,6 +43,7 @@
43from .registry import Registry43from .registry import Registry
44from .sixish import (44from .sixish import (
45 BytesIO,45 BytesIO,
46 zip,
46 )47 )
47from .textmerge import TextMerge48from .textmerge import TextMerge
4849
@@ -535,10 +536,10 @@
535 if not mpvf.has_version(p))536 if not mpvf.has_version(p))
536 present_parents = set(self.get_parent_map(needed_parents).keys())537 present_parents = set(self.get_parent_map(needed_parents).keys())
537 for parent_id, lines in zip(present_parents,538 for parent_id, lines in zip(present_parents,
538 self._get_lf_split_line_list(present_parents)):539 self._get_lf_split_line_list(present_parents)):
539 mpvf.add_version(lines, parent_id, [])540 mpvf.add_version(lines, parent_id, [])
540 for (version, parent_ids, expected_sha1, mpdiff), lines in\541 for (version, parent_ids, expected_sha1, mpdiff), lines in zip(
541 zip(records, mpvf.get_line_list(versions)):542 records, mpvf.get_line_list(versions)):
542 if len(parent_ids) == 1:543 if len(parent_ids) == 1:
543 left_matching_blocks = list(mpdiff.get_matching_blocks(0,544 left_matching_blocks = list(mpdiff.get_matching_blocks(0,
544 mpvf.get_diff(parent_ids[0]).num_lines()))545 mpvf.get_diff(parent_ids[0]).num_lines()))
@@ -1027,8 +1028,8 @@
1027 continue1028 continue
1028 mpvf.add_version(chunks_to_lines(record.get_bytes_as('chunked')),1029 mpvf.add_version(chunks_to_lines(record.get_bytes_as('chunked')),
1029 record.key, [])1030 record.key, [])
1030 for (key, parent_keys, expected_sha1, mpdiff), lines in\1031 for (key, parent_keys, expected_sha1, mpdiff), lines in zip(
1031 zip(records, mpvf.get_line_list(versions)):1032 records, mpvf.get_line_list(versions)):
1032 if len(parent_keys) == 1:1033 if len(parent_keys) == 1:
1033 left_matching_blocks = list(mpdiff.get_matching_blocks(0,1034 left_matching_blocks = list(mpdiff.get_matching_blocks(0,
1034 mpvf.get_diff(parent_keys[0]).num_lines()))1035 mpvf.get_diff(parent_keys[0]).num_lines()))
@@ -1318,7 +1319,7 @@
1318 prefix_keys.append(key[-1])1319 prefix_keys.append(key[-1])
1319 return result1320 return result
13201321
1321 def _get_all_prefixes(self):1322 def _iter_all_prefixes(self):
1322 # Identify all key prefixes.1323 # Identify all key prefixes.
1323 # XXX: A bit hacky, needs polish.1324 # XXX: A bit hacky, needs polish.
1324 if isinstance(self._mapper, ConstantMapper):1325 if isinstance(self._mapper, ConstantMapper):
@@ -1413,7 +1414,7 @@
1413 yield line, prefix + (version,)1414 yield line, prefix + (version,)
14141415
1415 def _iter_all_components(self):1416 def _iter_all_components(self):
1416 for path, prefix in self._get_all_prefixes():1417 for path, prefix in self._iter_all_prefixes():
1417 yield prefix, self._get_vf(path)1418 yield prefix, self._get_vf(path)
14181419
1419 def keys(self):1420 def keys(self):
14201421
=== modified file 'breezy/workingtree_4.py'
--- breezy/workingtree_4.py 2017-05-22 00:56:52 +0000
+++ breezy/workingtree_4.py 2017-05-24 23:37:37 +0000
@@ -1353,8 +1353,8 @@
1353 _mod_revision.NULL_REVISION)1353 _mod_revision.NULL_REVISION)
1354 trees = []1354 trees = []
1355 else:1355 else:
1356 trees = zip(revision_ids,1356 trees = list(zip(revision_ids,
1357 self.branch.repository.revision_trees(revision_ids))1357 self.branch.repository.revision_trees(revision_ids)))
1358 base_tree = trees[0][1]1358 base_tree = trees[0][1]
1359 state = self.current_dirstate()1359 state = self.current_dirstate()
1360 # We don't support ghosts yet1360 # We don't support ghosts yet

Subscribers

People subscribed via source and target branches