[MERGE] Let find_previous_heads take a repository.
Aaron Bentley
aaron.bentley at utoronto.ca
Mon Jun 19 20:12:29 BST 2006
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Johan Rydberg wrote:
> John Arbash Meinel <john at arbash-meinel.com> writes:
>
>
>>>VersionedFile extends RepositoryFile, so there is no need to alter the
>>>existing VersionedFile implementations (knits and weaves).
>>>
>>>We need a per-file interface for retrieving history information out of
>>>the repository. This is what RepositoryFile is meant for.
>>
>>Why can't you just use VersionedFile with some methods NotImplemented?
>
>
> Personally I would not reject the idea of having a get_versioned_file
> method in Repository, _as long as_ the user of it is well aware that
> it may not implement the whole VersionedFile API. I'm afraid some may
> be tempted to use it instead of for example CommitBuilder to add new
> texts to a file.
I'm not sure why that's such a bad thing. If you're committing a
revision, it probably makes sense to use CommitBuilder. If you're
adding texts for another reason, (importing, upgrading, installing a
bundle, data-recovery), it may not.
>>Your RepositoryFile interface takes no
>>constructor, and saves no state. So it is obviously never returned. I
>>suppose it defines a potential API. But as it stands the class
>>definition is next to useless.
>
>
> Because it limits what can be done on a repository file. And I think
> it is a better API than having N get_file_* methods in Repository.
>
> Yes, the RepositoryFile implementation used by knits and weaves are
> state-less and simple, but that may not be the case for every format.
There is no RepositoryFile implementation used by knits and weaves.
It's a class that isn't used in any way, so it might as well not exist.
Aaron
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org
iD8DBQFElvcd0F+nu1YWqI0RAtLwAJ9und2NWxzRZ744hAUytyCHLBb20QCeMYp8
RRS3DLc4SXc7BCsBFUisiZs=
=8q1W
-----END PGP SIGNATURE-----
More information about the bazaar
mailing list