Skip to content

Commit

Permalink
make protobuf for index mutid field consistent
Browse files Browse the repository at this point in the history
  • Loading branch information
DocSavage committed May 10, 2024
1 parent 8b74961 commit 4e84b6e
Show file tree
Hide file tree
Showing 8 changed files with 222 additions and 221 deletions.
2 changes: 1 addition & 1 deletion cmd/labelmap-utils/analyze-index/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ func main() {
fmt.Printf("couldn't unmarshal index: %v\n", err)
}
fmt.Printf("\nLabel: %d\n", idx.Label)
fmt.Printf("Last Mutation ID: %d\n", idx.LastMutId)
fmt.Printf("Last Mutation ID: %d\n", idx.LastMutid)
fmt.Printf("Last Modification Time: %s\n", idx.LastModTime)
fmt.Printf("Last Modification User: %s\n", idx.LastModUser)
fmt.Printf("Last Modification App: %s\n\n", idx.LastModApp)
Expand Down
2 changes: 1 addition & 1 deletion cmd/labelmap-utils/body-blocks/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ func main() {
fmt.Printf("couldn't unmarshal index: %v\n", err)
}
fmt.Printf("\nLabel: %d\n", idx.Label)
fmt.Printf("Last Mutation ID: %d\n", idx.LastMutId)
fmt.Printf("Last Mutation ID: %d\n", idx.LastMutid)
fmt.Printf("Last Modification Time: %s\n", idx.LastModTime)
fmt.Printf("Last Modification User: %s\n", idx.LastModUser)
fmt.Printf("Last Modification App: %s\n\n", idx.LastModApp)
Expand Down
12 changes: 6 additions & 6 deletions datatype/common/labels/index.go
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ func (idx Index) Equal(idx2 Index) bool {
if idx.Label != idx2.Label {
return false
}
if idx.LastMutId != idx2.LastMutId {
if idx.LastMutid != idx2.LastMutid {
return false
}
if idx.LastModTime != idx2.LastModTime {
Expand Down Expand Up @@ -143,7 +143,7 @@ func (idx Index) Equal(idx2 Index) bool {
func (idx Index) StringDump(showMutationInfo bool) string {
s := fmt.Sprintf("\nLabel: %d\n", idx.Label)
if showMutationInfo {
s += fmt.Sprintf("Last Mutation ID: %d\n", idx.LastMutId)
s += fmt.Sprintf("Last Mutation ID: %d\n", idx.LastMutid)
s += fmt.Sprintf("Last Modification Time: %s\n", idx.LastModTime)
s += fmt.Sprintf("Last Modification User: %s\n", idx.LastModUser)
s += fmt.Sprintf("Last Modification App: %s\n\n", idx.LastModApp)
Expand Down Expand Up @@ -274,7 +274,7 @@ func (idx *Index) LimitToSupervoxel(supervoxel uint64) (*Index, error) {
}
sidx := new(Index)
sidx.Label = idx.Label
sidx.LastMutId = idx.LastMutId
sidx.LastMutid = idx.LastMutid
sidx.LastModTime = idx.LastModTime
sidx.LastModUser = idx.LastModUser
sidx.Blocks = make(map[uint64]*proto.SVCount)
Expand Down Expand Up @@ -426,7 +426,7 @@ func (idx *Index) Add(idx2 *Index, mutInfo dvid.MutInfo) error {
svc.SurfaceMutid = mutInfo.MutID
}
}
idx.LastMutId = mutInfo.MutID
idx.LastMutid = mutInfo.MutID
idx.LastModTime = mutInfo.Time
idx.LastModUser = mutInfo.User
idx.LastModApp = mutInfo.App
Expand All @@ -436,7 +436,7 @@ func (idx *Index) Add(idx2 *Index, mutInfo dvid.MutInfo) error {
// Cleave the given supervoxels from an index and returns a new index, modifying both receiver
// and creating new cleaved index.
func (idx *Index) Cleave(cleaveLabel uint64, toCleave []uint64, mutInfo dvid.MutInfo) (cleavedSize, remainSize uint64, cidx *Index) {
idx.LastMutId = mutInfo.MutID
idx.LastMutid = mutInfo.MutID
idx.LastModUser = mutInfo.User
idx.LastModTime = mutInfo.Time
idx.LastModApp = mutInfo.App
Expand All @@ -445,7 +445,7 @@ func (idx *Index) Cleave(cleaveLabel uint64, toCleave []uint64, mutInfo dvid.Mut
cidx = new(Index)
cidx.Label = cleaveLabel
cidx.Blocks = make(map[uint64]*proto.SVCount)
cidx.LastMutId = mutInfo.MutID
cidx.LastMutid = mutInfo.MutID
cidx.LastModUser = mutInfo.User
cidx.LastModTime = mutInfo.Time
cidx.LastModApp = mutInfo.App
Expand Down
Loading

0 comments on commit 4e84b6e

Please sign in to comment.