File librsync-man-example.diff of Package librsync

From: Matt McCutchen ( hashproduct ) - 2009-11-20 17:06:56 PST
URL: http://sourceforge.net/tracker/?func=detail&aid=2901539&group_id=56125&atid=479441
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:

http://lists.samba.org/archive/rsync/2009-November/024261.html

Index: librsync-1.0.0/doc/librsync.3
===================================================================
--- librsync-1.0.0.orig/doc/librsync.3
+++ librsync-1.0.0/doc/librsync.3
@@ -53,6 +53,8 @@ scriptable access to rsync functions.
 .PP
 .I rdiff and librsync Manual
 .PP
+\fIhttp://rsync.samba.org/tech_report/\fP
+.PP
 \fIhttp://rproxy.sourceforge.net/\fP or \fIhttp://linuxcare.com.au/rproxy/\fP.
 .PP
 \fIdraft-pool-rsync\fP
Index: librsync-1.0.0/doc/rdiff.1
===================================================================
--- librsync-1.0.0.orig/doc/rdiff.1
+++ librsync-1.0.0/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.
+\fBpatch\fP.  Here is an example of the entire process, assuming you start
+with files \fIsrc/file\fP and \fIdest/file.old\fP:
+.PP
+.RS
+(cd dest && rdiff signature file.old file.sig)
+.br
+cp dest/file.sig src/
+.br
+(cd src && rdiff delta file.sig file file.delta)
+.br
+cp src/file.delta dest/
+.br
+(cd dest && rdiff patch file file.delta file)
+.RE
+.PP
+Now \fIdest/file\fP is a copy of \fIsrc/file\fP.
 .SH DESCRIPTION
 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.
 .SH "SEE ALSO"
 .BR librsync "(3)"
+.PP
+\fIhttp://rsync.samba.org/tech_report/\fP
 .SH "AUTHOR"
 Martin Pool <mbp@sourcefrog.net>
 .PP
openSUSE Build Service is sponsored by