user files in branch/checkout/repositories

John A Meinel john at arbash-meinel.com
Fri Jan 27 03:38:32 GMT 2006


Robert Collins wrote:
> So there was a short thread a while back about giving all the object
> types that serialise to a directory on disk an interface for adding,
> removing and writing unversioned files.
> 
> I've had a think about this and chatted with Martin too - there are two
> key problems:
> 
>  * Its not reasonable to expect all implementations of the -for
> instance- 'Repository' interface to support unversioned file-like
> storage. I.e. consider the foreignbranches work - a svn repository
> always commits to record content, so this would conflict rather badly
> with that model. Ditto CVS. And when I consider the 'revisions are
> written as a single blob' storage approach, it seems to me it will have
> problems too.

Reasonable enough to me. I don't know that we would expect unversioned
files to work for foreign branches, though. I thought the idea of
foreign branches was mostly a read-only sort of thing. But maybe not.

> 
>  * Whatever files are stored in our control directories we wont know
> about them, and they may conflict with future names we choose. Are they
> relevant to one repository format? or are they transient?

Well, so far we have taken to use the 'x-' prefix to mean it is
unofficial. I don't know if it is good or bad, but it seems a reasonable
way to distinguish and prevent collisions.

> 
> One approach to the latter problem is to require registering them:
> 
>>>> checkout.get_user_file('shelf')
> ...
> UnregisteredFile: shelf
>>>> checkout.register_file('shelf', preserve_clone=True,
> preserve_upgrade=True)
>>>> checkout.get_user_file('shelf')
> .file object.
> 
> (implicit registration is not as clean IMO though it could be done).
> 
> This would allow upgrades and clones to copy such files around.
> 
> It does not address possible conflicts with names we might choose(we can
> punt on this), nor does it address whether its a reasonable burden to
> place on the objects.
> 
> Its obviously trivial for checkout, less so for branch, and IMO non
> trivial for repositories.
> 
> Rob

There have been a few things that have been implemented by plugins that
wouldn't really be possible without some sort of per-foo storage. Tags,
rsync pull/push, etc.

I would really like to keep something available, since it can be very
useful. I think explicit registration is reasonable. It does let you do
stuff like mark whether the file should be preserved or not.

+1 from me.

John
=:->

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 249 bytes
Desc: OpenPGP digital signature
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20060126/6907e08f/attachment.pgp 


More information about the bazaar mailing list