listing deleted children in serialised deltas.
Robert Collins
robertc at robertcollins.net
Thu Jan 3 02:35:23 GMT 2008
I'd like lazyweb help... (this is in the context of journalled
inventories)
say we have two trees:
OLD:
---
FOO
FOO/BAR
---
NEW:
---
---
(root is implied here)
Our memory inventory delta at the moment for this is:
[(FOO, None, foo-id, foo-object)]
This makes sense if you consider that it saves us traversing the deleted
subtree in dirstate, means we only show the user the one deleted path
and other nice things.
On the other hand, it means that in this case:
OLD:
---
FOO
FOO/BAR
---
NEW:
---
BAR
---
for some use cases.
As an example, consider 'When was FOO/BAR deleted'? If we use the single
entry delta, we cannot tell by inspecting the delta that FOO/BAR has
been deleted unless:
- we have an in memory map telling us the current path of FOO/BAR
which means we must process the journal entries in topological order
oldest-newest.
Which has all sorts of nasty and complex implications.
If we instead do:
[(FOO, None, foo-id, foo-object), (FOO/BAR, None, bar-id, bar-object)]
then we can just scan for bar-id and we'll find all the commits that
delete FOO/BAR without needing to do complex ordering or memory
management.
Comments?
-Rob
--
GPG key available at: <http://www.robertcollins.net/keys.txt>.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20080103/d9a2f391/attachment.pgp
More information about the bazaar
mailing list