[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Rdiff-backup-commits] rdiff-backup CHANGELOG rdiff-backup.1 rdiff_bac..
From: |
dean gaudet |
Subject: |
[Rdiff-backup-commits] rdiff-backup CHANGELOG rdiff-backup.1 rdiff_bac... |
Date: |
Mon, 29 Jan 2007 17:38:58 +0000 |
CVSROOT: /cvsroot/rdiff-backup
Module name: rdiff-backup
Changes by: dean gaudet <dgaudet> 07/01/29 17:38:58
Modified files:
. : CHANGELOG rdiff-backup.1
rdiff_backup : selection.py
Log message:
Glob escaping support via backslash. (Andrew Price)
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/rdiff-backup/CHANGELOG?cvsroot=rdiff-backup&r1=1.198&r2=1.199
http://cvs.savannah.gnu.org/viewcvs/rdiff-backup/rdiff-backup.1?cvsroot=rdiff-backup&r1=1.82&r2=1.83
http://cvs.savannah.gnu.org/viewcvs/rdiff-backup/rdiff_backup/selection.py?cvsroot=rdiff-backup&r1=1.43&r2=1.44
Patches:
Index: CHANGELOG
===================================================================
RCS file: /cvsroot/rdiff-backup/rdiff-backup/CHANGELOG,v
retrieving revision 1.198
retrieving revision 1.199
diff -u -b -r1.198 -r1.199
--- CHANGELOG 29 Jan 2007 17:26:34 -0000 1.198
+++ CHANGELOG 29 Jan 2007 17:38:58 -0000 1.199
@@ -1,3 +1,9 @@
+New in v1.1.9 (????/??/??)
+--------------------------
+
+Glob escaping support via backslash. (Andrew Price)
+
+
New in v1.1.8 (2007/01/29)
--------------------------
Index: rdiff-backup.1
===================================================================
RCS file: /cvsroot/rdiff-backup/rdiff-backup/rdiff-backup.1,v
retrieving revision 1.82
retrieving revision 1.83
diff -u -b -r1.82 -r1.83
--- rdiff-backup.1 20 Nov 2006 05:22:44 -0000 1.82
+++ rdiff-backup.1 29 Jan 2007 17:38:58 -0000 1.83
@@ -738,6 +738,15 @@
the string can be replaced with an upper- or lowercase version of
itself.
+If you need to match filenames which contain the above globbing
+characters, they may be escaped using a backslash "\\". The backslash
+will only escape the character following it so for
+.B **
+you will need
+to use "\\*\\*" to avoid escaping it to the
+.B *
+globbing character.
+
Remember that you may need to quote these characters when typing them
into a shell, so the shell does not interpret the globbing patterns
before rdiff-backup sees them.
Index: rdiff_backup/selection.py
===================================================================
RCS file: /cvsroot/rdiff-backup/rdiff-backup/rdiff_backup/selection.py,v
retrieving revision 1.43
retrieving revision 1.44
diff -u -b -r1.43 -r1.44
--- rdiff_backup/selection.py 5 Nov 2006 01:36:23 -0000 1.43
+++ rdiff_backup/selection.py 29 Jan 2007 17:38:58 -0000 1.44
@@ -77,7 +77,7 @@
"""
# This re should not match normal filenames, but usually just globs
- glob_re = re.compile("(.*[*?[]|ignorecase\\:)", re.I | re.S)
+ glob_re = re.compile("(.*[*?[\\\\]|ignorecase\\:)", re.I | re.S)
def __init__(self, rootrp):
"""Select initializer. rpath is the root directory"""
@@ -640,7 +640,10 @@
while i < n:
c, s = pat[i], pat[i:i+2]
i = i+1
- if s == '**':
+ if c == '\\':
+ res = res + re.escape(s[-1])
+ i = i + 1
+ elif s == '**':
res = res + '.*'
i = i + 1
elif c == '*': res = res + '[^/]*'
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Rdiff-backup-commits] rdiff-backup CHANGELOG rdiff-backup.1 rdiff_bac...,
dean gaudet <=