rem
stringlengths
1
322k
add
stringlengths
0
2.05M
context
stringlengths
4
228k
meta
stringlengths
156
215
ext = dumps(ext,1)
ext = cPickle.dumps(ext, 1)
def tpc_begin(self, transaction, tid=None, status=' '): if self._is_read_only: raise POSException.ReadOnlyError() self._lock_acquire() try: if self._transaction is transaction: return self._lock_release() self._commit_lock_acquire() self._lock_acquire() self._transaction = transaction self._clear_temp()
cf112582b09ef23459667d5eb1afbe62cf945377 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/10048/cf112582b09ef23459667d5eb1afbe62cf945377/BaseStorage.py
ext=""
ext = ""
def tpc_begin(self, transaction, tid=None, status=' '): if self._is_read_only: raise POSException.ReadOnlyError() self._lock_acquire() try: if self._transaction is transaction: return self._lock_release() self._commit_lock_acquire() self._lock_acquire() self._transaction = transaction self._clear_temp()
cf112582b09ef23459667d5eb1afbe62cf945377 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/10048/cf112582b09ef23459667d5eb1afbe62cf945377/BaseStorage.py
def testExceptionInTpcAbort(self):
e18d876c26f39b7264657c3248d7667276f00967 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/10048/e18d876c26f39b7264657c3248d7667276f00967/testTransaction.py
except TestTxnException: pass
except TestTxnException: pass
def testExceptionInTpcAbort(self):
e18d876c26f39b7264657c3248d7667276f00967 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/10048/e18d876c26f39b7264657c3248d7667276f00967/testTransaction.py
already_pickled=0):
already_pickled=0, user=None, description=None):
def _dostore(self, oid=None, revid=None, data=None, version=None, already_pickled=0): """Do a complete storage transaction. The defaults are: - oid=None, ask the storage for a new oid - revid=None, use a revid of ZERO - data=None, pickle up some arbitrary data (the integer 7) - version=None, use the empty string version Returns the object's new revision id. """ if oid is None: oid = self._storage.new_oid() if revid is None: revid = ZERO if data is None: data = MinPO(7) if type(data) == types.IntType: data = MinPO(data) if not already_pickled: data = zodb_pickle(data) if version is None: version = '' # Begin the transaction t = Transaction() self._storage.tpc_begin(t) # Store an object r1 = self._storage.store(oid, revid, data, version, t) # Finish the transaction r2 = self._storage.tpc_vote(t) self._storage.tpc_finish(t) return handle_serials(oid, r1, r2)
56b49f117c4a2e27c9f513c828032ea9b6f5f6f9 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/10048/56b49f117c4a2e27c9f513c828032ea9b6f5f6f9/StorageTestBase.py
truncate(f, pos, file_size, output)
truncate(f, pos, file_size, outp)
def read_txn_header(f, pos, file_size, outp, ltid): # Read the transaction record f.seek(pos) h = f.read(23) if len(h) < 23: raise EOFError tid, stl, status, ul, dl, el = unpack(">8s8scHHH",h) if el < 0: el=t32-el tl = u64(stl) if pos + (tl + 8) > file_size: error("bad transaction length at %s", pos) if tl < (23 + ul + dl + el): error("invalid transaction length, %s, at %s", tl, pos) if ltid and tid < ltid: error("time-stamp reducation %s < %s, at %s", u64(tid), u64(ltid), pos) if status == "c": truncate(f, pos, file_size, output) raise EOFError if status not in " up": error("invalid status, %r, at %s", status, pos) tpos = pos tend = tpos + tl if status == "u": # Undone transaction, skip it f.seek(tend) h = f.read(8) if h != stl: error("inconsistent transaction length at %s", pos) pos = tend + 8 return pos, None, tid pos = tpos+(23+ul+dl+el) user = f.read(ul) description = f.read(dl) if el: try: e=loads(f.read(el)) except: e={} else: e={} result = RecordIterator(tid, status, user, description, e, pos, tend, f, tpos) pos = tend # Read the (intentionally redundant) transaction length f.seek(pos) h = f.read(8) if h != stl: error("redundant transaction length check failed at %s", pos) pos += 8 return pos, result, tid
bb00230a211c762a48aa5cb735223c94452bd5c0 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/10048/bb00230a211c762a48aa5cb735223c94452bd5c0/fsrecover.py
print __doc__ % argv[0]
print __doc__ % sys.argv[0]
def main(): try: opts, (inp, outp) = getopt.getopt(sys.argv[1:], "fv:pP:") except getopt.error: die() print __doc__ % argv[0] force = partial = verbose = 0 pack = None for opt, v in opts: if opt == "-v": verbose = int(v) elif opt == "-p": partial = 1 elif opt == "-f": force = 1 elif opt == "-P": pack = time.time() - float(v) recover(inp, outp, verbose, partial, force, pack)
bb00230a211c762a48aa5cb735223c94452bd5c0 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/10048/bb00230a211c762a48aa5cb735223c94452bd5c0/fsrecover.py
prepare_ok = False
raise AbortError(r)
def commit(self, txn): # commit calls _finishCommit() or abort() assert txn._status is Status.ACTIVE txn._status = Status.PREPARING prepare_ok = True self.logger.debug("%s: prepare", txn) try: for r in txn._resources: if prepare_ok and not r.prepare(txn): prepare_ok = False except: txn._status = Status.FAILED raise txn._status = Status.PREPARED # XXX An error below is intolerable. What state to use? if prepare_ok: self._finishCommit(txn) else: self.abort(txn)
fbc8326d16094b1c5281d42c2bcf4f150c2b854f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/10048/fbc8326d16094b1c5281d42c2bcf4f150c2b854f/manager.py
if prepare_ok: self._finishCommit(txn) else: self.abort(txn)
self._finishCommit(txn)
def commit(self, txn): # commit calls _finishCommit() or abort() assert txn._status is Status.ACTIVE txn._status = Status.PREPARING prepare_ok = True self.logger.debug("%s: prepare", txn) try: for r in txn._resources: if prepare_ok and not r.prepare(txn): prepare_ok = False except: txn._status = Status.FAILED raise txn._status = Status.PREPARED # XXX An error below is intolerable. What state to use? if prepare_ok: self._finishCommit(txn) else: self.abort(txn)
fbc8326d16094b1c5281d42c2bcf4f150c2b854f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/10048/fbc8326d16094b1c5281d42c2bcf4f150c2b854f/manager.py
return Rollback([r.savepoint(txn) for r in txn._resources])
return Rollback(txn, [r.savepoint(txn) for r in txn._resources])
def savepoint(self, txn): self.logger.debug("%s: savepoint", txn) return Rollback([r.savepoint(txn) for r in txn._resources])
fbc8326d16094b1c5281d42c2bcf4f150c2b854f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/10048/fbc8326d16094b1c5281d42c2bcf4f150c2b854f/manager.py
txn_factory = Transaction
def savepoint(self, txn): self.logger.debug("%s: savepoint", txn) return Rollback([r.savepoint(txn) for r in txn._resources])
fbc8326d16094b1c5281d42c2bcf4f150c2b854f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/10048/fbc8326d16094b1c5281d42c2bcf4f150c2b854f/manager.py
txn = self.txn_factory(self) self.logger.debug("%s: begin", txn) return txn
if self._current is not None: self._current.abort() self._current = self.txn_factory(self) self.logger.debug("%s: begin", self._current) return self._current
def begin(self): txn = self.txn_factory(self) self.logger.debug("%s: begin", txn) return txn
fbc8326d16094b1c5281d42c2bcf4f150c2b854f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/10048/fbc8326d16094b1c5281d42c2bcf4f150c2b854f/manager.py
def suspend(self, txn): if self._current != txn: raise TransactionError("Can't suspend transaction because " "it is not active") self._suspended.add(txn) self._current = None
def abort(self, txn): super(TransactionManager, self).abort(txn) self._current = None
fbc8326d16094b1c5281d42c2bcf4f150c2b854f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/10048/fbc8326d16094b1c5281d42c2bcf4f150c2b854f/manager.py
def __init__(self, resources):
def __init__(self, txn, resources): self._txn = txn
def __init__(self, resources): self._resources = resources
fbc8326d16094b1c5281d42c2bcf4f150c2b854f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/10048/fbc8326d16094b1c5281d42c2bcf4f150c2b854f/manager.py
if self._pool[tid] is txn:
if self._pool.get(tid) is txn:
def suspend(self, txn): tid = thread.get_ident() if self._pool[tid] is txn: self._suspend.add(txn) del self._pool[tid] else: raise TransactionError("txn %s not owned by thread %s" % (txn, tid))
fbc8326d16094b1c5281d42c2bcf4f150c2b854f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/10048/fbc8326d16094b1c5281d42c2bcf4f150c2b854f/manager.py
close(self._f[current])
self._f[current].close()
def checkSize(self, size): # Make sure we aren't going to exceed the target size. # If we are, then flip the cache. if self._pos+size > self._limit: current=not self._current self._current=current if self._p[current] is not None: # Persistent cache file: # Note that due to permission madness, waaa, # we need to remove the old file before # we open the new one. Waaaaaaaaaa. if self._f[current] is not None: close(self._f[current]) try: os.remove(self._p[current]) except: pass self._f[current]=open(self._p[current],'w+b') else: # Temporary cache file: self._f[current] = tempfile.TemporaryFile(suffix='.zec') self._f[current].write(magic) self._pos=pos=4
59983c089a052a0f5e7f61263a3d34cfad806045 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/10048/59983c089a052a0f5e7f61263a3d34cfad806045/ClientCache.py
transaction_id = base64.decodestring(transaction_id + '==\n') tid, tpos = transaction_id[:8], U64(transaction_id[8:])
tid = transaction_id[:8] oid = transaction_id[8:] if oid == '' or not self._index.has_key(oid): raise UndoError, 'Undoing a non-object affecting transaction' pos = self._index[oid]
def transactionalUndo(self, transaction_id, transaction): """Undo a transaction, given by transaction_id.
606639c4e5cffab1a4e8d25df6976c1eb540036e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/10048/606639c4e5cffab1a4e8d25df6976c1eb540036e/FileStorage.py
while 1: self._file.seek(pos) h = self._file.read(DATA_HDR_LEN) doid,serial,prev,tpos,vlen,plen = unpack('>8s8s8s8sH8s', h) tpos = U64(tpos) self._file.seek(tpos) thistid = self._file.read(8) if thistid == tid: break pos = U64(prev) if not pos: raise UndoError, 'Invalid undo transaction id'
def transactionalUndo(self, transaction_id, transaction): """Undo a transaction, given by transaction_id.
606639c4e5cffab1a4e8d25df6976c1eb540036e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/10048/606639c4e5cffab1a4e8d25df6976c1eb540036e/FileStorage.py
if last < 0: last=first-last+1
if last < 0: last=first-last+1
def undoLog(self, first=0, last=-20, filter=None): if last < 0: last=first-last+1 self._lock_acquire() try: packt=self._packt if packt is None: raise UndoError( 'Undo is currently disabled for database maintenance.<p>') pos=self._pos if pos < 39: return [] file=self._file seek=file.seek read=file.read unpack=struct.unpack strip=string.strip encode=base64.encodestring r=[] append=r.append i=0 while i < last and pos > 39: seek(pos-8) pos=pos-U64(read(8))-8 seek(pos) h=read(TRANS_HDR_LEN) tid, tl, status, ul, dl, el = unpack(">8s8scHHH", h) if tid < packt: break if status != ' ': continue u=ul and read(ul) or '' d=dl and read(dl) or '' d={'id': encode(tid+p64(pos))[:22], 'time': TimeStamp(tid).timeTime(), 'user_name': u, 'description': d} if el: try: e=loads(read(el)) d.update(e) except: pass if filter is None or filter(d): if i >= first: append(d) i=i+1 return r finally: self._lock_release()
606639c4e5cffab1a4e8d25df6976c1eb540036e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/10048/606639c4e5cffab1a4e8d25df6976c1eb540036e/FileStorage.py
packt=self._packt
packt = self._packt
def undoLog(self, first=0, last=-20, filter=None): if last < 0: last=first-last+1 self._lock_acquire() try: packt=self._packt if packt is None: raise UndoError( 'Undo is currently disabled for database maintenance.<p>') pos=self._pos if pos < 39: return [] file=self._file seek=file.seek read=file.read unpack=struct.unpack strip=string.strip encode=base64.encodestring r=[] append=r.append i=0 while i < last and pos > 39: seek(pos-8) pos=pos-U64(read(8))-8 seek(pos) h=read(TRANS_HDR_LEN) tid, tl, status, ul, dl, el = unpack(">8s8scHHH", h) if tid < packt: break if status != ' ': continue u=ul and read(ul) or '' d=dl and read(dl) or '' d={'id': encode(tid+p64(pos))[:22], 'time': TimeStamp(tid).timeTime(), 'user_name': u, 'description': d} if el: try: e=loads(read(el)) d.update(e) except: pass if filter is None or filter(d): if i >= first: append(d) i=i+1 return r finally: self._lock_release()
606639c4e5cffab1a4e8d25df6976c1eb540036e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/10048/606639c4e5cffab1a4e8d25df6976c1eb540036e/FileStorage.py
if pos < 39: return []
if pos < 39: return []
def undoLog(self, first=0, last=-20, filter=None): if last < 0: last=first-last+1 self._lock_acquire() try: packt=self._packt if packt is None: raise UndoError( 'Undo is currently disabled for database maintenance.<p>') pos=self._pos if pos < 39: return [] file=self._file seek=file.seek read=file.read unpack=struct.unpack strip=string.strip encode=base64.encodestring r=[] append=r.append i=0 while i < last and pos > 39: seek(pos-8) pos=pos-U64(read(8))-8 seek(pos) h=read(TRANS_HDR_LEN) tid, tl, status, ul, dl, el = unpack(">8s8scHHH", h) if tid < packt: break if status != ' ': continue u=ul and read(ul) or '' d=dl and read(dl) or '' d={'id': encode(tid+p64(pos))[:22], 'time': TimeStamp(tid).timeTime(), 'user_name': u, 'description': d} if el: try: e=loads(read(el)) d.update(e) except: pass if filter is None or filter(d): if i >= first: append(d) i=i+1 return r finally: self._lock_release()
606639c4e5cffab1a4e8d25df6976c1eb540036e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/10048/606639c4e5cffab1a4e8d25df6976c1eb540036e/FileStorage.py
if tid < packt: break if status != ' ': continue
if tid < packt: break if status != ' ': continue
def undoLog(self, first=0, last=-20, filter=None): if last < 0: last=first-last+1 self._lock_acquire() try: packt=self._packt if packt is None: raise UndoError( 'Undo is currently disabled for database maintenance.<p>') pos=self._pos if pos < 39: return [] file=self._file seek=file.seek read=file.read unpack=struct.unpack strip=string.strip encode=base64.encodestring r=[] append=r.append i=0 while i < last and pos > 39: seek(pos-8) pos=pos-U64(read(8))-8 seek(pos) h=read(TRANS_HDR_LEN) tid, tl, status, ul, dl, el = unpack(">8s8scHHH", h) if tid < packt: break if status != ' ': continue u=ul and read(ul) or '' d=dl and read(dl) or '' d={'id': encode(tid+p64(pos))[:22], 'time': TimeStamp(tid).timeTime(), 'user_name': u, 'description': d} if el: try: e=loads(read(el)) d.update(e) except: pass if filter is None or filter(d): if i >= first: append(d) i=i+1 return r finally: self._lock_release()
606639c4e5cffab1a4e8d25df6976c1eb540036e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/10048/606639c4e5cffab1a4e8d25df6976c1eb540036e/FileStorage.py
d={'id': encode(tid+p64(pos))[:22],
e = {} if el: try: e = loads(read(el)) except: pass next = read(8) if next == tl: id = tid else: id = tid + next d={'id': id,
def undoLog(self, first=0, last=-20, filter=None): if last < 0: last=first-last+1 self._lock_acquire() try: packt=self._packt if packt is None: raise UndoError( 'Undo is currently disabled for database maintenance.<p>') pos=self._pos if pos < 39: return [] file=self._file seek=file.seek read=file.read unpack=struct.unpack strip=string.strip encode=base64.encodestring r=[] append=r.append i=0 while i < last and pos > 39: seek(pos-8) pos=pos-U64(read(8))-8 seek(pos) h=read(TRANS_HDR_LEN) tid, tl, status, ul, dl, el = unpack(">8s8scHHH", h) if tid < packt: break if status != ' ': continue u=ul and read(ul) or '' d=dl and read(dl) or '' d={'id': encode(tid+p64(pos))[:22], 'time': TimeStamp(tid).timeTime(), 'user_name': u, 'description': d} if el: try: e=loads(read(el)) d.update(e) except: pass if filter is None or filter(d): if i >= first: append(d) i=i+1 return r finally: self._lock_release()
606639c4e5cffab1a4e8d25df6976c1eb540036e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/10048/606639c4e5cffab1a4e8d25df6976c1eb540036e/FileStorage.py
'user_name': u, 'description': d} if el: try: e=loads(read(el)) d.update(e) except: pass
'user_name': u, 'description': d} d.update(e)
def undoLog(self, first=0, last=-20, filter=None): if last < 0: last=first-last+1 self._lock_acquire() try: packt=self._packt if packt is None: raise UndoError( 'Undo is currently disabled for database maintenance.<p>') pos=self._pos if pos < 39: return [] file=self._file seek=file.seek read=file.read unpack=struct.unpack strip=string.strip encode=base64.encodestring r=[] append=r.append i=0 while i < last and pos > 39: seek(pos-8) pos=pos-U64(read(8))-8 seek(pos) h=read(TRANS_HDR_LEN) tid, tl, status, ul, dl, el = unpack(">8s8scHHH", h) if tid < packt: break if status != ' ': continue u=ul and read(ul) or '' d=dl and read(dl) or '' d={'id': encode(tid+p64(pos))[:22], 'time': TimeStamp(tid).timeTime(), 'user_name': u, 'description': d} if el: try: e=loads(read(el)) d.update(e) except: pass if filter is None or filter(d): if i >= first: append(d) i=i+1 return r finally: self._lock_release()
606639c4e5cffab1a4e8d25df6976c1eb540036e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/10048/606639c4e5cffab1a4e8d25df6976c1eb540036e/FileStorage.py
if i >= first: append(d)
if i >= first: append(d)
def undoLog(self, first=0, last=-20, filter=None): if last < 0: last=first-last+1 self._lock_acquire() try: packt=self._packt if packt is None: raise UndoError( 'Undo is currently disabled for database maintenance.<p>') pos=self._pos if pos < 39: return [] file=self._file seek=file.seek read=file.read unpack=struct.unpack strip=string.strip encode=base64.encodestring r=[] append=r.append i=0 while i < last and pos > 39: seek(pos-8) pos=pos-U64(read(8))-8 seek(pos) h=read(TRANS_HDR_LEN) tid, tl, status, ul, dl, el = unpack(">8s8scHHH", h) if tid < packt: break if status != ' ': continue u=ul and read(ul) or '' d=dl and read(dl) or '' d={'id': encode(tid+p64(pos))[:22], 'time': TimeStamp(tid).timeTime(), 'user_name': u, 'description': d} if el: try: e=loads(read(el)) d.update(e) except: pass if filter is None or filter(d): if i >= first: append(d) i=i+1 return r finally: self._lock_release()
606639c4e5cffab1a4e8d25df6976c1eb540036e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/10048/606639c4e5cffab1a4e8d25df6976c1eb540036e/FileStorage.py
def undoLog(self, first=0, last=-20, filter=None): if last < 0: last=first-last+1 self._lock_acquire() try: packt=self._packt if packt is None: raise UndoError( 'Undo is currently disabled for database maintenance.<p>') pos=self._pos if pos < 39: return [] file=self._file seek=file.seek read=file.read unpack=struct.unpack strip=string.strip encode=base64.encodestring r=[] append=r.append i=0 while i < last and pos > 39: seek(pos-8) pos=pos-U64(read(8))-8 seek(pos) h=read(TRANS_HDR_LEN) tid, tl, status, ul, dl, el = unpack(">8s8scHHH", h) if tid < packt: break if status != ' ': continue u=ul and read(ul) or '' d=dl and read(dl) or '' d={'id': encode(tid+p64(pos))[:22], 'time': TimeStamp(tid).timeTime(), 'user_name': u, 'description': d} if el: try: e=loads(read(el)) d.update(e) except: pass if filter is None or filter(d): if i >= first: append(d) i=i+1 return r finally: self._lock_release()
606639c4e5cffab1a4e8d25df6976c1eb540036e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/10048/606639c4e5cffab1a4e8d25df6976c1eb540036e/FileStorage.py
finally: self._lock_release()
finally: self._lock_release()
def undoLog(self, first=0, last=-20, filter=None): if last < 0: last=first-last+1 self._lock_acquire() try: packt=self._packt if packt is None: raise UndoError( 'Undo is currently disabled for database maintenance.<p>') pos=self._pos if pos < 39: return [] file=self._file seek=file.seek read=file.read unpack=struct.unpack strip=string.strip encode=base64.encodestring r=[] append=r.append i=0 while i < last and pos > 39: seek(pos-8) pos=pos-U64(read(8))-8 seek(pos) h=read(TRANS_HDR_LEN) tid, tl, status, ul, dl, el = unpack(">8s8scHHH", h) if tid < packt: break if status != ' ': continue u=ul and read(ul) or '' d=dl and read(dl) or '' d={'id': encode(tid+p64(pos))[:22], 'time': TimeStamp(tid).timeTime(), 'user_name': u, 'description': d} if el: try: e=loads(read(el)) d.update(e) except: pass if filter is None or filter(d): if i >= first: append(d) i=i+1 return r finally: self._lock_release()
606639c4e5cffab1a4e8d25df6976c1eb540036e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/10048/606639c4e5cffab1a4e8d25df6976c1eb540036e/FileStorage.py
oid=object._p_oid __traceback_info__=oid p, serial = self._storage.load(oid, self._version) file=StringIO(p) unpickler=Unpickler(file) unpickler.persistent_load=self._persistent_load copy = unpickler.load() klass, args = copy if klass is not ExtensionKlass: LOG('ZODB',ERROR, "Unexpected klass when setting class state on %s" % getattr(object,'__name__','(?)')) return copy=apply(klass,args) object.__dict__.clear() object.__dict__.update(copy.__dict__) object._p_oid=oid object._p_jar=self object._p_changed=None object._p_serial=serial
try: oid=object._p_oid __traceback_info__=oid p, serial = self._storage.load(oid, self._version) file=StringIO(p) unpickler=Unpickler(file) unpickler.persistent_load=self._persistent_load copy = unpickler.load() klass, args = copy if klass is not ExtensionKlass: LOG('ZODB',ERROR, "Unexpected klass when setting class state on %s" % getattr(object,'__name__','(?)')) return copy=apply(klass,args) object.__dict__.clear() object.__dict__.update(copy.__dict__) object._p_oid=oid object._p_jar=self object._p_changed=0 object._p_serial=serial except: LOG('ZODB',ERROR, 'setklassstate failed', error=sys.exc_info) raise
def setklassstate(self, object, tt=type(()), ct=type(HelperClass)): oid=object._p_oid __traceback_info__=oid p, serial = self._storage.load(oid, self._version) file=StringIO(p) unpickler=Unpickler(file) unpickler.persistent_load=self._persistent_load
4654bb13d8b062ee052c5ce506d710b34d307e1f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/10048/4654bb13d8b062ee052c5ce506d710b34d307e1f/Connection.py
print modulename, classname
def find_global(modulename, classname): """Helper for this test suite to get special PersistentMapping""" print modulename, classname if classname == "PersistentMapping": class PersistentMapping: def __setstate__(self, state): self.__dict__.update(state) return PersistentMapping else: __import__(modulename) mod = sys.modules[modulename] return getattr(mod, classname)
bec1498db12847ad1f883e74de7550f096c13678 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/10048/bec1498db12847ad1f883e74de7550f096c13678/testPersistentMapping.py
def log(message, level=zLOG.INFO, label="StorageServer:%s" % os.getpid(), error=None): zLOG.LOG(label, level, message, error=error)
_label = "ZSS" def set_label(): global _label _label = "ZSS:%s" % os.getpid() def log(message, level=zLOG.INFO, label=None, error=None): zLOG.LOG(label or _label, level, message, error=error)
def log(message, level=zLOG.INFO, label="StorageServer:%s" % os.getpid(), error=None): zLOG.LOG(label, level, message, error=error)
b65ac5ca69f921a61a6c92be02c15bb88f981bfb /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/10048/b65ac5ca69f921a61a6c92be02c15bb88f981bfb/StorageServer.py
def _log(self, msg, level=zLOG.INFO, error=None, pid=os.getpid()):
def _log(self, msg, level=zLOG.INFO, error=None):
def _log(self, msg, level=zLOG.INFO, error=None, pid=os.getpid()): name = getattr(self.__storage, '__name__', None) if name is None: name = str(self.__storage) zLOG.LOG("ZEOStorage:%s:%s" % (pid, name), level, msg, error=error)
b65ac5ca69f921a61a6c92be02c15bb88f981bfb /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/10048/b65ac5ca69f921a61a6c92be02c15bb88f981bfb/StorageServer.py
zLOG.LOG("ZEOStorage:%s:%s" % (pid, name), level, msg, error=error)
zLOG.LOG("%s:%s" % (_label, name), level, msg, error=error)
def _log(self, msg, level=zLOG.INFO, error=None, pid=os.getpid()): name = getattr(self.__storage, '__name__', None) if name is None: name = str(self.__storage) zLOG.LOG("ZEOStorage:%s:%s" % (pid, name), level, msg, error=error)
b65ac5ca69f921a61a6c92be02c15bb88f981bfb /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/10048/b65ac5ca69f921a61a6c92be02c15bb88f981bfb/StorageServer.py
def new_oids(self, n=100): """Return a sequence of n new oids, where n defaults to 100""" if n <= 0: # Always return at least one n = 1 return [self.__storage.new_oid() for i in range(n)]
b65ac5ca69f921a61a6c92be02c15bb88f981bfb /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/10048/b65ac5ca69f921a61a6c92be02c15bb88f981bfb/StorageServer.py
os.unlink(path)
need_to_delete = 1 for dummy in range(5): try: os.unlink(path) except: time.sleep(0.5) else: need_to_delete = 0 break if need_to_delete: os.unlink(path)
def tearDown(self): """Try to cause the tests to halt""" zLOG.LOG("testZEO", zLOG.INFO, "tearDown() %s" % self.id()) for p in self.conf_paths: os.remove(p) if getattr(self, '_storage', None) is not None: self._storage.close() if hasattr(self._storage, 'cleanup'): self._storage.cleanup() for adminaddr in self._servers: if adminaddr is not None: forker.shutdown_zeo_server(adminaddr) if hasattr(os, 'waitpid'): # Not in Windows Python until 2.3 for pid in self._pids: os.waitpid(pid, 0) for c in self.caches: for i in 0, 1: path = "c1-%s-%d.zec" % (c, i) if os.path.exists(path): os.unlink(path) self.__super_tearDown()
fa0327cdc5d1ba5aaa3250abf756462af57ae483 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/10048/fa0327cdc5d1ba5aaa3250abf756462af57ae483/ConnectionTests.py
def open(self, version='', transaction=None, temporary=0, force=None, waitflag=1, mvcc=True, txn_mgr=None, synch=True): """Return a database Connection for use by application code.
516183b5448db1aa401616599c1141cbda0d1be5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/10048/516183b5448db1aa401616599c1141cbda0d1be5/DB.py
elif len(pool) == 1:
elif len(pool)==1:
def open(self, version='', transaction=None, temporary=0, force=None, waitflag=1, mvcc=True, txn_mgr=None, synch=True): """Return a database Connection for use by application code.
516183b5448db1aa401616599c1141cbda0d1be5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/10048/516183b5448db1aa401616599c1141cbda0d1be5/DB.py
def open(self, version='', transaction=None, temporary=0, force=None, waitflag=1, mvcc=True, txn_mgr=None, synch=True): """Return a database Connection for use by application code.
516183b5448db1aa401616599c1141cbda0d1be5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/10048/516183b5448db1aa401616599c1141cbda0d1be5/DB.py
pool_lock.acquire()
if not pool_lock.acquire(0): result = DB.open(self, version, transaction, temporary, force, waitflag) self._a() return result
def open(self, version='', transaction=None, temporary=0, force=None, waitflag=1, mvcc=True, txn_mgr=None, synch=True): """Return a database Connection for use by application code.
516183b5448db1aa401616599c1141cbda0d1be5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/10048/516183b5448db1aa401616599c1141cbda0d1be5/DB.py
c = pool[-1] del pool[-1]
c = pool.pop()
def open(self, version='', transaction=None, temporary=0, force=None, waitflag=1, mvcc=True, txn_mgr=None, synch=True): """Return a database Connection for use by application code.
516183b5448db1aa401616599c1141cbda0d1be5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/10048/516183b5448db1aa401616599c1141cbda0d1be5/DB.py
finally: self._r()
finally: self._r()
def open(self, version='', transaction=None, temporary=0, force=None, waitflag=1, mvcc=True, txn_mgr=None, synch=True): """Return a database Connection for use by application code.
516183b5448db1aa401616599c1141cbda0d1be5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/10048/516183b5448db1aa401616599c1141cbda0d1be5/DB.py
import zLog.MinimalLogger zLog.MinimalLogger._log.initialize()
import zLOG.MinimalLogger zLOG.MinimalLogger._log.initialize()
def rotate_logs(): import zLOG # There hasn't been a clear way to reinitialize the MinimalLogger. # I'll checkin the public initialize() method soon, but also try some # other strategies for older Zope installs :-(. init = getattr(zLOG, 'initialize', None) if init is not None: init() return # This will work if the minimal logger is in use, but not if some # other logger is active. import zLog.MinimalLogger zLog.MinimalLogger._log.initialize()
ad343515bb9017141674134341d90d37f5b8be36 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/10048/ad343515bb9017141674134341d90d37f5b8be36/start.py
"pwd module is not available." % uid))
"pwd module is not available." % arg))
def set_uid(arg): """Try to set uid and gid based on -u argument. This will only work if this script is run by root. """ try: import pwd except ImportError: LOG('ZEO/start.py', INFO, ("Can't set uid to %s." "pwd module is not available." % uid)) return try: gid = None try: arg = int(arg) except: # conversion could raise all sorts of errors uid = pwd.getpwnam(arg)[2] gid = pwd.getpwnam(arg)[3] else: uid = pwd.getpwuid(arg)[2] gid = pwd.getpwuid(arg)[3] if gid is not None: try: os.setgid(gid) except OSError: pass try: os.setuid(uid) except OSError: pass except KeyError: LOG('ZEO/start.py', ERROR, ("can't find uid %s" % arg))
1e0ce96972a1788780c69434f9a213b11cd509d0 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/10048/1e0ce96972a1788780c69434f9a213b11cd509d0/start.py
self.__has_mac = True
self.__has_mac = 0
def __init__(self, sock, addr, map=None, debug=None): self.addr = addr if debug is not None: self._debug = debug elif not hasattr(self, '_debug'): self._debug = __debug__ # __input_lock protects __inp, __input_len, __state, __msg_size self.__input_lock = threading.Lock() self.__inp = None # None, a single String, or a list self.__input_len = 0 # Instance variables __state, __msg_size and __has_mac work together: # when __state == 0: # __msg_size == 4, and the next thing read is a message size; # __has_mac is set according to the MAC_BIT in the header # when __state == 1: # __msg_size is variable, and the next thing read is a message. # __has_mac indicates if we're in MAC mode or not (and # therefore, if we need to check the mac header) # The next thing read is always of length __msg_size. # The state alternates between 0 and 1. self.__state = 0 self.__has_mac = True self.__msg_size = 4 self.__output_lock = threading.Lock() # Protects __output self.__output = [] self.__closed = 0 # Each side of the connection sends and receives messages. A # MAC is generated for each message and depends on each # previous MAC; the state of the MAC generator depends on the # history of operations it has performed. So the MACs must be # generated in the same order they are verified.
5134ece85e40fad58c3ad776be545d623afcee4f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/10048/5134ece85e40fad58c3ad776be545d623afcee4f/smac.py
resouces. The only works under Unix, and if ZServer is started by root.
resouces. The only works under Unix, and if the storage server is started by root.
def main(argv): me=argv[0] sys.path[:]==filter(None, sys.path) sys.path.insert(0, directory(me, 2)) args=[] last='' for a in argv[1:]: if (a[:1] != '-' and string.find(a, '=') > 0 and last != '-S' # lame, sorry ): a=string.split(a,'=') os.environ[a[0]]=string.join(a[1:],'=') continue args.append(a) last=a INSTANCE_HOME=os.environ.get('INSTANCE_HOME', directory(me, 4)) zeo_pid=os.environ.get('ZEO_SERVER_PID', os.path.join(INSTANCE_HOME, 'var', 'ZEO_SERVER.pid') ) opts, args = getopt.getopt(args, 'p:Dh:U:sS:u:') fs=os.path.join(INSTANCE_HOME, 'var', 'Data.fs') usage="""%s [options] [filename] where options are: -D -- Run in debug mode -U -- Unix-domain socket file to listen on -u username or uid number The username to run the ZEO server as. You may want to run the ZEO server as 'nobody' or some other user with limited resouces. The only works under Unix, and if ZServer is started by root. -p port -- port to listen on -h adddress -- host address to listen on -s -- Don't use zdeamon -S storage_name=module_path:attr_name -- A storage specification where: storage_name -- is the storage name used in the ZEO protocol. This is the name that you give as the optional 'storage' keyword argument to the ClientStorage constructor. module_path -- This is the path to a Python module that defines the storage object(s) to be served. The module path should ommit the prefix (e.g. '.py'). attr_name -- This is the name to which the storage object is assigned in the module. if no file name is specified, then %s is used. """ % (me, fs) port=None debug=0 host='' unix=None Z=1 UID='nobody' for o, v in opts: if o=='-p': port=string.atoi(v) elif o=='-h': host=v elif o=='-U': unix=v elif o=='-u': UID=v elif o=='-D': debug=1 elif o=='-s': Z=0 try: from ZServer.medusa import asyncore sys.modules['asyncore']=asyncore except: pass if port is None and unix is None: print usage print 'No port specified.' sys.exit(1) if args: if len(args) > 1: print usage print 'Unrecognizd arguments: ', string.join(args[1:]) sys.exit(1) fs=args[0] __builtins__.__debug__=debug if debug: os.environ['Z_DEBUG_MODE']='1' from zLOG import LOG, INFO, ERROR # Try to set uid to "-u" -provided uid. # Try to set gid to "-u" user's primary group. # This will only work if this script is run by root. try: import pwd try: try: UID=string.atoi(UID) except: pass gid = None if type(UID) == type(""): uid = pwd.getpwnam(UID)[2] gid = pwd.getpwnam(UID)[3] elif type(UID) == type(1): uid = pwd.getpwuid(UID)[2] gid = pwd.getpwuid(UID)[3] else: raise KeyError try: if gid is not None: try: os.setgid(gid) except OSError: pass os.setuid(uid) except OSError: pass except KeyError: LOG('ZEO Server', ERROR, ("can't find UID %s" % UID)) except: pass if Z: try: import posix except: pass else: import zdaemon zdaemon.run(sys.argv, '') import ZEO.StorageServer, asyncore storages={} for o, v in opts: if o=='-S': n, m = string.split(v,'=') if string.find(m,':'): # we got an attribute name m, a = string.split(m,':') else: # attribute name must be same as storage name a=n storages[n]=get_storage(m,a) if not storages: import ZODB.FileStorage storages['1']=ZODB.FileStorage.FileStorage(fs) # Try to set up a signal handler try: import signal signal.signal(signal.SIGTERM, lambda sig, frame, s=storages: shutdown(s) ) signal.signal(signal.SIGINT, lambda sig, frame, s=storages: shutdown(s, 0) ) signal.signal(signal.SIGHUP, rotate_logs_handler) finally: pass items=storages.items() items.sort() for kv in items: LOG('ZEO Server', INFO, 'Serving %s:\t%s' % kv) if not unix: unix=host, port ZEO.StorageServer.StorageServer(unix, storages) open(zeo_pid,'w').write("%s %s" % (os.getppid(), os.getpid())) asyncore.loop()
1cc1e605588712d8d9670e699b255f31dd072ca2 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/10048/1cc1e605588712d8d9670e699b255f31dd072ca2/start.py
and call it to minotor the storage.
and call it to monitor the storage.
def info(RESPONSE): RESPONSE['Content-type']= 'text/plain'
5f48194f0adf628155c6138a3fcde59d9ea65eb6 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/10048/5f48194f0adf628155c6138a3fcde59d9ea65eb6/DemoStorage.py
__version__='$Revision: 1.6 $'[11:-2] import base64, POSException, BTree, BaseStorage, time, string, utils
__version__='$Revision: 1.7 $'[11:-2] import base64, time, string from ZODB import POSException, BaseStorage, utils
def info(RESPONSE): RESPONSE['Content-type']= 'text/plain'
5f48194f0adf628155c6138a3fcde59d9ea65eb6 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/10048/5f48194f0adf628155c6138a3fcde59d9ea65eb6/DemoStorage.py
self._data=BTree.BTree()
self._data=OOBTree.OOBTree()
def __init__(self, name='Demo Storage', base=None, quota=None):
5f48194f0adf628155c6138a3fcde59d9ea65eb6 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/10048/5f48194f0adf628155c6138a3fcde59d9ea65eb6/DemoStorage.py
tindex.append([oid, serial, r, None, p])
if dest: new_vdata = dest, vdata[1] else: new_vdata = None tindex.append([oid, serial, r, new_vdata, p])
def commitVersion(self, src, dest, transaction): if transaction is not self._transaction: raise POSException.StorageTransactionError(self, transaction) self._lock_acquire() try: v=self._vindex.get(src, None) if v is None: return tindex=self._tindex oids=[] for r in v.values(): oid, serial, pre, vdata, p = r oids.append(oid) tindex.append([oid, serial, r, None, p])
5f48194f0adf628155c6138a3fcde59d9ea65eb6 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/10048/5f48194f0adf628155c6138a3fcde59d9ea65eb6/DemoStorage.py
try: oid, serial, pre, vdata, p = self._index[oid] except: if self._base: return self._base.load(oid, '')
try: oid, serial, pre, vdata, p = self._index[oid] except KeyError: if self._base: return self._base.load(oid, '')
def load(self, oid, version): self._lock_acquire() try: try: oid, serial, pre, vdata, p = self._index[oid] except: if self._base: return self._base.load(oid, '') raise KeyError, oid
5f48194f0adf628155c6138a3fcde59d9ea65eb6 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/10048/5f48194f0adf628155c6138a3fcde59d9ea65eb6/DemoStorage.py
if nv: oid, serial, pre, vdata, p = nv else: raise KeyError, oid if p is None: raise KeyError, oid
if nv: oid, serial, pre, vdata, p = nv else: raise KeyError, oid if p is None: raise KeyError, oid
def load(self, oid, version): self._lock_acquire() try: try: oid, serial, pre, vdata, p = self._index[oid] except: if self._base: return self._base.load(oid, '') raise KeyError, oid
5f48194f0adf628155c6138a3fcde59d9ea65eb6 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/10048/5f48194f0adf628155c6138a3fcde59d9ea65eb6/DemoStorage.py
r=[oid, serial, old, version and (version,nv) or None, data]
r=[oid, serial, old, version and (version, nv) or None, data]
def store(self, oid, serial, data, version, transaction): if transaction is not self._transaction: raise POSException.StorageTransactionError(self, transaction)
5f48194f0adf628155c6138a3fcde59d9ea65eb6 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/10048/5f48194f0adf628155c6138a3fcde59d9ea65eb6/DemoStorage.py
if s > self._quota:
if self._quota is not None and s > self._quota:
def store(self, oid, serial, data, version, transaction): if transaction is not self._transaction: raise POSException.StorageTransactionError(self, transaction)
5f48194f0adf628155c6138a3fcde59d9ea65eb6 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/10048/5f48194f0adf628155c6138a3fcde59d9ea65eb6/DemoStorage.py
r=[] a=r.append for version in self._vindex.keys()[:max]: if self.versionEmpty(version): continue a(version) if max and len(r) >= max: return r
r = [] for v in self._vindex.keys(): if self.versionEmpty(v): continue r.append(v) if max is not None and len(r) >= max: break
def versions(self, max=None): r=[] a=r.append for version in self._vindex.keys()[:max]: if self.versionEmpty(version): continue a(version) if max and len(r) >= max: return r
5f48194f0adf628155c6138a3fcde59d9ea65eb6 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/10048/5f48194f0adf628155c6138a3fcde59d9ea65eb6/DemoStorage.py
if ((invalid(oid) and not hasattr(object, '_p_resolveConflict')) or invalid(None)):
if invalid(oid) and not hasattr(object, '_p_resolveConflict'):
def commit(self, object, transaction): if object is self: # We registered ourself. Execute a commit action, if any. if self.__onCommitActions is not None: method_name, args, kw = self.__onCommitActions.pop(0) apply(getattr(self, method_name), (transaction,) + args, kw) return oid = object._p_oid invalid = self._invalid if oid is None or object._p_jar is not self: # new object oid = self.new_oid() object._p_jar = self object._p_oid = oid self._creating.append(oid)
3864625806d3ff7ef2c87394f31ee0a6fa94234f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/10048/3864625806d3ff7ef2c87394f31ee0a6fa94234f/Connection.py
if ( (invalid(oid) and not hasattr(object, '_p_resolveConflict')) or invalid(None) ):
if invalid(oid) and not hasattr(object, '_p_resolveConflict'):
# def persistent_id(object,
3864625806d3ff7ef2c87394f31ee0a6fa94234f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/10048/3864625806d3ff7ef2c87394f31ee0a6fa94234f/Connection.py
invalid = self._invalid if invalid(oid) or invalid(None):
if self._invalid(oid):
def setstate(self, object): oid = object._p_oid
3864625806d3ff7ef2c87394f31ee0a6fa94234f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/10048/3864625806d3ff7ef2c87394f31ee0a6fa94234f/Connection.py
if self._invalid(None): raise ConflictError("transaction already invalidated")
def tpc_begin(self, transaction, sub=None): if self._invalid(None): # Some nitwit invalidated everything! raise ConflictError("transaction already invalidated") self._invalidating = [] self._creating = []
3864625806d3ff7ef2c87394f31ee0a6fa94234f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/10048/3864625806d3ff7ef2c87394f31ee0a6fa94234f/Connection.py
continue
def main(path): fs = FileStorage(path, read_only=1) noload = {} for oid in fs._index.keys(): try: data, serial = fs.load(oid, "") except: print "oid %s failed to load" % hex(u64(oid)) if VERBOSE: traceback.print_exc() noload[oid] = 1 # XXX If we get here after we've already loaded objects # that refer to this one, we won't get error reports from # them. We could fix this by making two passes over the # storage, but that seems like overkill. refs = get_refs(data) missing = [] # contains 3-tuples of oid, klass-metadata, reason for info in refs: try: ref, klass = info except (ValueError, TypeError): # failed to unpack ref = info klass = '<unknown>' if not fs._index.has_key(ref): missing.append((ref, klass, "missing")) if noload.has_key(ref): missing.append((ref, klass, "failed to load")) if missing: report(oid, data, serial, fs, missing)
7c49891c8520c4a1c5fee5d0aed8b4e738d05e00 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/10048/7c49891c8520c4a1c5fee5d0aed8b4e738d05e00/fsrefs.py
level=zLOG.DEBUG)
level=zLOG.TRACE)
def message_input(self, message): """Decoding an incoming message and dispatch it""" # XXX Not sure what to do with errors that reach this level. # Need to catch ZRPCErrors in handle_reply() and # handle_request() so that they get back to the client. try: msgid, flags, name, args = self.marshal.decode(message) except DecodingError, msg: return self.return_error(None, None, DecodingError, msg)
8d7c57665d46df0cacc46068195732bd4e94a4b5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/10048/8d7c57665d46df0cacc46068195732bd4e94a4b5/connection.py
log("send msg: %d, %d, %s, ..." % (msgid, flags, method))
log("send msg: %d, %d, %s, ..." % (msgid, flags, method), zLOG.TRACE)
def send_call(self, method, args, flags): # send a message and return its msgid self.__msgid_lock.acquire() try: msgid = self.msgid self.msgid = self.msgid + 1 finally: self.__msgid_lock.release() if __debug__: log("send msg: %d, %d, %s, ..." % (msgid, flags, method)) buf = self.marshal.encode(msgid, flags, method, args) self.message_output(buf) return msgid
8d7c57665d46df0cacc46068195732bd4e94a4b5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/10048/8d7c57665d46df0cacc46068195732bd4e94a4b5/connection.py
if i < first: continue
if i < first: i = i+1 continue
def undoLog(self, first, last, filter=None): self._lock_acquire() try: packt=self._packt if packt is None: raise POSException.UndoError, ( 'Undo is currently disabled for database maintenance.<p>') pos=self._pos if pos < 39: return [] file=self._file seek=file.seek read=file.read unpack=struct.unpack strip=string.strip encode=base64.encodestring r=[] append=r.append i=0 while i < last and pos > 39: seek(pos-8) pos=pos-u64(read(8))-8 if i < first: continue seek(pos) h=read(23) tid, tl, status, ul, dl, el = unpack(">8s8scHHH", h) if tid < packt: break if status != ' ': continue u=ul and read(ul) or '' d=dl and read(dl) or '' d={'id': encode(tid+p64(pos))[:22], 'time': TimeStamp(tid).timeTime(), 'user_name': u, 'description': d} if el: try: e=loads(read(el)) d.update(e) except: pass if filter is None or filter(d): append(d) i=i+1 return r finally: self._lock_release()
c7ab07b050138e1a15feb5520f808ddc34a9ab98 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/10048/c7ab07b050138e1a15feb5520f808ddc34a9ab98/FileStorage.py
def checkPackVersionsInPast(self): pass def checkPackAfterUndoDeletion(self): pass
def check_periodic_save_index(self):
34ee83d3e662a6e7366e492aeaef24d49256b0a4 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/10048/34ee83d3e662a6e7366e492aeaef24d49256b0a4/testFileStorage.py
if os.environ.has_key('STUPID_LOG_FILE'): del os.environ['STUPID_LOG_FILE'] if os.environ.has_key('EVENT_LOG_FILE'): del os.environ['EVENT_LOG_FILE'] if os.environ.has_key('STUPID_LOG_SEVERITY'): del os.environ['STUPID_LOG_SEVERITY'] if os.environ.has_key('EVENT_LOG_SEVERITY'): del os.environ['EVENT_LOG_SEVERITY']
self.wipeEnvironment()
def tearDown(self): try: os.remove(self.path) except os.error: pass if os.environ.has_key('STUPID_LOG_FILE'): del os.environ['STUPID_LOG_FILE'] if os.environ.has_key('EVENT_LOG_FILE'): del os.environ['EVENT_LOG_FILE'] if os.environ.has_key('STUPID_LOG_SEVERITY'): del os.environ['STUPID_LOG_SEVERITY'] if os.environ.has_key('EVENT_LOG_SEVERITY'): del os.environ['EVENT_LOG_SEVERITY']
4e3ab3b200411cee79060138fc986da249bc6c87 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/10048/4e3ab3b200411cee79060138fc986da249bc6c87/testzLog.py
else:
else:
def __init__(self, file_name, create=0, read_only=0, stop=None, quota=None):
e9aa3bd398cba329c8a421eb6d47f4dba6e400a9 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/10048/e9aa3bd398cba329c8a421eb6d47f4dba6e400a9/FileStorage.py
tl=u64(rstl)
tl=U64(rstl)
def _sane(self, index, pos): """Sanity check saved index data by reading the last undone trans
e9aa3bd398cba329c8a421eb6d47f4dba6e400a9 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/10048/e9aa3bd398cba329c8a421eb6d47f4dba6e400a9/FileStorage.py
opos=pos+23+ul+dl+el
opos=pos+(23+ul+dl+el)
def _sane(self, index, pos): """Sanity check saved index data by reading the last undone trans
e9aa3bd398cba329c8a421eb6d47f4dba6e400a9 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/10048/e9aa3bd398cba329c8a421eb6d47f4dba6e400a9/FileStorage.py
tloc=u64(stloc) plen=u64(splen)
tloc=U64(stloc) plen=U64(splen)
def _sane(self, index, pos): """Sanity check saved index data by reading the last undone trans
e9aa3bd398cba329c8a421eb6d47f4dba6e400a9 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/10048/e9aa3bd398cba329c8a421eb6d47f4dba6e400a9/FileStorage.py
if vlen: dlen=dlen+16+vlen
if vlen: dlen=dlen+(16+vlen)
def _sane(self, index, pos): """Sanity check saved index data by reading the last undone trans
e9aa3bd398cba329c8a421eb6d47f4dba6e400a9 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/10048/e9aa3bd398cba329c8a421eb6d47f4dba6e400a9/FileStorage.py
pos=info.get('pos', None)
pos=long(info.get('pos', None))
def _restore_index(self): """Load the database index from a file to support quick startup """ file_name=self.__name__ index_name=file_name+'.index' try: f=open(index_name,'rb') except: return None p=Unpickler(f)
e9aa3bd398cba329c8a421eb6d47f4dba6e400a9 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/10048/e9aa3bd398cba329c8a421eb6d47f4dba6e400a9/FileStorage.py
self._save_index()
try: self._save_index() except: pass
def close(self): self._file.close() self._lock_file.close() self._tfile.close() self._save_index()
e9aa3bd398cba329c8a421eb6d47f4dba6e400a9 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/10048/e9aa3bd398cba329c8a421eb6d47f4dba6e400a9/FileStorage.py
here=tfile.tell()+self._pos+self._thl
here=self._pos+(tfile.tell()+self._thl)
def commitVersion(self, src, dest, transaction, abort=None): # We are going to commit by simply storing back pointers.
e9aa3bd398cba329c8a421eb6d47f4dba6e400a9 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/10048/e9aa3bd398cba329c8a421eb6d47f4dba6e400a9/FileStorage.py
seek(u64(t)+16)
seek(U64(t)+16)
def commitVersion(self, src, dest, transaction, abort=None): # We are going to commit by simply storing back pointers.
e9aa3bd398cba329c8a421eb6d47f4dba6e400a9 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/10048/e9aa3bd398cba329c8a421eb6d47f4dba6e400a9/FileStorage.py
srcpos=u64(spos)
srcpos=U64(spos)
def commitVersion(self, src, dest, transaction, abort=None): # We are going to commit by simply storing back pointers.
e9aa3bd398cba329c8a421eb6d47f4dba6e400a9 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/10048/e9aa3bd398cba329c8a421eb6d47f4dba6e400a9/FileStorage.py
if plen != z64: return read(u64(plen)), version, nv
if plen != z64: return read(U64(plen)), version, nv
def _loada(self, oid, _index, file): "Read any version and return the version" pos=_index[oid] file.seek(pos) read=file.read h=read(42) doid,serial,prev,tloc,vlen,plen = unpack(">8s8s8s8sH8s", h) if vlen: nv = read(8) != z64 file.seek(8,1) # Skip previous version record pointer version=read(vlen) else: version='' nv=0
e9aa3bd398cba329c8a421eb6d47f4dba6e400a9 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/10048/e9aa3bd398cba329c8a421eb6d47f4dba6e400a9/FileStorage.py
if plen != z64: return read(u64(plen)), serial
if plen != z64: return read(U64(plen)), serial
def _load(self, oid, version, _index, file): pos=_index[oid] file.seek(pos) read=file.read h=read(42) doid,serial,prev,tloc,vlen,plen = unpack(">8s8s8s8sH8s", h) if doid != oid: raise CorruptedDataError, h if vlen: pnv=read(8) # Read location of non-version data if (not version or len(version) != vlen or (read(8) # skip past version link and version != read(vlen)) ): return _loadBack(file, oid, pnv)
e9aa3bd398cba329c8a421eb6d47f4dba6e400a9 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/10048/e9aa3bd398cba329c8a421eb6d47f4dba6e400a9/FileStorage.py
pos=u64(prev)
pos=U64(prev)
def loadSerial(self, oid, serial): self._lock_acquire() try: _index=self._index file=self._file seek=file.seek read=file.read pos=_index[oid] while 1: seek(pos) h=read(42) doid,dserial,prev,tloc,vlen,plen = unpack(">8s8s8s8sH8s", h) if doid != oid: raise CorruptedDataError, h if dserial == serial: break # Yeee ha! # Keep looking for serial pos=u64(prev) if not pos: raise KeyError, serial continue
e9aa3bd398cba329c8a421eb6d47f4dba6e400a9 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/10048/e9aa3bd398cba329c8a421eb6d47f4dba6e400a9/FileStorage.py
if plen != z64: return read(u64(plen))
if plen != z64: return read(U64(plen))
def loadSerial(self, oid, serial): self._lock_acquire() try: _index=self._index file=self._file seek=file.seek read=file.read pos=_index[oid] while 1: seek(pos) h=read(42) doid,dserial,prev,tloc,vlen,plen = unpack(">8s8s8s8sH8s", h) if doid != oid: raise CorruptedDataError, h if dserial == serial: break # Yeee ha! # Keep looking for serial pos=u64(prev) if not pos: raise KeyError, serial continue
e9aa3bd398cba329c8a421eb6d47f4dba6e400a9 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/10048/e9aa3bd398cba329c8a421eb6d47f4dba6e400a9/FileStorage.py
here=tfile.tell()+pos+self._thl
here=pos+(tfile.tell()+self._thl)
def store(self, oid, serial, data, version, transaction): if transaction is not self._transaction: raise POSException.StorageTransactionError(self, transaction)
e9aa3bd398cba329c8a421eb6d47f4dba6e400a9 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/10048/e9aa3bd398cba329c8a421eb6d47f4dba6e400a9/FileStorage.py
if quota is not None and tfile.tell()+pos+self._thl > quota:
if quota is not None and pos+(tfile.tell()+self._thl) > quota:
def store(self, oid, serial, data, version, transaction): if transaction is not self._transaction: raise POSException.StorageTransactionError(self, transaction)
e9aa3bd398cba329c8a421eb6d47f4dba6e400a9 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/10048/e9aa3bd398cba329c8a421eb6d47f4dba6e400a9/FileStorage.py
self._nextpos=0 def tpc_vote(self, transaction): if transaction is not self._transaction: raise POSException.StorageTransactionError(self, transaction) self._lock_acquire() try: tfile=self._tfile dlen=tfile.tell() if not dlen: return file=self._file write=file.write tfile.seek(0) id=self._serial user, desc, ext = self._ude luser=len(user) ldesc=len(desc) lext=len(ext) if luser > 65535: raise FileStorageError, 'user name too long' if ldesc > 65535: raise FileStorageError, 'description too long' if lext > 65535: raise FileStorageError, 'too much extension data' tlen=self._thl pos=self._pos file.seek(pos) tl=tlen+dlen stl=p64(tl) try: write(pack( ">8s" "8s" "c" "H" "H" "H" ,id, stl, 'c', luser, ldesc, lext, )) if user: write(user) if desc: write(desc) if ext: write(ext) cp(tfile, file, dlen) write(stl) file.flush() except: file.truncate(pos) raise self._nextpos=pos+(tl+8) finally: self._lock_release()
def _begin(self, tid, u, d, e): self._thl=23+len(u)+len(d)+len(e)
e9aa3bd398cba329c8a421eb6d47f4dba6e400a9 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/10048/e9aa3bd398cba329c8a421eb6d47f4dba6e400a9/FileStorage.py
tfile=self._tfile dlen=tfile.tell() if not dlen: return
def _finish(self, tid, u, d, e): tfile=self._tfile dlen=tfile.tell() if not dlen: return # No data in this trans file=self._file write=file.write tfile.seek(0) id=self._serial user, desc, ext = self._ude
e9aa3bd398cba329c8a421eb6d47f4dba6e400a9 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/10048/e9aa3bd398cba329c8a421eb6d47f4dba6e400a9/FileStorage.py
write=file.write tfile.seek(0) id=self._serial user, desc, ext = self._ude tlen=self._thl pos=self._pos file.seek(pos) tl=tlen+dlen stl=p64(tl) try: write(pack( ">8s" "8s" "c" "H" "H" "H" ,id, stl, 'c', len(user), len(desc), len(ext), )) if user: write(user) if desc: write(desc) if ext: write(ext) cp(tfile, file, dlen) write(stl) file.seek(pos+16) write(self._tstatus) file.flush() if fsync is not None: fsync(file.fileno()) except: file.truncate(pos) self._pos=pos+tl+8
file.seek(self._pos+16) file.write(self._tstatus) file.flush() if fsync is not None: fsync(file.fileno()) self._pos=self._nextpos
def _finish(self, tid, u, d, e): tfile=self._tfile dlen=tfile.tell() if not dlen: return # No data in this trans file=self._file write=file.write tfile.seek(0) id=self._serial user, desc, ext = self._ude
e9aa3bd398cba329c8a421eb6d47f4dba6e400a9 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/10048/e9aa3bd398cba329c8a421eb6d47f4dba6e400a9/FileStorage.py
tid, tpos = transaction_id[:8], u64(transaction_id[8:])
tid, tpos = transaction_id[:8], U64(transaction_id[8:])
def undo(self, transaction_id): self._lock_acquire() try: self._clear_index() transaction_id=base64.decodestring(transaction_id+'==\n') tid, tpos = transaction_id[:8], u64(transaction_id[8:]) packt=self._packt if packt is None or packt > tid: raise POSException.UndoError, ( 'Undo is currently disabled for database maintenance.<p>')
e9aa3bd398cba329c8a421eb6d47f4dba6e400a9 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/10048/e9aa3bd398cba329c8a421eb6d47f4dba6e400a9/FileStorage.py
tl=u64(h[8:16])
tl=U64(h[8:16])
def undo(self, transaction_id): self._lock_acquire() try: self._clear_index() transaction_id=base64.decodestring(transaction_id+'==\n') tid, tpos = transaction_id[:8], u64(transaction_id[8:]) packt=self._packt if packt is None or packt > tid: raise POSException.UndoError, ( 'Undo is currently disabled for database maintenance.<p>')
e9aa3bd398cba329c8a421eb6d47f4dba6e400a9 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/10048/e9aa3bd398cba329c8a421eb6d47f4dba6e400a9/FileStorage.py
pos=tpos+23+ul+dl+el
pos=tpos+(23+ul+dl+el)
def undo(self, transaction_id): self._lock_acquire() try: self._clear_index() transaction_id=base64.decodestring(transaction_id+'==\n') tid, tpos = transaction_id[:8], u64(transaction_id[8:]) packt=self._packt if packt is None or packt > tid: raise POSException.UndoError, ( 'Undo is currently disabled for database maintenance.<p>')
e9aa3bd398cba329c8a421eb6d47f4dba6e400a9 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/10048/e9aa3bd398cba329c8a421eb6d47f4dba6e400a9/FileStorage.py
plen=u64(splen) prev=u64(sprev)
plen=U64(splen) prev=U64(sprev)
def undo(self, transaction_id): self._lock_acquire() try: self._clear_index() transaction_id=base64.decodestring(transaction_id+'==\n') tid, tpos = transaction_id[:8], u64(transaction_id[8:]) packt=self._packt if packt is None or packt > tid: raise POSException.UndoError, ( 'Undo is currently disabled for database maintenance.<p>')
e9aa3bd398cba329c8a421eb6d47f4dba6e400a9 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/10048/e9aa3bd398cba329c8a421eb6d47f4dba6e400a9/FileStorage.py
if vlen: dlen=dlen+16+vlen
if vlen: dlen=dlen+(16+vlen)
def undo(self, transaction_id): self._lock_acquire() try: self._clear_index() transaction_id=base64.decodestring(transaction_id+'==\n') tid, tpos = transaction_id[:8], u64(transaction_id[8:]) packt=self._packt if packt is None or packt > tid: raise POSException.UndoError, ( 'Undo is currently disabled for database maintenance.<p>')
e9aa3bd398cba329c8a421eb6d47f4dba6e400a9 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/10048/e9aa3bd398cba329c8a421eb6d47f4dba6e400a9/FileStorage.py
pos=pos-u64(read(8))-8
pos=pos-U64(read(8))-8
def undoLog(self, first, last, filter=None): self._lock_acquire() try: packt=self._packt if packt is None: raise POSException.UndoError, ( 'Undo is currently disabled for database maintenance.<p>') pos=self._pos if pos < 39: return [] file=self._file seek=file.seek read=file.read unpack=struct.unpack strip=string.strip encode=base64.encodestring r=[] append=r.append i=0 while i < last and pos > 39: seek(pos-8) pos=pos-u64(read(8))-8 seek(pos) h=read(23) tid, tl, status, ul, dl, el = unpack(">8s8scHHH", h) if tid < packt: break if status != ' ': continue u=ul and read(ul) or '' d=dl and read(dl) or '' d={'id': encode(tid+p64(pos))[:22], 'time': TimeStamp(tid).timeTime(), 'user_name': u, 'description': d} if el: try: e=loads(read(el)) d.update(e) except: pass if filter is None or filter(d): if i >= first: append(d) i=i+1 return r finally: self._lock_release()
e9aa3bd398cba329c8a421eb6d47f4dba6e400a9 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/10048/e9aa3bd398cba329c8a421eb6d47f4dba6e400a9/FileStorage.py
seek(u64(t)+16)
seek(U64(t)+16)
def versionEmpty(self, version): self._lock_acquire() try: index=self._index file=self._file seek=file.seek read=file.read srcpos=self._vindex_get(version, 0) t=tstatus=None while srcpos: seek(srcpos) oid=read(8) if index[oid]==srcpos: return 0 h=read(50) # serial, prev(oid), tloc, vlen, plen, pnv, pv tloc=h[16:24] if t != tloc: # We haven't checked this transaction before, # get it's status. t=tloc seek(u64(t)+16) tstatus=read(1)
e9aa3bd398cba329c8a421eb6d47f4dba6e400a9 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/10048/e9aa3bd398cba329c8a421eb6d47f4dba6e400a9/FileStorage.py
srcpos=u64(spos)
srcpos=U64(spos)
def versionEmpty(self, version): self._lock_acquire() try: index=self._index file=self._file seek=file.seek read=file.read srcpos=self._vindex_get(version, 0) t=tstatus=None while srcpos: seek(srcpos) oid=read(8) if index[oid]==srcpos: return 0 h=read(50) # serial, prev(oid), tloc, vlen, plen, pnv, pv tloc=h[16:24] if t != tloc: # We haven't checked this transaction before, # get it's status. t=tloc seek(u64(t)+16) tstatus=read(1)
e9aa3bd398cba329c8a421eb6d47f4dba6e400a9 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/10048/e9aa3bd398cba329c8a421eb6d47f4dba6e400a9/FileStorage.py
prev=u64(prev)
prev=U64(prev)
def history(self, oid, version=None, length=1, filter=None): self._lock_acquire() try: r=[] file=self._file seek=file.seek read=file.read pos=self._index[oid] wantver=version
e9aa3bd398cba329c8a421eb6d47f4dba6e400a9 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/10048/e9aa3bd398cba329c8a421eb6d47f4dba6e400a9/FileStorage.py
seek(u64(tloc))
seek(U64(tloc))
def history(self, oid, version=None, length=1, filter=None): self._lock_acquire() try: r=[] file=self._file seek=file.seek read=file.read pos=self._index[oid] wantver=version
e9aa3bd398cba329c8a421eb6d47f4dba6e400a9 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/10048/e9aa3bd398cba329c8a421eb6d47f4dba6e400a9/FileStorage.py
if el < 0: el=t32-el
def history(self, oid, version=None, length=1, filter=None): self._lock_acquire() try: r=[] file=self._file seek=file.seek read=file.read pos=self._index[oid] wantver=version
e9aa3bd398cba329c8a421eb6d47f4dba6e400a9 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/10048/e9aa3bd398cba329c8a421eb6d47f4dba6e400a9/FileStorage.py
d['size']=u64(plen)
d['size']=U64(plen)
def history(self, oid, version=None, length=1, filter=None): self._lock_acquire() try: r=[] file=self._file seek=file.seek read=file.read pos=self._index[oid] wantver=version
e9aa3bd398cba329c8a421eb6d47f4dba6e400a9 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/10048/e9aa3bd398cba329c8a421eb6d47f4dba6e400a9/FileStorage.py
p=u64(file.read(8))
p=U64(file.read(8))
def _redundant_pack(self, file, pos): file.seek(pos-8) p=u64(file.read(8)) file.seek(pos-p+8) return file.read(1) not in ' u'
e9aa3bd398cba329c8a421eb6d47f4dba6e400a9 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/10048/e9aa3bd398cba329c8a421eb6d47f4dba6e400a9/FileStorage.py
offset=0 pos=opos=4
offset=0L pos=opos=4L
def pack(self, t, referencesf): """Copy data from the current database file to a packed file Non-current records from transactions with time-stamp strings less than packtss are ommitted. As are all undone records. Also, data back pointers that point before packtss are resolved and the associated data are copied, since the old records are not copied. """
e9aa3bd398cba329c8a421eb6d47f4dba6e400a9 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/10048/e9aa3bd398cba329c8a421eb6d47f4dba6e400a9/FileStorage.py
def pack(self, t, referencesf): """Copy data from the current database file to a packed file Non-current records from transactions with time-stamp strings less than packtss are ommitted. As are all undone records. Also, data back pointers that point before packtss are resolved and the associated data are copied, since the old records are not copied. """
e9aa3bd398cba329c8a421eb6d47f4dba6e400a9 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/10048/e9aa3bd398cba329c8a421eb6d47f4dba6e400a9/FileStorage.py
if el < 0: el=t32-el tl=u64(stl)
tl=U64(stl)
def pack(self, t, referencesf): """Copy data from the current database file to a packed file Non-current records from transactions with time-stamp strings less than packtss are ommitted. As are all undone records. Also, data back pointers that point before packtss are resolved and the associated data are copied, since the old records are not copied. """
e9aa3bd398cba329c8a421eb6d47f4dba6e400a9 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/10048/e9aa3bd398cba329c8a421eb6d47f4dba6e400a9/FileStorage.py
plen=u64(splen)
plen=U64(splen)
def pack(self, t, referencesf): """Copy data from the current database file to a packed file Non-current records from transactions with time-stamp strings less than packtss are ommitted. As are all undone records. Also, data back pointers that point before packtss are resolved and the associated data are copied, since the old records are not copied. """
e9aa3bd398cba329c8a421eb6d47f4dba6e400a9 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/10048/e9aa3bd398cba329c8a421eb6d47f4dba6e400a9/FileStorage.py
dlen=dlen+16+vlen
dlen=dlen+(16+vlen)
def pack(self, t, referencesf): """Copy data from the current database file to a packed file Non-current records from transactions with time-stamp strings less than packtss are ommitted. As are all undone records. Also, data back pointers that point before packtss are resolved and the associated data are copied, since the old records are not copied. """
e9aa3bd398cba329c8a421eb6d47f4dba6e400a9 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/10048/e9aa3bd398cba329c8a421eb6d47f4dba6e400a9/FileStorage.py