Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
W
wendelin.core
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Labels
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
Kirill Smelkov
wendelin.core
Commits
09632ad8
Commit
09632ad8
authored
Jul 16, 2019
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
0f93dd0c
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
3 deletions
+5
-3
wcfs/__init__.py
wcfs/__init__.py
+2
-2
wcfs/wcfs_test.py
wcfs/wcfs_test.py
+3
-1
No files found.
wcfs/__init__.py
View file @
09632ad8
...
...
@@ -171,7 +171,7 @@ def mmap(wconn, foid, offset, size): # -> Mapping XXX offset, size -> blko
with
wconn
.
_filemu
:
f
=
wconn
.
_filetab
.
get
(
foid
)
if
f
is
None
:
headf
=
wconn
.
_wc
.
_open
(
"head/%s"
%
(
ashex
(
foid
),),
"rb"
)
headf
=
wconn
.
_wc
.
_open
(
"head/
bigfile/
%s"
%
(
ashex
(
foid
),),
"rb"
)
f
=
_File
(
headf
)
wconn
.
_filetab
[
foid
]
=
f
...
...
@@ -202,7 +202,7 @@ def _remmapblk(mmap, blk, at):
fsfile
=
f
.
headf
else
:
# TODO share @rev fd until wconn is resynced?
fsfile
=
f
.
wconn
.
_wc
.
_open
(
"@%s/%s"
%
(
ashex
(
at
),
ashex
(
f
.
foid
)),
"rb"
)
fsfile
=
f
.
wconn
.
_wc
.
_open
(
"@%s/
bigfile/
%s"
%
(
ashex
(
at
),
ashex
(
f
.
foid
)),
"rb"
)
defer
(
fsfile
.
close
)
mm
.
mmap_into_ro
(
mmap
.
mem
[(
blk
-
mmap
.
blk_start
)
*
blksize
:][:
blksize
],
fsfile
.
fileno
(),
blk
*
blksize
)
...
...
wcfs/wcfs_test.py
View file @
09632ad8
...
...
@@ -1691,12 +1691,14 @@ def test_wcfspy_virtmem():
t
=
tDB
();
zf
=
t
.
zfile
defer
(
t
.
close
)
at1
=
t
.
commit
(
zf
,
{
2
:
'c1'
})
at1
=
t
.
commit
(
zf
,
{
2
:
'c1'
,
3
:
'd1'
})
at2
=
t
.
commit
(
zf
,
{
2
:
'c2'
})
wconn
=
t
.
wc
.
connect
(
at1
)
defer
(
wconn
.
close
)
m1
=
wconn
.
mmap
(
zf
.
_p_oid
,
2
,
2
)
# ---- misc ---
...
...
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