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

Side by Side Diff: appengine/findit/common/blame.py

Issue 2435863003: [Findit] Add local git parsers. (Closed)
Patch Set: Fix nits. Created 4 years, 1 month 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
OLDNEW
1 # Copyright 2014 The Chromium Authors. All rights reserved. 1 # Copyright 2014 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 5
6 class Region(object): 6 class Region(object):
7 """A region of some (unspecified) file at a (known) revision.""" 7 """A region of some (unspecified) file at a (known) revision."""
8 def __init__(self, start, count, revision, 8 def __init__(self, start, count, revision,
9 author_name, author_email, author_time): 9 author_name=None, author_email=None, author_time=None):
stgao 2016/10/25 23:01:33 why default to None? An't they required? not avail
Sharu Jiang 2016/10/26 06:13:37 They are available for local checkout. This is jus
10 self.start = start 10 self.start = start
11 self.count = count 11 self.count = count
12 self.revision = revision 12 self.revision = revision
13 self.author_name = author_name 13 self.author_name = author_name
14 self.author_email = author_email 14 self.author_email = author_email
15 self.author_time = author_time 15 self.author_time = author_time
16 16
17 def ToDict(self): 17 def ToDict(self):
18 return { 18 return {
19 'start': self.start, 19 'start': self.start,
(...skipping 17 matching lines...) Expand all
37 37
38 def ToDict(self): 38 def ToDict(self):
39 regions = [] 39 regions = []
40 for region in self: 40 for region in self:
41 regions.append(region.ToDict()) 41 regions.append(region.ToDict())
42 return { 42 return {
43 'revision': self.revision, 43 'revision': self.revision,
44 'path': self.path, 44 'path': self.path,
45 'regions': regions 45 'regions': regions
46 } 46 }
OLDNEW
« no previous file with comments | « no previous file | appengine/findit/common/change_log.py » ('j') | appengine/findit/common/change_log.py » ('J')

Powered by Google App Engine
This is Rietveld 408576698