0.5.3 not creating .diff files

Nick Duffek nick@duffek.com
Tue, 5 Mar 2002 23:09:53 -0500 (EST)


Hi,

If I run the following commands with rdiff-backup-0.5.3, should I get
.diff files in the backup directory?

  cd /tmp
  rm -rf foo bar
  mkdir foo
  echo > foo/abc
  echo >> foo/abc; rdiff-backup foo bar
  echo >> foo/abc; rdiff-backup foo bar
  echo >> foo/abc; rdiff-backup foo bar

>From my reading of the documentation and code, rdiff-backup should
generate .diff files containing rsync-style diffs between two consecutive
versions of a file, but the above commands only generate .snapshot files.

I added some print statements to rdiff-backup and discovered that line
3667 is never reached, because new.isreg() always refers to a nonexistent
temp file.  Here's the code in question, in case my line numbering differs
from yours:

	def Increment_action(new, mirror, incpref):
		"""Main file incrementing function, returns RobustAction

		new is the file on the active partition,
		mirror is the mirrored file from the last backup,
		incpref is the prefix of the increment file.

		This function basically moves mirror -> incpref.

		"""
		Log("Incrementing mirror file " + mirror.path, 5)
		assert (new and new.lstat()) or mirror.lstat()
		if ((new and new.isdir()) or mirror.isdir()) and not incpref.isdir():
			incpref.mkdir()

		if not mirror.lstat(): return Inc.makemissing_action(incpref)
		elif mirror.isdir(): return Inc.makedir_action(mirror, incpref)
		elif new.isreg() and mirror.isreg():
line 3667		return Inc.makediff_action(new, mirror, incpref)
		else: return Inc.makesnapshot_action(mirror, incpref)

Nick