Getting rid of RootEntry?

Martin Pool mbp at sourcefrog.net
Wed Jan 18 03:40:09 GMT 2006


On 18 Jan 2006, Robert Collins <robertc at robertcollins.net> wrote:
> On Wed, 2006-01-18 at 12:39 +1100, Martin Pool wrote:
> > 
> > Right, for example it would be a clean way to get nice user behaviour
> > when a file is replaced by a symlink of the same name.  Not allowing
> > files to change type seems to imply that at least internally there
> > will
> > be an add & remove operation.  But as you say it does introduce more
> > edge cases and so room for bugs. 
> 
> I think the right thing to do is to split the entry and the content 
> :
> FileEntry -> InventoryEntry and FileContent
> DirectoryEntry -> InventoryEntry and DirectoryContent

Well, certainly allowing changes starts with recognizing that there are
some things common to all entries (name, id) and some which depend on
the particular type of content.  You could represent it either as two
objects or as one object of various classes.  Perhaps splitting it is
better.

-- 
Martin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20060118/8b56eda9/attachment.pgp 


More information about the bazaar mailing list