Wouldn't it make sense to output a full signature in `rdiffdir --write-sig-to <sig> delta'?

Asked by Mark Williams

Running `rdiffdir --write-sig-to <sig> tar' writes a complete directory signature. But running `rdiffdir --write-sig-to <sig> delta' only writes a partial signature corresponding to the directory changes. This is not very useful, because there is no way to operate on a chain of signatures like duplicity does. The next time `rdiffdir delta' is run, a complete directory signature is expected in order to get a meaningful delta (one which doesn't incorrectly treat old parts of the directory as new). The manpage for rdiffdir implies that behaviour. Wouldn't it make more sense to output a complete directory signature (or the partial signature combined with the input signature) when running this command, without changing the partial signature chain behaviour of duplicity?

I'd be willing to work on this.

Question information

Language:
English Edit question
Status:
Expired
For:
Duplicity Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Launchpad Janitor (janitor) said :
#1

This question was expired because it remained in the 'Open' state without activity for the last 15 days.

Revision history for this message
Kenneth Loafman (kenneth-loafman) said :
#2

Sorry for the delay.

I would be happy to take your patches for rdiffdir or duplicity either one. I don't have time to address this at all, but if you will provide patches and a test case, I'll see about getting it released. Thanks!

Revision history for this message
Launchpad Janitor (janitor) said :
#3

This question was expired because it remained in the 'Open' state without activity for the last 15 days.

Revision history for this message
Laszlo Ersek (lacos-caesar) said :
#4

The important calls in "rdiffdir" are diffdir.DirDelta() in write_delta(), and diffdir.DirDelta_WriteSig() in write_delta_and_sig().

The second parameter of both of these functions in the duplicity.diffdir module is either an fp returned by os.open(), or a list of such, sorted in logical increment order.

Thus in the rdiffdir "delta" command line, "signature_file" could be replaced by an ordered set of signature files. rdiffdir's main() should grab the corresponding slice of the "file_args" list, map it with os.open() -- or even with get_fileobj() -- into a list of fp's, and pass that list to write_delta() / write_delta_and_sig() as second argument. I guess if I actually programmed in Python this wouldn't be hard to implement.

The freshly written signature would be incremental again, but the delta & the new sigs would be built against the entire prior signature chain.

Revision history for this message
Laszlo Ersek (lacos-caesar) said :
#5