+2011-01-18 Ojan Vafai <ojan@chromium.org>
+
+ Reviewed by Eric Seidel.
+
+ make file expansion use the file at the svn revision the diff was created at
+ https://bugs.webkit.org/show_bug.cgi?id=52650
+
+ This only works for patches created with SVN for now since the git
+ diff does not include SVN revision numbers in it.
+
+ * PrettyPatch/PrettyPatch.rb:
+ * code-review.js:
+
2011-01-15 Adam Barth <abarth@webkit.org>
Rubber-stamped by Eric Seidel.
}
</style>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script>
-<script src="code-review.js?version=24"></script>
+<script src="code-review.js?version=25"></script>
EOF
def self.revisionOrDescription(string)
else
str += @sections.collect{ |section| section.to_html }.join("<br>\n") unless @sections.nil?
end
+
+ if @from then
+ str += "<span class='revision'>" + @from + "</span>"
+ end
+
str += "</div>\n"
end
convertAllFileDiffs(difftype, file_diffs);
}
+ function patchRevision() {
+ var revision = $('.revision');
+ return revision[0] ? revision.first().text() : null;
+ }
+
function getWebKitSourceFile(file_name, onLoad, expand_bar) {
function handleLoad(contents) {
original_file_contents[file_name] = contents.split('\n');
onLoad();
};
+ var revision = patchRevision();
+ var queryParameters = revision ? '?p=' + revision : '';
+
$.ajax({
- url: WEBKIT_BASE_DIR + file_name,
+ url: WEBKIT_BASE_DIR + file_name + queryParameters,
context: document.body,
complete: function(xhr, data) {
if (xhr.status == 0)
}
function handleLoadError(expand_bar) {
- // FIXME: In this case, try fetching the source file at the revision the patch was created at,
- // in case the file has bee deleted.
- // Might need to modify webkit-patch to include that data in the diff.
replaceExpandLinkContainers(expand_bar, "Can't expand. Is this a new or deleted file?");
}