Commit d42f5311 authored by Jim Fulton's avatar Jim Fulton

Included locked version in version lock errors.

parent 2b0b4caf
...@@ -184,7 +184,7 @@ ...@@ -184,7 +184,7 @@
# may have a back pointer to a version record or to a non-version # may have a back pointer to a version record or to a non-version
# record. # record.
# #
__version__='$Revision: 1.26 $'[11:-2] __version__='$Revision: 1.27 $'[11:-2]
import struct, time, os, bpthread, string, base64, sys import struct, time, os, bpthread, string, base64, sys
from struct import pack, unpack from struct import pack, unpack
...@@ -496,11 +496,11 @@ class FileStorage(BaseStorage.BaseStorage): ...@@ -496,11 +496,11 @@ class FileStorage(BaseStorage.BaseStorage):
if doid != oid: raise CorruptedDataError, h if doid != oid: raise CorruptedDataError, h
if vlen: if vlen:
pnv=read(8) # non-version data pointer pnv=read(8) # non-version data pointer
if (len(version) != vlen or read(8) # skip past version link
(read(8) # skip past version link locked_version=read(vlen)
and version != read(vlen)) if version != locked_version:
): raise POSException.VersionLockError, (
raise POSException.VersionLockError, `oid` `oid`, locked_version)
if serial != oserial: raise POSException.ConflictError, ( if serial != oserial: raise POSException.ConflictError, (
serial, oserial) serial, oserial)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment