Is it possible to merge multiple patches?

26 views
Skip to first unread message

Gabriel Menegatti

unread,
Aug 10, 2018, 7:32:00 AM8/10/18
to librsync
Hello all,

I created this issue below on Github, but I'm also replicating the question here:

https://github.com/librsync/librsync/issues/148

---
Considering that I generate a diff/patch for a specific file every time that it is modified and that I store all these diffs/patches individually and sequentially, would it be possible to merge all patches into a single (final) patch that covers all the changes on the file and only apply this final patch?

Is it possible to do that using librsync? If not, is there any conceptual limitation/challenge that would make it impossible to implement it?

If my interpretation is not wrong, the Xdelta lib has support for what I'm asking above. Just to make it clear, the intention here is not to compare the two, but just to clarify what I'm trying to achieve with librsync.

"The new merge command allows you to combine a sequence of deltas, to produce a single output that represents the net effect of the sequence. The command is reasonably efficient because it computes the result directly, without constructing any intermediate copies (and without access to the first-of-chain source).
---

Thanks in advance.

Regards,
Gabriel

Martin Pool

unread,
Aug 10, 2018, 10:06:01 PM8/10/18
to Gabriel Menegatti, librsync
It's not implemented today (afaik) but it could be done

--
You received this message because you are subscribed to the Google Groups "librsync" group.
To unsubscribe from this group and stop receiving emails from it, send an email to librsync+u...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Gabriel Menegatti

unread,
Aug 11, 2018, 12:48:37 PM8/11/18
to Martin Pool, librsync
Hi Martin,

Thanks for your reply.

Unfortunately, we don't think that our team would have the necessary competence to implement it correctly. We wouldn't know where to start.

Recently our team did find a memory leak on librsync and made a PR [1], but we don't think we are prepared for a big contribution like that.

That being said, please, is there anyone that could be interest in implementing this feature on librsync, having our company as the financial sponsor?

We would be happy to sponsor this development, that would also be public available to anyone to use, obviously.


Thanks in advance.

Regards,
Gabriel.

To unsubscribe from this group and stop receiving emails from it, send an email to librsync+unsubscribe@googlegroups.com.

Martin Pool

unread,
Aug 12, 2018, 1:21:00 PM8/12/18
to Gabriel Menegatti, librsync
I'm not able to take that on at the moment but it would be great if someone else can.

To unsubscribe from this group and stop receiving emails from it, send an email to librsync+u...@googlegroups.com.

Gabriel Menegatti

unread,
Aug 22, 2018, 10:57:34 PM8/22/18
to librsync
Hello Martin and others,

Apparently no one is interested in adding this feature/capability to librsync or available to implement it. :-(

Is any librsync experienced developer at least available/interested to give some broad overview/guidance on how this could be implemented? Maybe with some guidance my team would be able to try to implement it.

Thanks in advance.

Regards,
Gabriel.

Martin Pool

unread,
Aug 22, 2018, 10:59:30 PM8/22/18
to Gabriel Menegatti, librsync
If you read the description of the Delta format I think you'll find it pretty straightforward. You just need to read through them in parallel and keep track of an offset to the positions originally used. 
Reply all
Reply to author
Forward
Message has been deleted
0 new messages