rdiff-backup-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[rdiff-backup-users] Patch for unnecessary quoting of capitals


From: Trevor Harmon
Subject: [rdiff-backup-users] Patch for unnecessary quoting of capitals
Date: Fri, 31 Dec 2004 00:40:49 -0600

Hi all,

Rdiff-backup does a good job of detecting the abilities of a file system and adjusting its behavior accordingly. For instance, if a user is backing up a case-sensitive file system to a non-case-sensitive file system, then the capital letters in every filename of the destination will get quoted to avoid potential conflicts. (e.g. "T" becomes ";084")

Rdiff-backup is a bit too aggressive, however, because it will quote capital letters even when it doesn't need to. For instance, if both the source and destination file systems are case-insensitive, then there is no need to quote capitals, since no case conflicts can occur.

Of course, quoting capitals unnecessarily doesn't actually hurt anything, but it does make life difficult. For example, my typical backup routine is to rdiff-backup files from my primary Mac OS X hard drive to a secondary backup hard drive. Both drives are formatted as HFS+, which is case-insensitive. Therefore, if I want to find a file that rdiff-backup copied to my backup drive, I have to wade through cryptic filenames like ";084homas ;072obbes.pdf" and ";069;080310 research paper.pdf". It is difficult to know that these files are actually "Thomas Hobbes.pdf" and "EP310 research paper.pdf".

To solve this problem, I have patched rdiff-backup 0.13.4 so that capital letters are not quoted if the source and destination directories are both case-insensitive. This is accomplished by passing the source directory in the call to get_fsabilities_readwrite. The set_chars_to_quote function then compares the source and destination directories and avoids quoting capitals if both are case-insensitive.

Now, I'm sure there are some problems with my patch (hack?), but I hope it could at least be a catalyst in getting the problem fixed. Ben, perhaps you could lend a hand with this please?

Trevor


Attachment: fs_abilities.py.patch
Description: Binary data

Attachment: Main.py.patch
Description: Binary data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]