version 1.1, 2006/10/04 07:35:27
|
version 1.3, 2006/10/11 10:00:27
|
Line 1
|
Line 1
|
|
"""actual version of the versioned file folder with external filestorage, |
|
using the ExtFile Product, this version replaces externaVersionedFile.py |
|
DW 11.10.2006 |
|
""" |
|
|
from OFS.Folder import Folder |
from OFS.Folder import Folder |
from OFS.Image import File |
from OFS.Image import File |
from OFS.Image import cookId |
from OFS.Image import cookId |
Line 71 class generateDownloadZip:
|
Line 76 class generateDownloadZip:
|
|
|
savePath=os.path.join(tmpPath,lastV.title) |
savePath=os.path.join(tmpPath,lastV.title) |
fh=file(savePath,"w") |
fh=file(savePath,"w") |
fh.write(lastV.data) |
fh.write(lastV.getData()) |
fh.close() |
fh.close() |
|
|
self.response+="<h3>2. step: creating the downloadable file</h3>" |
self.response+="<h3>2. step: creating the downloadable file</h3>" |
Line 861 class extVersionedFile(CatalogAware,Fold
|
Line 866 class extVersionedFile(CatalogAware,Fold
|
def diff(self,data): |
def diff(self,data): |
"""differenz between lastversion and data""" |
"""differenz between lastversion and data""" |
d=Differ() |
d=Differ() |
tmp=self.getLastVersion().data |
tmp=self.getLastVersion().getData() |
#print "XX",data,tmp |
#print "XX",data,tmp |
try: |
try: |
l=list(d.compare(data.splitlines(1),tmp.splitlines(1))) |
l=list(d.compare(data.splitlines(1),tmp.splitlines(1))) |