the inventory must be updated as merge proceeds, not at the end

John A Meinel john at arbash-meinel.com
Fri Dec 30 19:33:05 GMT 2005


James Blackwell wrote:
> On Thu, Dec 29, 2005 at 12:14:41PM -0500, Aaron Bentley wrote:
>>>> Tree transforms should happen at a level above the filesystem level,
>>>> because what's on the disk may not match the WorkingTree.  Specifically,
>>>> we want to support CVS-style keywords.
>>>> http://bazaar.canonical.com/KeywordExpansion
>>>
>>> We do ??? 
>> Martin and Robert do, at least.
> 
> The previous poster is the first person that I've heard say "No, I don't
> want want this at all". 
> 
> I've heard of plenty of people ask for this. I never digged deep enough
> into it about whether or not a much simpler case -- only on export -- is
> sufficient.
> 
>> Also, it may not always be appropriate for the build system to depend on
>> the VCS.  For example, it may be useful to have expanded keywords in a
>> tarball.
> 
> I think is generally benign for everyone.
> 
>>> But you will still have the problem that the current state of the tree
>>> is X, but the file was only last modified in Y. 
>> It's conceivable that we could support both tree-revision(X) and
>> file-revision(Y) as keywords.  Did you notice the spec calls for
>> updating every keyword-expanded file every time the last-revision changes?
> 
> I wonder what sort of problems this could cause for things like
> incremental backups and things like diffutils.

Well, I can say that with CVS it is one of the primary sources of merge
conflicts. But part of that is because CVS stores the modified versions.

It would complicate our working model. Because any file which has them
now actually has 2 sha1 sums, the expanded version, and the contracted
version.

I'm guessing that hash-cache would have to store the unexpanded version,
so that it would match what is saved. (Otherwise the sha1 sum wouldn't
match between the working tree and the last committed inventory). Which
means that HashCache now needs to know which files have expanded
keywords, so that it can undo the expansion when it computes the sha1 sum.
But some of that goes back to having all access to the working directory
go through WorkingTree, which would have that information.

Honestly for me, CVS keyword expansion never worked right and caused
lots of problems. I didn't realize how bad they were until tla told me I
couldn't have them. And I found a better way to do it.

If people really really want them, then so be it. I just want to make
sure that we don't pay a big penalty for a feature that really isn't all
that great.

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/20051230/106ff164/attachment.pgp 


More information about the bazaar mailing list