| Dave Borowitz | 9de6595 | 2012-08-13 16:09:45 -0700 | [diff] [blame] | 1 | // Copyright 2012 Google Inc. All Rights Reserved. |
| 2 | // |
| 3 | // Licensed under the Apache License, Version 2.0 (the "License"); |
| 4 | // you may not use this file except in compliance with the License. |
| 5 | // You may obtain a copy of the License at |
| 6 | // |
| 7 | // http://www.apache.org/licenses/LICENSE-2.0 |
| 8 | // |
| 9 | // Unless required by applicable law or agreed to in writing, software |
| 10 | // distributed under the License is distributed on an "AS IS" BASIS, |
| 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 12 | // See the License for the specific language governing permissions and |
| 13 | // limitations under the License. |
| 14 | |
| 15 | package com.google.gitiles; |
| 16 | |
| Dave Borowitz | 9de6595 | 2012-08-13 16:09:45 -0700 | [diff] [blame] | 17 | import static com.google.common.base.Preconditions.checkState; |
| Dave Borowitz | d6184a6 | 2013-01-10 11:53:54 -0800 | [diff] [blame] | 18 | import static org.eclipse.jgit.diff.DiffEntry.ChangeType.COPY; |
| 19 | import static org.eclipse.jgit.diff.DiffEntry.ChangeType.DELETE; |
| 20 | import static org.eclipse.jgit.diff.DiffEntry.ChangeType.RENAME; |
| 21 | |
| Dave Borowitz | 9de6595 | 2012-08-13 16:09:45 -0700 | [diff] [blame] | 22 | import com.google.common.collect.ImmutableMap; |
| 23 | import com.google.common.collect.ImmutableSet; |
| 24 | import com.google.common.collect.Lists; |
| 25 | import com.google.common.collect.Maps; |
| Dave Borowitz | 75a7832 | 2014-03-16 12:13:08 -0700 | [diff] [blame] | 26 | import com.google.common.collect.Sets; |
| Dave Borowitz | 0155127 | 2014-03-16 13:43:16 -0700 | [diff] [blame] | 27 | import com.google.gitiles.CommitData.DiffList; |
| 28 | import com.google.gitiles.CommitData.Field; |
| Dave Borowitz | 9de6595 | 2012-08-13 16:09:45 -0700 | [diff] [blame] | 29 | import com.google.template.soy.data.restricted.NullData; |
| Dave Borowitz | 3b744b1 | 2016-08-19 16:11:10 -0400 | [diff] [blame] | 30 | import java.io.IOException; |
| 31 | import java.util.List; |
| 32 | import java.util.Map; |
| 33 | import java.util.Set; |
| 34 | import javax.annotation.Nullable; |
| 35 | import javax.servlet.http.HttpServletRequest; |
| Dave Borowitz | 9de6595 | 2012-08-13 16:09:45 -0700 | [diff] [blame] | 36 | import org.eclipse.jgit.diff.DiffEntry; |
| 37 | import org.eclipse.jgit.diff.DiffEntry.ChangeType; |
| Dave Borowitz | 9de6595 | 2012-08-13 16:09:45 -0700 | [diff] [blame] | 38 | import org.eclipse.jgit.lib.Constants; |
| Dave Borowitz | 9de6595 | 2012-08-13 16:09:45 -0700 | [diff] [blame] | 39 | import org.eclipse.jgit.lib.PersonIdent; |
| 40 | import org.eclipse.jgit.lib.Ref; |
| Dave Borowitz | 9de6595 | 2012-08-13 16:09:45 -0700 | [diff] [blame] | 41 | import org.eclipse.jgit.revwalk.RevCommit; |
| 42 | import org.eclipse.jgit.revwalk.RevWalk; |
| Dave Borowitz | 9de6595 | 2012-08-13 16:09:45 -0700 | [diff] [blame] | 43 | import org.eclipse.jgit.util.RelativeDateFormatter; |
| Dave Borowitz | 9de6595 | 2012-08-13 16:09:45 -0700 | [diff] [blame] | 44 | |
| Dave Borowitz | 9de6595 | 2012-08-13 16:09:45 -0700 | [diff] [blame] | 45 | /** Soy data converter for git commits. */ |
| Dave Borowitz | 6ed598f | 2014-04-17 10:09:50 -0700 | [diff] [blame] | 46 | public class CommitSoyData { |
| Han-Wen Nienhuys | c0200f6 | 2016-05-02 17:34:51 +0200 | [diff] [blame] | 47 | static final ImmutableSet<Field> DEFAULT_FIELDS = |
| 48 | Sets.immutableEnumSet( |
| 49 | Field.AUTHOR, |
| 50 | Field.COMMITTER, |
| 51 | Field.SHA, |
| 52 | Field.TREE, |
| 53 | Field.TREE_URL, |
| 54 | Field.PARENTS, |
| 55 | Field.MESSAGE, |
| 56 | Field.LOG_URL, |
| 57 | Field.ARCHIVE_URL, |
| 58 | Field.ARCHIVE_TYPE); |
| Dave Borowitz | 9de6595 | 2012-08-13 16:09:45 -0700 | [diff] [blame] | 59 | |
| Han-Wen Nienhuys | c0200f6 | 2016-05-02 17:34:51 +0200 | [diff] [blame] | 60 | private static final ImmutableSet<Field> NESTED_FIELDS = |
| 61 | Sets.immutableEnumSet(Field.PARENT_BLAME_URL); |
| Dave Borowitz | f03fcea | 2014-04-21 17:20:33 -0700 | [diff] [blame] | 62 | |
| Dave Borowitz | 3b086a7 | 2013-07-02 15:03:03 -0700 | [diff] [blame] | 63 | private Linkifier linkifier; |
| Gustaf Lundh | 06a9870 | 2015-08-17 17:29:11 +0200 | [diff] [blame] | 64 | private CommitData.Builder cdb; |
| Dave Borowitz | c8a1568 | 2013-07-02 14:33:08 -0700 | [diff] [blame] | 65 | private ArchiveFormat archiveFormat; |
| Dave Borowitz | 9de6595 | 2012-08-13 16:09:45 -0700 | [diff] [blame] | 66 | |
| Dave Borowitz | 0155127 | 2014-03-16 13:43:16 -0700 | [diff] [blame] | 67 | CommitSoyData setLinkifier(@Nullable Linkifier linkifier) { |
| 68 | this.linkifier = linkifier; |
| Dave Borowitz | 3b086a7 | 2013-07-02 15:03:03 -0700 | [diff] [blame] | 69 | return this; |
| Dave Borowitz | 9de6595 | 2012-08-13 16:09:45 -0700 | [diff] [blame] | 70 | } |
| 71 | |
| Dave Borowitz | 0155127 | 2014-03-16 13:43:16 -0700 | [diff] [blame] | 72 | CommitSoyData setArchiveFormat(@Nullable ArchiveFormat archiveFormat) { |
| 73 | this.archiveFormat = archiveFormat; |
| Dave Borowitz | c8a1568 | 2013-07-02 14:33:08 -0700 | [diff] [blame] | 74 | return this; |
| 75 | } |
| 76 | |
| Han-Wen Nienhuys | c0200f6 | 2016-05-02 17:34:51 +0200 | [diff] [blame] | 77 | Map<String, Object> toSoyData( |
| Jonathan Nieder | b49306a | 2019-03-07 14:10:57 -0800 | [diff] [blame] | 78 | HttpServletRequest req, RevWalk walk, RevCommit c, Set<Field> fs, DateFormatter df) |
| 79 | throws IOException { |
| Dave Borowitz | 0155127 | 2014-03-16 13:43:16 -0700 | [diff] [blame] | 80 | GitilesView view = ViewFilter.getView(req); |
| Gustaf Lundh | 06a9870 | 2015-08-17 17:29:11 +0200 | [diff] [blame] | 81 | if (cdb == null) { |
| 82 | cdb = new CommitData.Builder(); |
| 83 | } |
| 84 | |
| Jonathan Nieder | b49306a | 2019-03-07 14:10:57 -0800 | [diff] [blame] | 85 | CommitData cd = cdb.setArchiveFormat(archiveFormat).build(req, walk, c, fs); |
| Dave Borowitz | 3b086a7 | 2013-07-02 15:03:03 -0700 | [diff] [blame] | 86 | |
| Dave Borowitz | 0155127 | 2014-03-16 13:43:16 -0700 | [diff] [blame] | 87 | Map<String, Object> data = Maps.newHashMapWithExpectedSize(fs.size()); |
| 88 | if (cd.author != null) { |
| 89 | data.put("author", toSoyData(cd.author, df)); |
| Dave Borowitz | 9de6595 | 2012-08-13 16:09:45 -0700 | [diff] [blame] | 90 | } |
| Dave Borowitz | 0155127 | 2014-03-16 13:43:16 -0700 | [diff] [blame] | 91 | if (cd.committer != null) { |
| 92 | data.put("committer", toSoyData(cd.committer, df)); |
| Dave Borowitz | 9de6595 | 2012-08-13 16:09:45 -0700 | [diff] [blame] | 93 | } |
| Dave Borowitz | 0155127 | 2014-03-16 13:43:16 -0700 | [diff] [blame] | 94 | if (cd.sha != null) { |
| 95 | data.put("sha", cd.sha.name()); |
| Dave Borowitz | 9de6595 | 2012-08-13 16:09:45 -0700 | [diff] [blame] | 96 | } |
| Dave Borowitz | 0155127 | 2014-03-16 13:43:16 -0700 | [diff] [blame] | 97 | if (cd.abbrev != null) { |
| 98 | data.put("abbrevSha", cd.abbrev.name()); |
| Dave Borowitz | 9de6595 | 2012-08-13 16:09:45 -0700 | [diff] [blame] | 99 | } |
| Dave Borowitz | 0155127 | 2014-03-16 13:43:16 -0700 | [diff] [blame] | 100 | if (cd.url != null) { |
| 101 | data.put("url", cd.url); |
| Dave Borowitz | 9de6595 | 2012-08-13 16:09:45 -0700 | [diff] [blame] | 102 | } |
| Dave Borowitz | 0155127 | 2014-03-16 13:43:16 -0700 | [diff] [blame] | 103 | if (cd.logUrl != null) { |
| 104 | data.put("logUrl", cd.logUrl); |
| Dave Borowitz | c222cce | 2013-06-19 10:47:06 -0700 | [diff] [blame] | 105 | } |
| Dave Borowitz | 0155127 | 2014-03-16 13:43:16 -0700 | [diff] [blame] | 106 | if (cd.archiveUrl != null) { |
| 107 | data.put("archiveUrl", cd.archiveUrl); |
| Dave Borowitz | c8a1568 | 2013-07-02 14:33:08 -0700 | [diff] [blame] | 108 | } |
| Dave Borowitz | 0155127 | 2014-03-16 13:43:16 -0700 | [diff] [blame] | 109 | if (cd.archiveType != null) { |
| 110 | data.put("archiveType", cd.archiveType.getShortName()); |
| Dave Borowitz | 9de6595 | 2012-08-13 16:09:45 -0700 | [diff] [blame] | 111 | } |
| Dave Borowitz | 0155127 | 2014-03-16 13:43:16 -0700 | [diff] [blame] | 112 | if (cd.tree != null) { |
| 113 | data.put("tree", cd.tree.name()); |
| Dave Borowitz | 9de6595 | 2012-08-13 16:09:45 -0700 | [diff] [blame] | 114 | } |
| Dave Borowitz | 0155127 | 2014-03-16 13:43:16 -0700 | [diff] [blame] | 115 | if (cd.treeUrl != null) { |
| 116 | data.put("treeUrl", cd.treeUrl); |
| Dave Borowitz | 9de6595 | 2012-08-13 16:09:45 -0700 | [diff] [blame] | 117 | } |
| Dave Borowitz | 0155127 | 2014-03-16 13:43:16 -0700 | [diff] [blame] | 118 | if (cd.parents != null) { |
| Dave Borowitz | f03fcea | 2014-04-21 17:20:33 -0700 | [diff] [blame] | 119 | data.put("parents", toSoyData(view, fs, cd.parents)); |
| Dave Borowitz | 9de6595 | 2012-08-13 16:09:45 -0700 | [diff] [blame] | 120 | } |
| Dave Borowitz | 0155127 | 2014-03-16 13:43:16 -0700 | [diff] [blame] | 121 | if (cd.shortMessage != null) { |
| 122 | data.put("shortMessage", cd.shortMessage); |
| Dave Borowitz | 9de6595 | 2012-08-13 16:09:45 -0700 | [diff] [blame] | 123 | } |
| Dave Borowitz | 0155127 | 2014-03-16 13:43:16 -0700 | [diff] [blame] | 124 | if (cd.branches != null) { |
| 125 | data.put("branches", toSoyData(view, cd.branches, Constants.R_HEADS)); |
| Dave Borowitz | 9de6595 | 2012-08-13 16:09:45 -0700 | [diff] [blame] | 126 | } |
| Dave Borowitz | 0155127 | 2014-03-16 13:43:16 -0700 | [diff] [blame] | 127 | if (cd.tags != null) { |
| 128 | data.put("tags", toSoyData(view, cd.tags, Constants.R_TAGS)); |
| Dave Borowitz | 9de6595 | 2012-08-13 16:09:45 -0700 | [diff] [blame] | 129 | } |
| Dave Borowitz | 0155127 | 2014-03-16 13:43:16 -0700 | [diff] [blame] | 130 | if (cd.message != null) { |
| Dave Borowitz | 9de6595 | 2012-08-13 16:09:45 -0700 | [diff] [blame] | 131 | if (linkifier != null) { |
| Dave Borowitz | 0155127 | 2014-03-16 13:43:16 -0700 | [diff] [blame] | 132 | data.put("message", linkifier.linkify(req, cd.message)); |
| Dave Borowitz | 9de6595 | 2012-08-13 16:09:45 -0700 | [diff] [blame] | 133 | } else { |
| Dave Borowitz | 0155127 | 2014-03-16 13:43:16 -0700 | [diff] [blame] | 134 | data.put("message", cd.message); |
| Dave Borowitz | 9de6595 | 2012-08-13 16:09:45 -0700 | [diff] [blame] | 135 | } |
| 136 | } |
| Dave Borowitz | 0155127 | 2014-03-16 13:43:16 -0700 | [diff] [blame] | 137 | if (cd.diffEntries != null) { |
| 138 | data.put("diffTree", toSoyData(view, cd.diffEntries)); |
| Dave Borowitz | 9de6595 | 2012-08-13 16:09:45 -0700 | [diff] [blame] | 139 | } |
| Han-Wen Nienhuys | c0200f6 | 2016-05-02 17:34:51 +0200 | [diff] [blame] | 140 | checkState( |
| 141 | Sets.difference(fs, NESTED_FIELDS).size() == data.size(), |
| 142 | "bad commit data fields: %s != %s", |
| 143 | fs, |
| 144 | data.keySet()); |
| Michael Moss | 92bb12f | 2014-05-09 10:55:35 -0700 | [diff] [blame] | 145 | return data; |
| Dave Borowitz | 9de6595 | 2012-08-13 16:09:45 -0700 | [diff] [blame] | 146 | } |
| 147 | |
| Jonathan Nieder | b49306a | 2019-03-07 14:10:57 -0800 | [diff] [blame] | 148 | Map<String, Object> toSoyData( |
| 149 | HttpServletRequest req, RevWalk walk, RevCommit commit, DateFormatter df) throws IOException { |
| 150 | return toSoyData(req, walk, commit, DEFAULT_FIELDS, df); |
| Dave Borowitz | 9de6595 | 2012-08-13 16:09:45 -0700 | [diff] [blame] | 151 | } |
| 152 | |
| 153 | // TODO(dborowitz): Extract this. |
| Dave Borowitz | 97a7031 | 2014-04-28 15:50:23 -0700 | [diff] [blame] | 154 | public static Map<String, String> toSoyData(PersonIdent ident, DateFormatter df) { |
| Dave Borowitz | 9de6595 | 2012-08-13 16:09:45 -0700 | [diff] [blame] | 155 | return ImmutableMap.of( |
| 156 | "name", ident.getName(), |
| 157 | "email", ident.getEmailAddress(), |
| Dave Borowitz | 97a7031 | 2014-04-28 15:50:23 -0700 | [diff] [blame] | 158 | "time", df.format(ident), |
| Dave Borowitz | 9de6595 | 2012-08-13 16:09:45 -0700 | [diff] [blame] | 159 | // TODO(dborowitz): Switch from relative to absolute at some threshold. |
| 160 | "relativeTime", RelativeDateFormatter.format(ident.getWhen())); |
| 161 | } |
| 162 | |
| Han-Wen Nienhuys | c0200f6 | 2016-05-02 17:34:51 +0200 | [diff] [blame] | 163 | private List<Map<String, String>> toSoyData( |
| 164 | GitilesView view, Set<Field> fs, List<RevCommit> parents) { |
| Dave Borowitz | 0155127 | 2014-03-16 13:43:16 -0700 | [diff] [blame] | 165 | List<Map<String, String>> result = Lists.newArrayListWithCapacity(parents.size()); |
| Dave Borowitz | 9de6595 | 2012-08-13 16:09:45 -0700 | [diff] [blame] | 166 | int i = 1; |
| 167 | // TODO(dborowitz): Render something slightly different when we're actively |
| 168 | // viewing a diff against one of the parents. |
| 169 | for (RevCommit parent : parents) { |
| 170 | String name = parent.name(); |
| Dave Borowitz | 359ad6d | 2014-04-21 16:07:59 -0700 | [diff] [blame] | 171 | // Clear path on parent diff view, since this parent may not have a diff |
| 172 | // for the path in question. |
| Dave Borowitz | dd3c3d9 | 2013-03-11 16:38:41 -0700 | [diff] [blame] | 173 | GitilesView.Builder diff = GitilesView.diff().copyFrom(view).setPathPart(""); |
| Dave Borowitz | 9de6595 | 2012-08-13 16:09:45 -0700 | [diff] [blame] | 174 | String parentName; |
| Dave Borowitz | 0155127 | 2014-03-16 13:43:16 -0700 | [diff] [blame] | 175 | if (parents.size() == 1) { |
| Dave Borowitz | 9de6595 | 2012-08-13 16:09:45 -0700 | [diff] [blame] | 176 | parentName = view.getRevision().getName() + "^"; |
| 177 | } else { |
| 178 | parentName = view.getRevision().getName() + "^" + (i++); |
| 179 | } |
| Dave Borowitz | 8d11fb7 | 2014-09-23 10:27:31 -0700 | [diff] [blame] | 180 | diff.setOldRevision(parentName, parent); |
| 181 | |
| Dave Borowitz | f03fcea | 2014-04-21 17:20:33 -0700 | [diff] [blame] | 182 | Map<String, String> e = Maps.newHashMapWithExpectedSize(4); |
| 183 | e.put("sha", name); |
| Han-Wen Nienhuys | c0200f6 | 2016-05-02 17:34:51 +0200 | [diff] [blame] | 184 | e.put("url", GitilesView.revision().copyFrom(view).setRevision(parentName, parent).toUrl()); |
| Dave Borowitz | 8d11fb7 | 2014-09-23 10:27:31 -0700 | [diff] [blame] | 185 | e.put("diffUrl", diff.toUrl()); |
| Dave Borowitz | f03fcea | 2014-04-21 17:20:33 -0700 | [diff] [blame] | 186 | if (fs.contains(Field.PARENT_BLAME_URL)) { |
| 187 | // Assumes caller has ensured path is a file. |
| Han-Wen Nienhuys | c0200f6 | 2016-05-02 17:34:51 +0200 | [diff] [blame] | 188 | e.put( |
| 189 | "blameUrl", |
| 190 | GitilesView.blame() |
| 191 | .copyFrom(view) |
| 192 | .setRevision(Revision.peeled(parentName, parent)) |
| 193 | .toUrl()); |
| Dave Borowitz | f03fcea | 2014-04-21 17:20:33 -0700 | [diff] [blame] | 194 | } |
| 195 | result.add(e); |
| Dave Borowitz | 9de6595 | 2012-08-13 16:09:45 -0700 | [diff] [blame] | 196 | } |
| 197 | return result; |
| 198 | } |
| 199 | |
| Dave Borowitz | 0155127 | 2014-03-16 13:43:16 -0700 | [diff] [blame] | 200 | private static Object toSoyData(GitilesView view, DiffList dl) { |
| 201 | if (dl.oldRevision == null) { |
| 202 | return NullData.INSTANCE; |
| 203 | } |
| Han-Wen Nienhuys | c0200f6 | 2016-05-02 17:34:51 +0200 | [diff] [blame] | 204 | GitilesView.Builder diffUrl = |
| 205 | GitilesView.diff() |
| 206 | .copyFrom(view) |
| 207 | .setOldRevision(dl.oldRevision) |
| 208 | .setRevision(dl.revision) |
| 209 | .setPathPart(""); |
| Dave Borowitz | 9de6595 | 2012-08-13 16:09:45 -0700 | [diff] [blame] | 210 | |
| Dave Borowitz | 0155127 | 2014-03-16 13:43:16 -0700 | [diff] [blame] | 211 | List<Object> result = Lists.newArrayListWithCapacity(dl.entries.size()); |
| 212 | for (DiffEntry e : dl.entries) { |
| 213 | Map<String, Object> entry = Maps.newHashMapWithExpectedSize(5); |
| 214 | ChangeType type = e.getChangeType(); |
| 215 | if (type != DELETE) { |
| 216 | entry.put("path", e.getNewPath()); |
| Han-Wen Nienhuys | c0200f6 | 2016-05-02 17:34:51 +0200 | [diff] [blame] | 217 | entry.put( |
| 218 | "url", |
| 219 | GitilesView.path() |
| 220 | .copyFrom(view) |
| 221 | .setRevision(dl.revision) |
| 222 | .setPathPart(e.getNewPath()) |
| 223 | .toUrl()); |
| Dave Borowitz | 0155127 | 2014-03-16 13:43:16 -0700 | [diff] [blame] | 224 | } else { |
| 225 | entry.put("path", e.getOldPath()); |
| Han-Wen Nienhuys | c0200f6 | 2016-05-02 17:34:51 +0200 | [diff] [blame] | 226 | entry.put( |
| 227 | "url", |
| 228 | GitilesView.path() |
| 229 | .copyFrom(view) |
| 230 | .setRevision(dl.oldRevision) |
| 231 | .setPathPart(e.getOldPath()) |
| 232 | .toUrl()); |
| Dave Borowitz | 9de6595 | 2012-08-13 16:09:45 -0700 | [diff] [blame] | 233 | } |
| Dave Borowitz | 0155127 | 2014-03-16 13:43:16 -0700 | [diff] [blame] | 234 | entry.put("diffUrl", diffUrl.setAnchor("F" + result.size()).toUrl()); |
| 235 | entry.put("changeType", e.getChangeType().toString()); |
| 236 | if (type == COPY || type == RENAME) { |
| 237 | entry.put("oldPath", e.getOldPath()); |
| 238 | } |
| 239 | result.add(entry); |
| Dave Borowitz | 9de6595 | 2012-08-13 16:09:45 -0700 | [diff] [blame] | 240 | } |
| Dave Borowitz | 0155127 | 2014-03-16 13:43:16 -0700 | [diff] [blame] | 241 | return result; |
| Dave Borowitz | 9de6595 | 2012-08-13 16:09:45 -0700 | [diff] [blame] | 242 | } |
| 243 | |
| Han-Wen Nienhuys | c0200f6 | 2016-05-02 17:34:51 +0200 | [diff] [blame] | 244 | private static List<Map<String, String>> toSoyData( |
| 245 | GitilesView view, List<Ref> refs, String prefix) { |
| Dave Borowitz | 9de6595 | 2012-08-13 16:09:45 -0700 | [diff] [blame] | 246 | List<Map<String, String>> result = Lists.newArrayListWithCapacity(refs.size()); |
| 247 | for (Ref ref : refs) { |
| 248 | if (ref.getName().startsWith(prefix)) { |
| Han-Wen Nienhuys | c0200f6 | 2016-05-02 17:34:51 +0200 | [diff] [blame] | 249 | result.add( |
| 250 | ImmutableMap.of( |
| 251 | "name", ref.getName().substring(prefix.length()), |
| 252 | "url", |
| 253 | GitilesView.revision() |
| 254 | .copyFrom(view) |
| 255 | .setRevision(Revision.unpeeled(ref.getName(), ref.getObjectId())) |
| 256 | .toUrl())); |
| Dave Borowitz | 9de6595 | 2012-08-13 16:09:45 -0700 | [diff] [blame] | 257 | } |
| 258 | } |
| Dave Borowitz | 9de6595 | 2012-08-13 16:09:45 -0700 | [diff] [blame] | 259 | return result; |
| 260 | } |
| Dave Borowitz | 9de6595 | 2012-08-13 16:09:45 -0700 | [diff] [blame] | 261 | } |