Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(213)

Unified Diff: milo/appengine/model/revision.go

Issue 2937123004: [milo] remove unused code. (Closed)
Patch Set: Created 3 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « milo/appengine/model/doc.go ('k') | milo/appengine/model/settings.go » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: milo/appengine/model/revision.go
diff --git a/milo/appengine/model/revision.go b/milo/appengine/model/revision.go
deleted file mode 100644
index f6abc050ac9a9baa4210e21791bd97f39dda0361..0000000000000000000000000000000000000000
--- a/milo/appengine/model/revision.go
+++ /dev/null
@@ -1,69 +0,0 @@
-// Copyright 2015 The LUCI Authors. All rights reserved.
-// Use of this source code is governed under the Apache License, Version 2.0
-// that can be found in the LICENSE file.
-
-package model
-
-import (
- ds "github.com/luci/gae/service/datastore"
-
- "golang.org/x/net/context"
-)
-
-// Repository represents a repository that a Revision belongs to.
-type Repository struct {
- ds.Key
-}
-
-// GetRepository returns the repository object for a given repository URL.
-// TODO(martiniss): convert this to luci project name by 2016-01
-func GetRepository(c context.Context, repositoryURL string) *Repository {
- return &Repository{
- *ds.NewKey(c, "Repository", repositoryURL, 0, nil),
- }
-}
-
-// GetRevision returns the corresponding Revision object for a particular
-// revision hash in this repository.
-func (r *Repository) GetRevision(c context.Context, digest string) (*Revision, error) {
- rev := &Revision{
- Digest: digest,
- Repository: &r.Key,
- }
-
- err := ds.Get(c, rev)
- return rev, err
-}
-
-// RevisionMetadata is the metadata associated with a particular Revision.
-type RevisionMetadata struct {
- // Message is the commit message for a Revision.
- Message string
-}
-
-// Revision is a immutable reference to a version of the code in a given
-// repository at a given point in time.
-//
-// Note that currently revisions have no notion of branch. This will need to
-// change once we support Chromium.
-type Revision struct {
- // Digest is the content hash which uniquely identifies this Revision, in the
- // context of its repository.
- Digest string `gae:"$id"`
-
- // Repository is the repository this Revision is associated with. See the
- // Repository struct for more info.
- Repository *ds.Key `gae:"$parent"`
-
- // Metadata is any metadata (commit message, files changed, etc.)
- // associated with this Revision.
- Metadata RevisionMetadata `gae:",noindex"`
-
- // Committer is the email of the user who committed this change.
- Committer string
-
- // Generation is the generation number of this Revision. This is used to sort
- // commits into a roughly time-based order, without using timestamps.
- // See http://www.spinics.net/lists/git/msg161165.html for background.
- Generation int
-}
« no previous file with comments | « milo/appengine/model/doc.go ('k') | milo/appengine/model/settings.go » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698