##// END OF EJS Templates
Extended commit search schema with date of commit
marcink -
r2693:66c778b8 beta
parent child Browse files
Show More
@@ -74,6 +74,7 b' FRAGMENTER = ContextFragmenter(200)'
74
74
75 CHGSETS_SCHEMA = Schema(
75 CHGSETS_SCHEMA = Schema(
76 raw_id=ID(unique=True, stored=True),
76 raw_id=ID(unique=True, stored=True),
77 date=NUMERIC(stored=True),
77 last=BOOLEAN(),
78 last=BOOLEAN(),
78 owner=TEXT(),
79 owner=TEXT(),
79 repository=ID(unique=True, stored=True),
80 repository=ID(unique=True, stored=True),
@@ -196,6 +196,7 b' class WhooshIndexingDaemon(object):'
196 writer.add_document(
196 writer.add_document(
197 raw_id=unicode(cs.raw_id),
197 raw_id=unicode(cs.raw_id),
198 owner=unicode(repo.contact),
198 owner=unicode(repo.contact),
199 date=cs._timestamp,
199 repository=safe_unicode(repo_name),
200 repository=safe_unicode(repo_name),
200 author=cs.author,
201 author=cs.author,
201 message=cs.message,
202 message=cs.message,
@@ -60,6 +60,10 b' class GitChangeset(BaseChangeset):'
60 getattr(self._commit, self._date_tz_property))
60 getattr(self._commit, self._date_tz_property))
61
61
62 @LazyProperty
62 @LazyProperty
63 def _timestamp(self):
64 return getattr(self._commit, self._date_property)
65
66 @LazyProperty
63 def status(self):
67 def status(self):
64 """
68 """
65 Returns modified, added, removed, deleted files for current changeset
69 Returns modified, added, removed, deleted files for current changeset
@@ -52,6 +52,10 b' class MercurialChangeset(BaseChangeset):'
52 return date_fromtimestamp(*self._ctx.date())
52 return date_fromtimestamp(*self._ctx.date())
53
53
54 @LazyProperty
54 @LazyProperty
55 def _timestamp(self):
56 return self._ctx.date()[0]
57
58 @LazyProperty
55 def status(self):
59 def status(self):
56 """
60 """
57 Returns modified, added, removed, deleted files for current changeset
61 Returns modified, added, removed, deleted files for current changeset
General Comments 0
You need to be logged in to leave comments. Login now