[MERGE, 165306] Use the per-file graph during commits of pack's

John Arbash Meinel john at arbash-meinel.com
Tue Nov 27 22:40:57 GMT 2007


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

Robert Collins wrote:
> On Tue, 2007-11-27 at 17:15 -0500, John Arbash Meinel wrote:

...

>> I don't see any direct tests for CommitBuilder.heads(). Which seems like
>> they should be in
>> bzrlib/tests/repository_implementations/test_commit_builder.py
>> I only see heads tests for test_graph.py and test_inv.py
> 
> So, heads() is very heavily, indirectly, tested by the tests for
> last-modified generation. I'm in two minds here about what to do.
> 

Are we really testing that the file_id graph is correct? It would seem like if
we were we wouldn't have had the problem of the parents changing because of
going through a set(). Since that has been cleaned up, the tests may exist now.

> One way would be to migrate those tests to tests for heads(), and a test
> that heads() is called and used correctly. Another is to consider
> heads() an implementation internal of the builder (and perhaps make it
> _heads, though as subclasses need to implement it thats in our grey area
> for how things are defined as public/private).
> 
> -Rob

Well, as it is only used by record_entry_contents(), it seems like you could
simply make it private behind that. And I think most foreign implementations
would change record_entry_contents (I know SVNCommitBuilder does).

So I'm fine making it more private, and not testing it as much. Though I also
believe it isn't as tested as you think it is.

John
=:->

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (Darwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFHTJz5JdeBCYSNAAMRAlNmAJ9DbKG/0TmRxyqIyO+NoGPWPViUCgCgzPei
HqxomKRQzJZLp1ltBrNMRWE=
=OQtI
-----END PGP SIGNATURE-----



More information about the bazaar mailing list