Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
N
neoppod
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
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Levin Zimmermann
neoppod
Commits
deb3bdd2
Commit
deb3bdd2
authored
Jul 21, 2017
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
8b52bfbd
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
84 additions
and
13 deletions
+84
-13
go/neo/neotools/main.go
go/neo/neotools/main.go
+4
-4
go/zodb/storage/fs1/fs1tools/main.go
go/zodb/storage/fs1/fs1tools/main.go
+5
-5
go/zodb/storage/fs1/fs1tools/reindex.go
go/zodb/storage/fs1/fs1tools/reindex.go
+71
-0
go/zodb/zodbtools/help.go
go/zodb/zodbtools/help.go
+1
-1
go/zodb/zodbtools/main.go
go/zodb/zodbtools/main.go
+3
-3
No files found.
go/neo/neotools/main.go
View file @
deb3bdd2
...
...
@@ -22,12 +22,12 @@ package neotools
import
"lab.nexedi.com/kirr/neo/go/zodb/zodbtools"
var
C
ommands
=
zodbtools
.
CommandRegistry
{
var
c
ommands
=
zodbtools
.
CommandRegistry
{
{
"master"
,
masterSummary
,
masterUsage
,
masterMain
},
{
"storage"
,
storageSummary
,
storageUsage
,
storageMain
},
}
var
H
elpTopics
=
zodbtools
.
HelpRegistry
{
var
h
elpTopics
=
zodbtools
.
HelpRegistry
{
// XXX for now empty
}
...
...
@@ -35,6 +35,6 @@ var HelpTopics = zodbtools.HelpRegistry{
var
Prog
=
zodbtools
.
MainProg
{
Name
:
"neo"
,
Summary
:
"Neo is a tool for running NEO services and commands"
,
Commands
:
C
ommands
,
HelpTopics
:
H
elpTopics
,
Commands
:
c
ommands
,
HelpTopics
:
h
elpTopics
,
}
go/zodb/storage/fs1/fs1tools/main.go
View file @
deb3bdd2
...
...
@@ -22,12 +22,12 @@ package fs1tools
import
"lab.nexedi.com/kirr/neo/go/zodb/zodbtools"
var
C
ommands
=
zodbtools
.
CommandRegistry
{
var
c
ommands
=
zodbtools
.
CommandRegistry
{
{
"tail"
,
tailSummary
,
tailUsage
,
tailMain
},
//
{"reindex", reindexSummary, reindexUsage, reindexMain},
{
"reindex"
,
reindexSummary
,
reindexUsage
,
reindexMain
},
}
var
H
elpTopics
=
zodbtools
.
HelpRegistry
{
var
h
elpTopics
=
zodbtools
.
HelpRegistry
{
// XXX for now empty
}
...
...
@@ -35,6 +35,6 @@ var HelpTopics = zodbtools.HelpRegistry{
var
Prog
=
zodbtools
.
MainProg
{
Name
:
"fs1"
,
Summary
:
"Fs1 is a tool for managing and maintaining ZODB FileStorage v1 databases"
,
Commands
:
C
ommands
,
HelpTopics
:
H
elpTopics
,
Commands
:
c
ommands
,
HelpTopics
:
h
elpTopics
,
}
go/zodb/storage/fs1/fs1tools/reindex.go
0 → 100644
View file @
deb3bdd2
// Copyright (C) 2017 Nexedi SA and Contributors.
// Kirill Smelkov <kirr@nexedi.com>
//
// This program is free software: you can Use, Study, Modify and Redistribute
// it under the terms of the GNU General Public License version 3, or (at your
// option) any later version, as published by the Free Software Foundation.
//
// You can also Link and Combine this program with other software covered by
// the terms of any of the Free Software licenses or any of the Open Source
// Initiative approved licenses and Convey the resulting work. Corresponding
// source of such a combination shall include the source code for all other
// software used.
//
// This program is distributed WITHOUT ANY WARRANTY; without even the implied
// warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
//
// See COPYING file for full licensing terms.
// See https://www.nexedi.com/licensing for rationale and options.
package
fs1tools
import
(
"flag"
"fmt"
"io"
"os"
"log"
)
// XXX text
func
Reindex
(
path
string
)
error
{
// TODO
return
nil
}
// ----------------------------------------
const
reindexSummary
=
"dump last few transactions of a database"
func
reindexUsage
(
w
io
.
Writer
)
{
fmt
.
Fprintf
(
w
,
`Usage: fs1 reindex [options] <storage>
Dump transactions from a FileStorage in reverse order XXX
<storage> is a path to FileStorage
options:
-h --help this help text.
-verify verify that existing index is correct; don't overwrite it
`
,
ntxnDefault
)
}
func
reindexMain
(
argv
[]
string
)
{
flags
:=
flag
.
FlagSet
{
Usage
:
func
()
{
reindexUsage
(
os
.
Stderr
)
}}
flags
.
Init
(
""
,
flag
.
ExitOnError
)
// XXX -verify
flags
.
Parse
(
argv
[
1
:
])
argv
=
flags
.
Args
()
if
len
(
argv
)
<
1
{
flags
.
Usage
()
os
.
Exit
(
2
)
}
storPath
:=
argv
[
0
]
err
:=
Reindex
(
storPath
)
if
err
!=
nil
{
log
.
Fatal
(
err
)
}
}
go/zodb/zodbtools/help.go
View file @
deb3bdd2
...
...
@@ -57,7 +57,7 @@ const helpXid =
// TODO dump format
var
H
elpTopics
=
HelpRegistry
{
var
h
elpTopics
=
HelpRegistry
{
{
"zurl"
,
"specifying database URL"
,
helpZURL
},
{
"xid"
,
"specifying object address"
,
helpXid
},
}
go/zodb/zodbtools/main.go
View file @
deb3bdd2
...
...
@@ -21,7 +21,7 @@
package
zodbtools
// registry of all zodbtools commands
var
C
ommands
=
CommandRegistry
{
var
c
ommands
=
CommandRegistry
{
// NOTE the order commands are listed here is the order how they will appear in help
// TODO analyze ?
// TODO cmp
...
...
@@ -34,6 +34,6 @@ var Commands = CommandRegistry{
var
Prog
=
MainProg
{
Name
:
"zodb"
,
Summary
:
"Zodb is a tool for managing ZODB databases"
,
Commands
:
C
ommands
,
HelpTopics
:
H
elpTopics
,
Commands
:
c
ommands
,
HelpTopics
:
h
elpTopics
,
}
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