Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
dms3
go-dms3
Commits
a1d34365
Commit
a1d34365
authored
Nov 09, 2014
by
Matt Bell
Committed by
Juan Batiz-Benet
Nov 14, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
core/commands2: Restored logging that got removed
parent
91da11ae
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
7 additions
and
0 deletions
+7
-0
core/commands2/add.go
core/commands2/add.go
+3
-0
core/commands2/block.go
core/commands2/block.go
+1
-0
core/commands2/log.go
core/commands2/log.go
+1
-0
core/commands2/publish.go
core/commands2/publish.go
+2
-0
No files found.
core/commands2/add.go
View file @
a1d34365
...
...
@@ -49,6 +49,7 @@ var addCmd = &cmds.Command{
return
}
// TODO: include fs paths in output (will need a way to specify paths in underlying filearg system)
added
:=
make
([]
*
Object
,
0
,
len
(
req
.
Arguments
()))
for
_
,
dagnode
:=
range
dagnodes
{
object
,
err
:=
getOutput
(
dagnode
)
...
...
@@ -92,6 +93,8 @@ func add(n *core.IpfsNode, readers []io.Reader) ([]*dag.Node, error) {
dagnodes
:=
make
([]
*
dag
.
Node
,
0
)
// TODO: allow adding directories (will need support for multiple files in filearg system)
for
_
,
reader
:=
range
readers
{
node
,
err
:=
importer
.
BuildDagFromReader
(
reader
,
n
.
DAG
,
mp
,
chunk
.
DefaultSplitter
)
if
err
!=
nil
{
...
...
core/commands2/block.go
View file @
a1d34365
...
...
@@ -94,6 +94,7 @@ It outputs the key of the stored block.`,
}
b
:=
blocks
.
NewBlock
(
data
)
log
.
Debugf
(
"BlockPut key: '%q'"
,
b
.
Key
())
k
,
err
:=
n
.
Blocks
.
AddBlock
(
b
)
if
err
!=
nil
{
...
...
core/commands2/log.go
View file @
a1d34365
...
...
@@ -27,6 +27,7 @@ output of a running daemon.
}
s
:=
fmt
.
Sprintf
(
"Changed log level of '%s' to '%s'"
,
args
[
0
],
args
[
1
])
log
.
Info
(
s
)
res
.
SetOutput
(
&
MessageOutput
{
s
})
},
Marshallers
:
map
[
cmds
.
EncodingType
]
cmds
.
Marshaller
{
...
...
core/commands2/publish.go
View file @
a1d34365
...
...
@@ -39,6 +39,8 @@ Publish a <ref> to another public key:
"IPFS path of the obejct to be published at <name>"
},
},
Run
:
func
(
res
cmds
.
Response
,
req
cmds
.
Request
)
{
log
.
Debug
(
"Begin Publish"
)
n
:=
req
.
Context
()
.
Node
args
:=
req
.
Arguments
()
...
...
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