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
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
Joshua
wendelin.core
Commits
34369a7b
Commit
34369a7b
authored
May 10, 2019
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
a0faad7d
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
2 deletions
+5
-2
wcfs/wcfs_test.py
wcfs/wcfs_test.py
+5
-2
No files found.
wcfs/wcfs_test.py
View file @
34369a7b
...
@@ -640,13 +640,15 @@ def watch(w, zf, at): # XXX -> ?
...
@@ -640,13 +640,15 @@ def watch(w, zf, at): # XXX -> ?
pin
=
w
.
_pinAt
(
zf
,
at
)
pin
=
w
.
_pinAt
(
zf
,
at
)
print
(
'
\
n
%s
\
n
%s'
%
(
pin_prev
,
pin
))
for
blk
in
set
(
pin_prev
.
keys
()).
union
(
pin
.
keys
()):
for
blk
in
set
(
pin_prev
.
keys
()).
union
(
pin
.
keys
()):
# blk ∉ pin_prev, blk ∉ pin -> cannot happen
# blk ∉ pin_prev, blk ∉ pin -> cannot happen
assert
(
blk
in
pin_prev
)
or
(
blk
in
pin
)
assert
(
blk
in
pin_prev
)
or
(
blk
in
pin
)
# blk ∉ pin_prev, blk ∈ pin -> cannot happen
# blk ∉ pin_prev, blk ∈ pin -> cannot happen
if
at_prev
is
not
None
:
if
blk
not
in
pin_prev
and
blk
in
pin
:
if
blk
not
in
pin_prev
and
blk
in
pin
:
if
at_prev
is
not
None
:
assert
False
,
'#%d pinned %s; not pinned %s'
%
(
t
.
hat
(
at_prev
),
t
.
hat
(
at
))
assert
False
,
'#%d pinned %s; not pinned %s'
%
(
t
.
hat
(
at_prev
),
t
.
hat
(
at
))
# blk ∈ pin_prev, blk ∉ pin -> unpin to head
# blk ∈ pin_prev, blk ∉ pin -> unpin to head
...
@@ -659,6 +661,7 @@ def watch(w, zf, at): # XXX -> ?
...
@@ -659,6 +661,7 @@ def watch(w, zf, at): # XXX -> ?
if
pin_prev
[
blk
]
==
pin
[
blk
]:
if
pin_prev
[
blk
]
==
pin
[
blk
]:
del
pin
[
blk
]
# would need to pin to what it is already pinned
del
pin
[
blk
]
# would need to pin to what it is already pinned
print
(
'-> %s'
%
pin
)
# {} blk -> at that have to be pinned
# {} blk -> at that have to be pinned
# XXX also check that head/file[blk] is in cache - else no need to pin
# XXX also check that head/file[blk] is in cache - else no need to pin
...
...
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