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
d719ee18
Commit
d719ee18
authored
Jun 04, 2020
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
e36acaf5
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
18 deletions
+14
-18
wcfs/testprog/treegen.py
wcfs/testprog/treegen.py
+14
-18
No files found.
wcfs/testprog/treegen.py
View file @
d719ee18
...
@@ -158,15 +158,7 @@ def Trees(zstor, r):
...
@@ -158,15 +158,7 @@ def Trees(zstor, r):
xprint
(
"tree.srv start @%s root=%s"
%
(
ashex
(
head
),
ashex
(
ztree
.
_p_oid
)))
xprint
(
"tree.srv start @%s root=%s"
%
(
ashex
(
head
),
ashex
(
ztree
.
_p_oid
)))
treetxtPrev
=
zctx
.
ztreetxt
(
ztree
)
treetxtPrev
=
zctx
.
ztreetxt
(
ztree
)
# XXX dup wrt AllStructsSrv
for
treetxt
in
xreadlines
(
r
):
while
1
:
treetxt
=
r
.
readline
()
if
treetxt
==
''
:
break
# EOF
treetxt
=
treetxt
.
rstrip
()
# trim trailing \n
if
treetxt
.
startswith
(
'#'
):
continue
# skip comments
# mark tree as changed if the same topology is requested twice
# mark tree as changed if the same topology is requested twice
# this ensures we can actually make a non-empty commit
# this ensures we can actually make a non-empty commit
if
treetxt
==
treetxtPrev
:
if
treetxt
==
treetxtPrev
:
...
@@ -215,15 +207,7 @@ def Trees(zstor, r):
...
@@ -215,15 +207,7 @@ def Trees(zstor, r):
@
func
@
func
def
AllStructsSrv
(
r
):
def
AllStructsSrv
(
r
):
xprint
(
'# allstructs.srv start'
)
xprint
(
'# allstructs.srv start'
)
# XXX dup wrt Trees
for
req
in
xreadlines
(
r
):
while
1
:
req
=
r
.
readline
()
if
req
==
''
:
break
# EOF
req
=
req
.
rstrip
()
# trim trailing \n
if
req
.
startswith
(
'#'
):
continue
# skip comments
# maxdepth maxsplit n(/seed) kv1 kv2
# maxdepth maxsplit n(/seed) kv1 kv2
maxdepth
,
maxsplit
,
n
,
kv1txt
,
kv2txt
=
req
.
split
()
maxdepth
,
maxsplit
,
n
,
kv1txt
,
kv2txt
=
req
.
split
()
maxdepth
=
int
(
maxdepth
)
maxdepth
=
int
(
maxdepth
)
...
@@ -414,6 +398,18 @@ def TopoDecode(zctx, text):
...
@@ -414,6 +398,18 @@ def TopoDecode(zctx, text):
return
xbtree
.
TopoDecode
(
text
,
zctx
.
vdecode
)
return
xbtree
.
TopoDecode
(
text
,
zctx
.
vdecode
)
# xreadlines iterates through lines in r skipping comments.
def
xreadlines
(
r
):
while
1
:
l
=
r
.
readline
()
if
l
==
''
:
break
# EOF
l
=
l
.
rstrip
()
# trim trailing \n
if
l
.
startswith
(
'#'
):
continue
# skip comments
yield
l
@
func
@
func
def
cmd_allstructs
(
argv
):
def
cmd_allstructs
(
argv
):
if
len
(
argv
)
!=
5
:
if
len
(
argv
)
!=
5
:
...
...
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