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

Side by Side Diff: appengine/findit/model/base_suspected_cl.py

Issue 2538373003: [Culprit-Finder] Merge lib/ to libs/. (Closed)
Patch Set: . Created 4 years 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 unified diff | Download patch
« no previous file with comments | « appengine/findit/libs/time_util.py ('k') | appengine/findit/model/base_triaged_model.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright 2016 The Chromium Authors. All rights reserved. 1 # Copyright 2016 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 4
5 from google.appengine.ext import ndb 5 from google.appengine.ext import ndb
6 6
7 from lib import time_util 7 from libs import time_util
8 8
9 9
10 class BaseSuspectedCL(ndb.Model): 10 class BaseSuspectedCL(ndb.Model):
11 """Represents base information about a suspected cl.""" 11 """Represents base information about a suspected cl."""
12 12
13 # Repo or project name of the suspected CL, eg: chromium, etc. 13 # Repo or project name of the suspected CL, eg: chromium, etc.
14 repo_name = ndb.StringProperty(indexed=True) 14 repo_name = ndb.StringProperty(indexed=True)
15 15
16 # The Git hash revision of the suspected CL. 16 # The Git hash revision of the suspected CL.
17 revision = ndb.StringProperty(indexed=False) 17 revision = ndb.StringProperty(indexed=False)
(...skipping 21 matching lines...) Expand all
39 instance = cls(key=cls._CreateKey(repo_name, revision)) 39 instance = cls(key=cls._CreateKey(repo_name, revision))
40 instance.repo_name = repo_name 40 instance.repo_name = repo_name
41 instance.revision = revision 41 instance.revision = revision
42 instance.commit_position = commit_position 42 instance.commit_position = commit_position
43 instance.identified_time = time_util.GetUTCNow() 43 instance.identified_time = time_util.GetUTCNow()
44 return instance 44 return instance
45 45
46 @classmethod 46 @classmethod
47 def Get(cls, repo_name, revision): # pragma: no cover 47 def Get(cls, repo_name, revision): # pragma: no cover
48 return cls._CreateKey(repo_name, revision).get() 48 return cls._CreateKey(repo_name, revision).get()
OLDNEW
« no previous file with comments | « appengine/findit/libs/time_util.py ('k') | appengine/findit/model/base_triaged_model.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698