Opened 10 years ago
Last modified 9 years ago
#11777 closed defect
Raw revision of cached git repository in search view — at Initial Version
Reported by: | Jun Omae | Owned by: | |
---|---|---|---|
Priority: | normal | Milestone: | 1.0.3 |
Component: | version control | Version: | 0.12-stable |
Severity: | normal | Keywords: | search |
Cc: | Branch: | ||
Release Notes: | |||
API Changes: | |||
Internal Changes: |
Description
If searching changesets in cached git repository, the revisions are displayed with no changes. The issue doesn't occur if mercurial because search system requires revision
table and mercurial connector doesn't support cache.
We should show shortened revisions in search view.
-
trac/versioncontrol/web_ui/changeset.py
diff --git a/trac/versioncontrol/web_ui/changeset.py b/trac/versioncontrol/web_ui/changeset.py index 097fe81..3225e4f 100644
a b class ChangesetModule(Component): 1128 1128 SELECT repos, rev, time, author, message 1129 1129 FROM revision WHERE """ + sql, 1130 1130 args): 1131 try:1132 rev = int(rev)1133 except ValueError:1134 pass1135 1131 repos = repositories.get(id) 1136 1132 if not repos: 1137 1133 continue # revisions for a no longer active repository 1138 1134 cset = repos.resource.child('changeset', rev) 1139 1135 if 'CHANGESET_VIEW' in req.perm(cset): 1136 drev = repos.display_rev(rev) 1140 1137 yield (req.href.changeset(rev, repos.reponame or None), 1141 '[%s]: %s' % ( rev, shorten_line(log)),1138 '[%s]: %s' % (drev, shorten_line(log)), 1142 1139 from_utimestamp(ts), author, 1143 1140 shorten_result(log, terms)) 1144 1141
Change History (2)
by , 10 years ago
Attachment: | search-changeset-raw-rev.png added |
---|
by , 10 years ago
Attachment: | search-changeset-display-rev.png added |
---|
Note:
See TracTickets
for help on using tickets.