iter_changes, delta consistency and revert

Robert Collins robertc at robertcollins.net
Fri Aug 21 03:44:48 BST 2009


On Fri, 2009-08-21 at 12:29 +1000, Martin Pool wrote:

> That said iter_changes is becoming an important API and concept so
> it's worth being clear about just how it's meant to work.
> 
> I really dislike the idea of iter_changes giving data that's almost
> but not always safe to reverse.  However, if it would be much more
> expensive to make sure this is true, then I suppose we can handle it
> by documenting it should never be done.

So, IIRC this correctly there are two issues with symmetrical expansion.
One is that its significantly broader - I don't think it matches users
expectations well. The other is that we'll be doing more work which
won't be needed most of the time.

> Is there a good reason why revert needs to reverse the delta by hand?
> I might have written it that way but given the state of the code now
> it'd seem better to get the delta from wt to basis and apply that.

Thats one way we can address the change in reverts behaviour.

> This is a classic case where either the KnownFailure or a comment near
> it needs to point to the bug, otherwise the comment is too cryptic for
> someone wanting to fix it or know what the right behaviour is meant to
> be.

Well, there isn't a bug :). But we can create one if you like, or write
a more verbose comment.

-Rob
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: This is a digitally signed message part
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20090821/2ff9eb7a/attachment.pgp 


More information about the bazaar mailing list