[MERGE] Make Tree.get_file_text and Tree.get_file_lines official

Aaron Bentley aaron at aaronbentley.com
Sun Oct 12 16:50:45 BST 2008


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

Hi all,

This patch adds testing and default implementations for
Tree.get_file_lines and Tree.get_file_text.  Tree.get_file_lines is
important to supply, because it is easy to make mistakes if it is not
available.  Specifically, it is tempting to use file.readlines, but this
has platform-dependent behaviour.

Also, this adds a path parameter to both, mirroring get_file.  It's
becoming apparent to me that WorkingTree and PreviewTree ought to
provide reasonable access to unversioned files, so I hope to make
get_file, get_file_lines, and get_file_text accept None for the file-id
in a future revision.

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

iEYEARECAAYFAkjyHNUACgkQ0F+nu1YWqI3R+ACfURgPFh0K47a1ti5GEKGPef9U
8vgAn3ybRKjJhKYBMnmVqUEs+gKqLCe5
=ZYVb
-----END PGP SIGNATURE-----
-------------- next part --------------
A non-text attachment was scrubbed...
Name: tree-api-updates-3776.patch
Type: text/x-diff
Size: 8990 bytes
Desc: not available
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20081012/62fc9199/attachment.bin 


More information about the bazaar mailing list