RFC: iter_changes and content changes

Robert Collins robertc at robertcollins.net
Tue Dec 2 05:50:00 GMT 2008

So iter_changes is great for status. But its not enough for diff, or

I'd like to be able to throw a single iterator at
CommitBuilder.record_iter_changes, which would output *both* the
metadata change list *and* patches for the changes.

For instance, iter_changes outputs:
(file_id, (path_in_source, path_in_target),
 changed_content, versioned, parent, name, kind,

If we added a field - content_delta to that, it would do what I want.
That would probably be controlled by a parameter asking for it.

What I'd like, ideally, is to be able to ask a repository to accept a
change which contains such a patch, against an arbitrary revision; this
would (if serialised) allow changes to large files to be streamed to a
server, without having to have the server call-back to the client for a
diff (such callbacks are ugly).

*if* we had that, the commit-to-a-different-branch use case would be as
simple as:
builder = other_branch.get_commit_builder()
with_patches=True), tree.parents[0])

- and I'd *love* that.


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/20081202/0c97cc4b/attachment.pgp 

More information about the bazaar mailing list