Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Z
Zope
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
Zope
Commits
6928edc3
Commit
6928edc3
authored
Jan 16, 2001
by
Martijn Pieters
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Bogus extra line to unclog CVS.
parent
6f477958
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
19 additions
and
16 deletions
+19
-16
utilities/FS.py
utilities/FS.py
+16
-15
utilities/bbb.py
utilities/bbb.py
+1
-0
utilities/fixbbbts.py
utilities/fixbbbts.py
+2
-1
No files found.
utilities/FS.py
View file @
6928edc3
...
@@ -107,7 +107,7 @@ class FS:
...
@@ -107,7 +107,7 @@ class FS:
self
.
_tfile
=
tempfile
.
TemporaryFile
()
self
.
_tfile
=
tempfile
.
TemporaryFile
()
self
.
_pos
=
4
self
.
_pos
=
4
self
.
_progress
=
None
self
.
_progress
=
None
def
rpt
(
self
,
pos
,
oid
,
start
,
tname
,
user
,
t
,
p
,
first
,
newtrans
):
def
rpt
(
self
,
pos
,
oid
,
start
,
tname
,
user
,
t
,
p
,
first
,
newtrans
):
if
pos
is
None
:
if
pos
is
None
:
...
@@ -184,7 +184,7 @@ class FS:
...
@@ -184,7 +184,7 @@ class FS:
id
=
self
.
_serial
id
=
self
.
_serial
user
,
desc
=
self
.
_ud
user
,
desc
=
self
.
_ud
self
.
_ud
=
None
self
.
_ud
=
None
tlen
=
self
.
_thl
tlen
=
self
.
_thl
pos
=
self
.
_pos
pos
=
self
.
_pos
tl
=
tlen
+
dlen
tl
=
tlen
+
dlen
...
@@ -195,9 +195,9 @@ class FS:
...
@@ -195,9 +195,9 @@ class FS:
))
))
if
user
:
write
(
user
)
if
user
:
write
(
user
)
if
desc
:
write
(
desc
)
if
desc
:
write
(
desc
)
cp
(
tfile
,
file
,
dlen
)
cp
(
tfile
,
file
,
dlen
)
write
(
stl
)
write
(
stl
)
self
.
_pos
=
pos
+
tl
+
8
self
.
_pos
=
pos
+
tl
+
8
...
@@ -220,7 +220,7 @@ class ZEXP:
...
@@ -220,7 +220,7 @@ class ZEXP:
self
.
_pos
=
4
self
.
_pos
=
4
self
.
_progress
=
None
self
.
_progress
=
None
def
rpt
(
self
,
pos
,
oid
,
start
,
tname
,
user
,
t
,
p
,
first
,
newtrans
):
def
rpt
(
self
,
pos
,
oid
,
start
,
tname
,
user
,
t
,
p
,
first
,
newtrans
):
write
=
self
.
_file
.
write
write
=
self
.
_file
.
write
...
@@ -254,19 +254,19 @@ def cp(f1, f2, l):
...
@@ -254,19 +254,19 @@ def cp(f1, f2, l):
read
=
f1
.
read
read
=
f1
.
read
write
=
f2
.
write
write
=
f2
.
write
n
=
8192
n
=
8192
while
l
>
0
:
while
l
>
0
:
if
n
>
l
:
n
=
l
if
n
>
l
:
n
=
l
d
=
read
(
n
)
d
=
read
(
n
)
write
(
d
)
write
(
d
)
l
=
l
-
len
(
d
)
l
=
l
-
len
(
d
)
class
Ghost
:
pass
class
Ghost
:
pass
class
Global
:
class
Global
:
__safe_for_unpickling__
=
1
__safe_for_unpickling__
=
1
def
__init__
(
self
,
m
,
n
):
def
__init__
(
self
,
m
,
n
):
self
.
_module
,
self
.
_name
=
m
,
n
self
.
_module
,
self
.
_name
=
m
,
n
...
@@ -289,12 +289,12 @@ def _global(m, n):
...
@@ -289,12 +289,12 @@ def _global(m, n):
elif
m
==
'PersistentMapping'
:
m
=
'Persistence'
elif
m
==
'PersistentMapping'
:
m
=
'Persistence'
return
Global
(
m
,
n
)
return
Global
(
m
,
n
)
class
Inst
:
class
Inst
:
_state
=
None
_state
=
None
def
__init__
(
self
,
c
,
args
):
def
__init__
(
self
,
c
,
args
):
self
.
_cls
=
c
self
.
_cls
=
c
self
.
_args
=
args
self
.
_args
=
args
...
@@ -320,7 +320,7 @@ class Unpickler(pickle.Unpickler):
...
@@ -320,7 +320,7 @@ class Unpickler(pickle.Unpickler):
klass
=
_global
(
module
,
name
)
klass
=
_global
(
module
,
name
)
value
=
Inst
(
klass
,
args
)
value
=
Inst
(
klass
,
args
)
self
.
append
(
value
)
self
.
append
(
value
)
dispatch
[
INST
]
=
load_inst
dispatch
[
INST
]
=
load_inst
def
load_global
(
self
):
def
load_global
(
self
):
...
@@ -339,7 +339,7 @@ class Unpickler(pickle.Unpickler):
...
@@ -339,7 +339,7 @@ class Unpickler(pickle.Unpickler):
oid
=
p64
(
oid
+
1
),
klass
oid
=
p64
(
oid
+
1
),
klass
else
:
else
:
oid
=
p64
(
oid
+
1
)
oid
=
p64
(
oid
+
1
)
Ghost
=
Ghost
()
Ghost
=
Ghost
()
Ghost
.
oid
=
oid
Ghost
.
oid
=
oid
return
Ghost
return
Ghost
...
@@ -398,10 +398,10 @@ class Pickler(pickle.Pickler):
...
@@ -398,10 +398,10 @@ class Pickler(pickle.Pickler):
memo
[
id
(
object
)]
=
(
memo_len
,
object
)
memo
[
id
(
object
)]
=
(
memo_len
,
object
)
dispatch
[
type
(
Ghost
)]
=
save_global
dispatch
[
type
(
Ghost
)]
=
save_global
def
fixpickle
(
p
,
oid
):
def
fixpickle
(
p
,
oid
):
pfile
=
StringIO
(
p
)
pfile
=
StringIO
(
p
)
unpickler
=
Unpickler
(
pfile
)
unpickler
=
Unpickler
(
pfile
)
...
@@ -415,3 +415,4 @@ def fixpickle(p, oid):
...
@@ -415,3 +415,4 @@ def fixpickle(p, oid):
p
=
newp
.
getvalue
()
p
=
newp
.
getvalue
()
return
p
return
p
utilities/bbb.py
View file @
6928edc3
...
@@ -402,3 +402,4 @@ def main(argv):
...
@@ -402,3 +402,4 @@ def main(argv):
forgive
=
1
,
export
=
export
)
forgive
=
1
,
export
=
export
)
if
__name__
==
'__main__'
:
main
(
sys
.
argv
[
1
:])
if
__name__
==
'__main__'
:
main
(
sys
.
argv
[
1
:])
utilities/fixbbbts.py
View file @
6928edc3
...
@@ -30,6 +30,7 @@ Copy file1 to file2 restamping the records.
...
@@ -30,6 +30,7 @@ Copy file1 to file2 restamping the records.
InvalidFormat
=
'Format Error'
InvalidFormat
=
'Format Error'
Corrupted
=
'Data Corruption'
Corrupted
=
'Data Corruption'
def
main
():
def
main
():
import
getopt
,
string
,
struct
,
time
import
getopt
,
string
,
struct
,
time
file__version__
=
3.0
file__version__
=
3.0
...
@@ -88,4 +89,4 @@ def main():
...
@@ -88,4 +89,4 @@ def main():
pos
=
pos
+
tlen
pos
=
pos
+
tlen
if
__name__
==
'__main__'
:
main
()
if
__name__
==
'__main__'
:
main
()
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment