revisionmanager-devel Mailing List for RevisionManager (Page 2)
Brought to you by:
philikon
You can subscribe to this list here.
| 2003 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(10) |
Nov
(2) |
Dec
|
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2004 |
Jan
|
Feb
(1) |
Mar
|
Apr
(12) |
May
(1) |
Jun
|
Jul
|
Aug
|
Sep
(6) |
Oct
|
Nov
|
Dec
|
|
From: <far...@us...> - 2003-10-29 06:52:28
|
Update of /cvsroot/revisionmanager/RevisionManager/tests
In directory sc8-pr-cvs1:/tmp/cvs-serv6042/tests
Modified Files:
alltests.py testCVSWrapper.py
Log Message:
replaced '/tmp' with tempfile.gettempdir() (thx nlehuen) - all unit tests now passing on win2k
Index: alltests.py
===================================================================
RCS file: /cvsroot/revisionmanager/RevisionManager/tests/alltests.py,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -C2 -d -r1.1.1.1 -r1.2
*** alltests.py 17 Oct 2003 12:07:40 -0000 1.1.1.1
--- alltests.py 29 Oct 2003 06:52:24 -0000 1.2
***************
*** 12,17 ****
# patching INSTANCE_HOME variable temporarily before importing modules...
import Globals
instance_bak = Globals.INSTANCE_HOME
! Globals.INSTANCE_HOME = "/tmp/instance_home"
if not os.path.isdir(Globals.INSTANCE_HOME):
os.mkdir(Globals.INSTANCE_HOME)
--- 12,18 ----
# patching INSTANCE_HOME variable temporarily before importing modules...
import Globals
+ import tempfile
instance_bak = Globals.INSTANCE_HOME
! Globals.INSTANCE_HOME = os.path.join(tempfile.gettempdir(),"instance_home")
if not os.path.isdir(Globals.INSTANCE_HOME):
os.mkdir(Globals.INSTANCE_HOME)
Index: testCVSWrapper.py
===================================================================
RCS file: /cvsroot/revisionmanager/RevisionManager/tests/testCVSWrapper.py,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -C2 -d -r1.1.1.1 -r1.2
*** testCVSWrapper.py 17 Oct 2003 12:07:42 -0000 1.1.1.1
--- testCVSWrapper.py 29 Oct 2003 06:52:24 -0000 1.2
***************
*** 4,8 ****
"""
! import os, sys, time, shutil
if __name__ == '__main__':
execfile(os.path.join(sys.path[0], 'framework.py'))
--- 4,8 ----
"""
! import os, sys, time, shutil, tempfile
if __name__ == '__main__':
execfile(os.path.join(sys.path[0], 'framework.py'))
***************
*** 16,20 ****
MODULE = "PythonUnittest"
! PREFIX = os.path.join("/tmp", "testRevisionManager-"+str(int(time.time())))
WORK_DIR = os.path.join(PREFIX, "workdir")
REPOSITORY_PATH = os.path.join(PREFIX, "repository")
--- 16,20 ----
MODULE = "PythonUnittest"
! PREFIX = os.path.join(tempfile.gettempdir(), "testRevisionManager-"+str(int(time.time())))
WORK_DIR = os.path.join(PREFIX, "workdir")
REPOSITORY_PATH = os.path.join(PREFIX, "repository")
|
|
From: <far...@us...> - 2003-10-29 06:52:28
|
Update of /cvsroot/revisionmanager/RevisionManager
In directory sc8-pr-cvs1:/tmp/cvs-serv6042
Modified Files:
RevisionManager.py
Log Message:
replaced '/tmp' with tempfile.gettempdir() (thx nlehuen) - all unit tests now passing on win2k
Index: RevisionManager.py
===================================================================
RCS file: /cvsroot/revisionmanager/RevisionManager/RevisionManager.py,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -C2 -d -r1.1.1.1 -r1.2
*** RevisionManager.py 17 Oct 2003 12:07:40 -0000 1.1.1.1
--- RevisionManager.py 29 Oct 2003 06:52:24 -0000 1.2
***************
*** 20,23 ****
--- 20,24 ----
import posixpath
import re
+ import tempfile
from StringIO import StringIO
***************
*** 674,679 ****
module = self.getCVSModule()
# create the import directory
! #XXX not portable
! import_dir = "/tmp/RevisionManager-" + module.filename
os.mkdir(import_dir)
--- 675,680 ----
module = self.getCVSModule()
# create the import directory
! # portability patch via nl...@sf...
! import_dir = os.path.join(tempfile.gettempdir(),"RevisionManager-" + module.filename)
os.mkdir(import_dir)
|
|
From: Philipp v. W. <ph...@we...> - 2003-10-28 10:51:47
|
Jim, > the TODO file in the pre-sf distribution mentions using apelib for > zodb<->fs synchronization. Apelib is new to me, but I spent some time > reviewing the code and docs, and gave it a spin on a windows 2k > machine. > > Do you have any details, notes, or examples to clarify the idea? What > are the weak points in the current synchronization model? How would > apelib reinforce those? Note that a) ape is still experimental software and b) integration into RevisionManager is a nice thought but was never a short-term goal. RevisionManager has to make a bridge between the ZODB and the filesystem. Zope objects reside in the ZODB, CVS can only operate on filesystem files. Therefore, RevisionManager synchronizes objects to the FS before every CVS action and synchronized the FS to objects after every CVS action. This can be very expensive with a lot of objects. The idea behind ape is that ZODB objects reside on the filesystem as standard files and special mappers map objects to files and viceversa. This works quite well for standard objects already. The RevisionManager scenario looks a bit different, though. Most of the time, you already have a (often large) folder sitting in the ZODB. So in this case, something like a bridge using apelib would have to be installed. An object-FS mapper with two storages (ZODB, Filesystem). Whatever storage provides a newer version of the object, gets the precedence. The other storage is synchronized automatically. That way, you save the expensive synchronization processes before and after every CVS action. Back when I thought about this, I emailed Shane Hathaway and he told me that it might be possible to do. I looked at apelib's code and understood about two thirds. As my time was limited and I'm not a ZODB wizard, I forgot the whole idea and concentrated on fixing bugs in the already quite stable RevisionManager. Another advantage apelib had at the time was that it supported property synchronization. I implemented my own, very simple property serializer and adapters for RevMan 1.3. Apelib still has the advantage of being able to synchronize any objects, even non-textual ones. I hope that cleared it up. I have wasted a few thoughts to some kind of RevManNG using apelib and subversion. However, I might shoot for Zope3 and its filesystem-synchronization features here. If anyone is willing to sponsor that or something else, I'd be available again :) Regards, Philipp |
|
From: Philipp v. W. <ph...@we...> - 2003-10-28 06:24:54
|
Arthur Chan Chi Chuen wrote: > Cool, > > I will fix it in the RevisionManager.py and put it in the changes.txt later. > > And I will keep the list comprehension. We really need unit tests. They would make life much easier... Philipp |
|
From: Arthur C. C. C. <ar...@so...> - 2003-10-28 03:27:27
|
Cool, I will fix it in the RevisionManager.py and put it in the changes.txt later. And I will keep the list comprehension. On Mon, 27 Oct 2003 08:56:45 +0100, Philipp von Weitershausen wrote > Arthur, > > (I'm CC-ing the developing list) > > > btw, I have a quick question about RM.py > > ***************************************** > > In addChildPaths(self, paths): > > I changed the following: > > > > for module_path in module_paths: > > if module_path.startswith(path+'/') and module_path not in all_paths: > > sub_paths.append( module_path) > > > > #sub_paths = [module_path for module_path in module_paths > > # if module_path.startswith(path+'/')] > > If your code fixes a problem, it should go in. However, I recommend > keeping the list comprehension. List comprehensions on large lists > are much faster than for loops. > > Philipp -- Open WebMail Project (http://openwebmail.org) |
|
From: Jim A. <jab...@wg...> - 2003-10-27 15:33:14
|
to Philipp: the TODO file in the pre-sf distribution mentions using apelib for = zodb<->fs synchronization. Apelib is new to me, but I spent some time reviewing the code and docs, = and gave it a spin on a windows 2k machine. Do you have any details, notes, or examples to clarify the idea? What = are the weak points in the current synchronization model? How would = apelib reinforce those? Jim |
|
From: Philipp v. W. <ph...@we...> - 2003-10-27 07:55:18
|
Arthur, (I'm CC-ing the developing list) > btw, I have a quick question about RM.py > ***************************************** > In addChildPaths(self, paths): > I changed the following: > > for module_path in module_paths: > if module_path.startswith(path+'/') and module_path not in all_paths: > sub_paths.append( module_path) > > #sub_paths = [module_path for module_path in module_paths > # if module_path.startswith(path+'/')] If your code fixes a problem, it should go in. However, I recommend keeping the list comprehension. List comprehensions on large lists are much faster than for loops. Philipp |