[MERGE] Implement and use Repository.iter_files_bytes

Aaron Bentley aaron.bentley at utoronto.ca
Mon Aug 20 06:45:20 BST 2007


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Robert Collins wrote:
> On Thu, 2007-08-16 at 07:58 -0400, Aaron Bentley wrote:
> Secondly, I think a test for extracting two texts from one file id would
> be good to have;

There is one already:

+        extracted = dict((i, ''.join(b)) for i, b in
+                         tree.branch.repository.iter_files_bytes(
+                         [('file1-id', 'rev1', 'file1-old'),
+                          ('file1-id', 'rev2', 'file1-new'),
+                          ('file2-id', 'rev1', 'file2'),

This extracts versions "rev1" and "rev2" for file "file1-id".

> and also I think there are a couple of key failure
> cases missing. Specifically what happens when a missing key is
> encountered (does the repository silently skip over it (letting the
> caller do housekeeping), or does it raise an error at the end of the
> iterator (easier for the common caller case I suspect)?) This probably
> needs to be tested both at the interface of the repository

As we discussed on IRC, I'll ensure an exception is raised.

> and also as
> an input to TT, to see that TT doesn't get confused.

TT doesn't use this interface, only users of TT (build_tree and revert).

Aaron
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFGySpC0F+nu1YWqI0RAvJaAJ9l9KO3zUg95+KGe9pzAB5yt/i1wACgiI0l
oPaZp+xKEtj73QnxSOIk0YU=
=JX85
-----END PGP SIGNATURE-----



More information about the bazaar mailing list