[Zope3-checkins] SVN: Zope3/trunk/src/zope/app/versioncontrol/
Attempt to make version control work as expected on Windows.
Fred L. Drake, Jr.
fdrake at gmail.com
Thu Sep 16 12:04:55 EDT 2004
Log message for revision 27550:
Attempt to make version control work as expected on Windows.
This avoids dropping bits from the object change information; see
http://collector.zope.org/Zope3-dev/280 for discussion.
Changed:
U Zope3/trunk/src/zope/app/versioncontrol/repository.py
U Zope3/trunk/src/zope/app/versioncontrol/utility.py
-=-
Modified: Zope3/trunk/src/zope/app/versioncontrol/repository.py
===================================================================
--- Zope3/trunk/src/zope/app/versioncontrol/repository.py 2004-09-16 14:10:48 UTC (rev 27549)
+++ Zope3/trunk/src/zope/app/versioncontrol/repository.py 2004-09-16 16:04:55 UTC (rev 27550)
@@ -119,7 +119,7 @@
# *after* the version bookkeeping was saved. Note that this method is
# not appropriate for detecting changes within a transaction!
info = self.getVersionInfo(object)
- itime = getattr(info, '_p_mtime', None)
+ itime = getattr(info, '_p_serial', None)
if itime is None:
return False
mtime = utility._findModificationTime(object)
Modified: Zope3/trunk/src/zope/app/versioncontrol/utility.py
===================================================================
--- Zope3/trunk/src/zope/app/versioncontrol/utility.py 2004-09-16 14:10:48 UTC (rev 27549)
+++ Zope3/trunk/src/zope/app/versioncontrol/utility.py 2004-09-16 16:04:55 UTC (rev 27550)
@@ -68,7 +68,7 @@
themselves version-controlled objects. Note that this will
return None if the object has no modification time."""
- mtime = getattr(object, '_p_mtime', None)
+ mtime = getattr(object, '_p_serial', None)
if mtime is None:
return None
@@ -81,7 +81,7 @@
oids=[object._p_oid]
done_oids={}
done=done_oids.has_key
- first = 1
+ first = True
while oids:
oid=oids[0]
@@ -92,13 +92,12 @@
try: p, serial = load(oid, version)
except: pass # invalid reference!
else:
- if first is not None:
- first = None
+ if first:
+ first = False
else:
if p.find('U\x0b__vc_info__') == -1:
- mtime = TimeStamp(serial).timeTime()
- if mtime > latest:
- latest = mtime
+ if serial > latest:
+ latest = serial
refs(p, oids)
return latest
More information about the Zope3-Checkins
mailing list