[cedar-backup-svn] SF.net SVN: cedar-backup:[948] cedar-backup2/trunk
Brought to you by:
pronovic
|
From: <pro...@us...> - 2009-08-16 18:56:07
|
Revision: 948
http://cedar-backup.svn.sourceforge.net/cedar-backup/?rev=948&view=rev
Author: pronovic
Date: 2009-08-16 18:55:56 +0000 (Sun, 16 Aug 2009)
Log Message:
-----------
Use tarfile.format=GNU_FORMAT rather than deprecated tarfile.posix=False.
Modified Paths:
--------------
cedar-backup2/trunk/CedarBackup2/filesystem.py
cedar-backup2/trunk/CedarBackup2/testutil.py
cedar-backup2/trunk/Changelog
Modified: cedar-backup2/trunk/CedarBackup2/filesystem.py
===================================================================
--- cedar-backup2/trunk/CedarBackup2/filesystem.py 2009-08-16 18:47:36 UTC (rev 947)
+++ cedar-backup2/trunk/CedarBackup2/filesystem.py 2009-08-16 18:55:56 UTC (rev 948)
@@ -1105,7 +1105,10 @@
else: raise ValueError("Mode [%s] is not valid." % mode)
try:
tar = tarfile.open(path, tarmode)
- tar.posix = False # make a GNU-compatible archive without file length limits
+ try:
+ tar.format = tarfile.GNU_FORMAT
+ except:
+ tar.posix = False
for entry in self:
try:
if flat:
Modified: cedar-backup2/trunk/CedarBackup2/testutil.py
===================================================================
--- cedar-backup2/trunk/CedarBackup2/testutil.py 2009-08-16 18:47:36 UTC (rev 947)
+++ cedar-backup2/trunk/CedarBackup2/testutil.py 2009-08-16 18:55:56 UTC (rev 948)
@@ -207,7 +207,10 @@
tmpdir = encodePath(tmpdir)
filepath = encodePath(filepath)
tar = tarfile.open(filepath)
- tar.posix = False
+ try:
+ tar.format = tarfile.GNU_FORMAT
+ except:
+ tar.posix = False
for tarinfo in tar:
tar.extract(tarinfo, tmpdir)
Modified: cedar-backup2/trunk/Changelog
===================================================================
--- cedar-backup2/trunk/Changelog 2009-08-16 18:47:36 UTC (rev 947)
+++ cedar-backup2/trunk/Changelog 2009-08-16 18:55:56 UTC (rev 948)
@@ -1,8 +1,9 @@
Version 2.19.4 unreleased
- * Fix testGenerateTarfile_002() so it works with Python 2.6.
- * Use hashlib instead of deprecated sha module when available.
- * Use set built-in rather than deprecated sets.Set when available.
+ * Use hashlib module instead of deprecated sha module when available.
+ * Use set built-in type rather than deprecated sets.Set class when available.
+ * Use tarfile.format=GNU_FORMAT rather than deprecated tarfile.posix=False.
+ * Fix testGenerateTarfile_002() so expectations match Python 2.6 results.
Version 2.19.3 29 Mar 2009
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|