| Index: go/src/infra/gae/libs/meta/eg.go
|
| diff --git a/go/src/infra/gae/libs/meta/eg.go b/go/src/infra/gae/libs/meta/eg.go
|
| index 25463238fd8b095182a15a6524605d5ea0f34186..01e0f3eb4a06752039e5e7414ef02e5203aec904 100644
|
| --- a/go/src/infra/gae/libs/meta/eg.go
|
| +++ b/go/src/infra/gae/libs/meta/eg.go
|
| @@ -2,16 +2,16 @@
|
| // Use of this source code is governed by a BSD-style license that can be
|
| // found in the LICENSE file.
|
|
|
| -// +build appengine
|
| -
|
| package meta
|
|
|
| import (
|
| + "golang.org/x/net/context"
|
| +
|
| "appengine/datastore"
|
|
|
| "github.com/luci/luci-go/common/errors"
|
|
|
| - "infra/gae/libs/context"
|
| + "infra/gae/libs/wrapper"
|
| )
|
|
|
| var mark = errors.MakeMarkFn("eg")
|
| @@ -31,12 +31,13 @@ type EntityGroupMeta struct {
|
| // GetEntityGroupVersion returns the entity group version for the entity group
|
| // containing root. If the entity group doesn't exist, this function will return
|
| // zero and a nil error.
|
| -func GetEntityGroupVersion(c context.SingleReadWriter, root *datastore.Key) (int64, error) {
|
| +func GetEntityGroupVersion(c context.Context, root *datastore.Key) (int64, error) {
|
| + ds := wrapper.GetDS(c)
|
| for root.Parent() != nil {
|
| root = root.Parent()
|
| }
|
| egm := &EntityGroupMeta{ID: 1, Parent: root}
|
| - err := c.Get(egm)
|
| + err := ds.Get(egm)
|
| if err != datastore.ErrNoSuchEntity {
|
| err = mark(err)
|
| } else {
|
|
|