Skip to content

Commit

Permalink
Merge pull request #960 from tamird/misc-clean
Browse files Browse the repository at this point in the history
Misc clean
  • Loading branch information
tamird committed May 8, 2015
2 parents 9d86eb1 + 9830a5f commit 7cee55b
Show file tree
Hide file tree
Showing 12 changed files with 75 additions and 39 deletions.
16 changes: 8 additions & 8 deletions GLOCKFILE
Original file line number Diff line number Diff line change
Expand Up @@ -9,24 +9,24 @@ cmd golang.org/x/tools/cmd/goimports
cmd golang.org/x/tools/cmd/stringer
bitbucket.org/tebeka/go2xunit 77968f802fb3
github.com/agtorre/gocolorize f42b554bf7f006936130c9bb4f971afd2d87f671
github.com/biogo/store cb1ae010c5c75b7ce4f5c5d0ef92defcafdfdce4
github.com/biogo/store e1f74b3c58befe661feed7fa4cf52436de753128
github.com/cockroachdb/c-lz4 6e71f140a365017bbe0904710007f8725fd3f809
github.com/cockroachdb/c-protobuf 9e8dac59ca2a3fc82cd0665ad32b1a36f3df40b8
github.com/cockroachdb/c-rocksdb e120ce0fb32f86b94188928743270ea11ff016b3
github.com/cockroachdb/c-snappy 0975dbfba5147722a2cad2229f34aad2ee85c2b4
github.com/cockroachdb/c-snappy 618733f9e5bab8463b9049117a335a7a1bfc9fd5
github.com/cockroachdb/clog d2542376307a54ad0ff768be384c3c589ffacca1
github.com/coreos/etcd e5f2f401450b56947e231336f9e8350059428036
github.com/coreos/etcd b24dd8e4e67d7203c5a68cd43de4f6ffcfff5e66
github.com/elazarl/go-bindata-assetfs bea323321994103859d60197d229f1a94699dde3
github.com/gogo/protobuf bc946d07d1016848dfd2507f90f0859c9471681e
github.com/golang/lint 39d15d55e9777df34cdffde4f406ab27fd2e60c0
github.com/gogo/protobuf e888c342b46b97d9bf828e98ac755d227b57d6e8
github.com/golang/lint dea130113ab8ebacb52dbce09c9a4c92951afdca
github.com/inconshreveable/mousetrap 76626ae9c91c4f2a10f34cad8ce83ea42c93bb75
github.com/jteeuwen/go-bindata 7362d4b6b2ce6a7d3c28b523a6e40629f4d81116
github.com/jteeuwen/go-bindata 76a6418a0ab47ba506715004f6de6fc8eb628b0e
github.com/julienschmidt/httprouter 8c199fb6259ffc1af525cc3ad52ee60ba8359669
github.com/kisielk/errcheck a48456c583c0111c8310fc59335f6496b8eb85f1
github.com/kisielk/gotool d678387370a2eb9b5b0a33218bc8c9d8de15b6be
github.com/robfig/glock 78c45da050a4d993d12ad07e8ddb10a4891ac701
github.com/robfig/glock 08e6ace4e089bf5c211592f64a24082e54b887b5
github.com/spf13/cobra bba56042cf767e329430e7c7f68c3f9f640b4b8b
github.com/spf13/pflag 8730624c6c03fa1c5b8ae471cb5e4d735784d32a
golang.org/x/net 169f42267807fe93f4a4b0150583e410aefafe4e
golang.org/x/net a8c61998a557a37435f719980da368469c10bfed
golang.org/x/tools 96f6cfbb921ad6d191c67d09a6d4c4fd056403ae
gopkg.in/yaml.v1 9f9df34309c04878acc86042b16630b0f696e1de
3 changes: 1 addition & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -116,8 +116,7 @@ acceptance:

.PHONY: check
check:
# TODO(tamird): contribute a patch to gogoproto that makes it pass errcheck and then remove this ignore
errcheck -ignore 'bytes:Write.*,compress/gzip:Close,io:(Close|Write),net:Close,net/http:(Close|Write),net/rpc:Close,os:Close,github.com/spf13/cobra:Usage' -ignorepkg github.com/cockroachdb/cockroach/proto $(PKG)
errcheck -ignore 'bytes:Write.*,compress/gzip:Close,io:(Close|Write),net:Close,net/http:(Close|Write),net/rpc:Close,os:Close,github.com/spf13/cobra:Usage' $(PKG)

.PHONY: clean
clean:
Expand Down
2 changes: 1 addition & 1 deletion githooks/post-checkout
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ fi
LOG=$(git log -U0 --oneline -p HEAD@{1}..HEAD GLOCKFILE)
[ -z "$LOG" ] && echo "glock: no changes to apply" && exit 0
echo "glock: applying updates..."
glock apply <<< "$LOG"
glock apply github.com/cockroachdb/cockroach <<< "$LOG"
2 changes: 1 addition & 1 deletion githooks/post-merge
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ fi
LOG=$(git log -U0 --oneline -p HEAD@{1}..HEAD GLOCKFILE)
[ -z "$LOG" ] && echo "glock: no changes to apply" && exit 0
echo "glock: applying updates..."
glock apply <<< "$LOG"
glock apply github.com/cockroachdb/cockroach <<< "$LOG"
2 changes: 1 addition & 1 deletion githooks/post-rewrite
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@ fi
LOG=$(git log -U0 --oneline -p HEAD@{1}..HEAD GLOCKFILE)
[ -z "$LOG" ] && echo "glock: no changes to apply" && exit 0
echo "glock: applying updates..."
glock apply <<< "$LOG"
glock apply github.com/cockroachdb/cockroach <<< "$LOG"
9 changes: 4 additions & 5 deletions gossip/group.go
Original file line number Diff line number Diff line change
Expand Up @@ -202,13 +202,12 @@ func (g *group) addInfo(i *info) (contentsChanged bool, err error) {
// value of prospective info is lower, take the minimum of the two
// Hops values.
if existingInfo, ok := g.Infos[i.Key]; ok {
if existingInfo.Timestamp < i.Timestamp ||
(existingInfo.Timestamp == i.Timestamp && existingInfo.Hops > i.Hops) {
g.removeInternal(existingInfo)
} else {
err = util.Errorf("current group info %+v newer than proposed info %+v", existingInfo, i)
if i.Timestamp < existingInfo.Timestamp ||
(i.Timestamp == existingInfo.Timestamp && i.Hops >= existingInfo.Hops) {
err = util.Errorf("info %+v older than current info %+v", i, existingInfo)
return
}
g.removeInternal(existingInfo)
contentsChanged = !reflect.DeepEqual(existingInfo.Val, i.Val)
} else {
// No preexisting info means contentsChanged is true.
Expand Down
19 changes: 14 additions & 5 deletions proto/api.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 10 additions & 4 deletions proto/config.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

15 changes: 11 additions & 4 deletions proto/data.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 3 additions & 1 deletion proto/data_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,9 @@ func TestUnmarshal(t *testing.T) {
}
for i, c := range testCases {
key := &Key{}
key.Unmarshal(c.input)
if err := key.Unmarshal(c.input); err != nil {
t.Fatal(err)
}
if (key == nil) != c.expectedNil {
t.Errorf("%d: Expect result to not to be %v.", i, c.expectedNil)
}
Expand Down
4 changes: 3 additions & 1 deletion proto/errors.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

24 changes: 18 additions & 6 deletions proto/internal.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 7cee55b

Please sign in to comment.