File librsync-man-example.diff of Package librsync

From: Matt McCutchen ( hashproduct ) - 2009-11-20 17:06:56 PST
Subject: Add an example to the rdiff(1) man page - ID: 2901539

For a user who just wants to use rdiff(1) to perform the three phases of the
delta-transfer algorithm, the man page is pretty sparse. The patch adds a
complete example and also adds a reference to the rsync technical report in
both the rdiff(1) and librsync(3) man pages. It is based on the following
explanation I gave on the rsync list:

Index: b/doc/librsync.3
--- a/doc/librsync.3
+++ b/doc/librsync.3
@@ -53,6 +53,8 @@ scriptable access to rsync functions.
 .I rdiff and librsync Manual
 \fI\fP or \fI\fP.
Index: b/doc/rdiff.1
--- a/doc/rdiff.1
+++ b/doc/rdiff.1
@@ -33,7 +33,22 @@ rdiff \- compute and apply signature-bas
 You can use \fBrdiff\fP to update files, much like \fBrsync\fP does.
 However, unlike \fBrsync\fP, \fBrdiff\fP puts you in control.  There
 are three steps to updating a file: \fBsignature\fP, \fBdelta\fP, and
+\fBpatch\fP.  Here is an example of the entire process, assuming you start
+with files \fIsrc/file\fP and \fIdest/file.old\fP:
+(cd dest && rdiff signature file.old file.sig)
+cp dest/file.sig src/
+(cd src && rdiff delta file.sig file
+cp src/ dest/
+(cd dest && rdiff patch file file)
+Now \fIdest/file\fP is a copy of \fIsrc/file\fP.
 In every case where a filename must be specified, \- may be used
 instead to mean either standard input or standard output as
@@ -46,6 +61,8 @@ found, invalid options, IO error, etc),
 an internal error or unhandled situation in librsync or rdiff.
 .BR librsync "(3)"
 Martin Pool <>
openSUSE Build Service is sponsored by