2008-11-10  Darin Adler  <darin@apple.com>

        - fix more of https://bugs.webkit.org/show_bug.cgi?id=21400
          "Edit" links for patches in comments, review queue, review emails
          should be replaced by "Review Patch" links

        * globals.pl: Fix cases that are automatically generated, such as links
        in comments in bugs.

        * template/en/custom/attachment/created.html.tmpl: Fix the link on the
        "I just created an attachment" page.

        * template/en/custom/request/queue.html.tmpl: Fix the link in the queue
        page.

2008-11-10  Darin Adler  <darin@apple.com>

        * template/en/default/request/queue.html.tmpl: Use review links instead
        of edit links in the review queue.

2008-11-10  Darin Adler  <darin@apple.com>

        * template/en/custom/request/email.txt.tmpl: Send review links instead
        of edit links when flags are set on a bug.

2008-10-27  Darin Adler  <darin@apple.com>

        * template/en/custom/attachment/reviewform.html.tmpl: Leave out the
        comment if it's untouched.

2008-10-23  Adam Roben  <aroben@apple.com>

        Fix Bug 21401: Comments field on "Review Patch" page should be
        initially filled with quoted patch

        <https://bugs.webkit.org/show_bug.cgi?id=21401>

        Reviewed by Dave Hyatt.

        * attachment.cgi:
        (edit): Retrieve the attachment data from the database instead of just
        its length. When the attachment is a patch, create a quotedpatch
        template variable that contains the patch data with each line
        prepended with "> ".
        * template/en/custom/attachment/reviewform.html.tmpl:
          - Changed the comments field to have a monospace font
          - Added an "Enter comments below:" caption above the comments field
            to make it clearer that this is where comments should go, now that
            the comments field is not initially empty
          - Fill the comments field with the quoted patch

2008-10-14  Adam Roben  <aroben@apple.com>

        Fix Bug 21602: Bugzilla times out trying to display formatted diff for
        attachment 24345
        
        https://bugs.webkit.org/show_bug.cgi?id=21602

        Reviewed by Dave Kilzer.

        * PrettyPatch/PrettyPatch.rb:
        (PrettyPatch.BINARY_FILE_MARKER_FORMAT): Added.
        (PrettyPatch.FileDiff.initialize): If any of the lines in the diff
        are a binary file marker, mark this FileDiff as binary and stop trying
        to process the lines.
        (PrettyDiff.FileDiff.to_html): If we're binary, just print a string
        saying so.

2008-10-02  Adam Roben  <aroben@apple.com>

        * template/en/custom/attachment/reviewform.html.tmpl: Fix typo.

2008-10-02  Adam Roben  <aroben@apple.com>

        * template/en/custom/attachment/review.html.tmpl: Fix URLs

2008-10-02  Adam Roben  <aroben@apple.com>

        Fix Bug 21315: bugs.webkit.org should have a nicer patch review
        interface

        https://bugs.webkit.org/show_bug.cgi?id=21315

        Reviewed by Tim Hatcher.

        * attachment.cgi:
        (top level): Added support for the "review" and "reviewform" actions.
        (sub edit): Accept the template name as a parameter. If no name is
        give, use "edit" as before.
        * template/en/custom/attachment/list.html.tmpl: Added a "Review Patch"
        link for all patch attachments.
        * template/en/custom/attachment/review.html.tmpl: Added. Simple
        <frameset> page to show the patch on the top and a comment form on the
        bottom.
        * template/en/custom/attachment/reviewform.html.tmpl: Added. Simple
        comment form for reviewing patches.

2008-10-02  Adam Roben  <aroben@apple.com>

        Remove references to some backup files I created when implementing
        PrettyPatch in Bugzilla

        Reviewed by Tim Hatcher.

        * attachment-aroben.cgi: Removed.
        * template/en/default/attachment/edit-aroben.html.tmpl: Removed.

        * template/en/custom/attachment/edit.html.tmpl: Removed an erroneous
        reference to attachment-aroben.cgi. attachment.cgi will work just
        fine.

2008-06-25  David Kilzer  <ddkilzer@apple.com>

        Make PrettyPatch handle diffs with no Index or diff headers

        Part of Bug 19290: More patches not handled by PrettyPatch.rb
        <https://bugs.webkit.org/show_bug.cgi?id=19290>

        Reviewed by Adam.

        * PrettyPatch/PrettyPatch.rb:
        (PrettyPatch.DIFF_HEADER_FORMATS): Added regular expression to
        match on "+++ " lines for patches with no "Index" or "diff" header.
        (PrettyPatch.FileDiff.initialize): Look for filename on "+++ " line
        when the first line of a patch has no "Index" or "diff" header.
        (PrettyPatch.FileDiff.parse): Added haveSeenDiffHeader state
        variable to determine when no "Index" or "diff" header has been
        found, but a new patch has started with a "--- " line.

2008-06-08  Dan Bernstein  <mitz@apple.com>

        Reviewed by Adam Roben.

        - update trac URL in PrettyPatch

        * PrettyPatch/PrettyPatch.rb:

2008-05-29  Adam Roben  <aroben@apple.com>

        Update PrettyPatch directory list

        * PrettyPatch/PrettyPatch.rb:

2008-05-28  Adam Roben  <aroben@apple.com>

        Make PrettyPatch able to handle diffs taken from outside the WebKit
        source tree

        Part of Bug 19290: More patches not handled by PrettyPatch.rb
        <https://bugs.webkit.org/show_bug.cgi?id=19290>

        Reviewed by David Kilzer.

        * PrettyPatch/PrettyPatch.rb:
        (PrettyPatch.find_url_and_path): Added. Searches the file path from
        the bottom up looking for a directory that exists in the source tree.
        (PrettyPatch.linkifyFilename): Changed to call find_url_and_path.

2008-05-28  Adam Roben  <aroben@apple.com>

        Print exceptions from PrettyPatch to stdout

        This will make it much easier to debug problems with PrettyPatch,
        since we'll be able to see the exceptions in the browser.

        Reviewed by Sam Weinig.

        * PrettyPatch/prettify.rb: Added a --html-exceptions option, which
        will print exceptions to stdout as HTML.
        * attachment.cgi: Changed to pass --html-exceptions to prettify.rb.

2008-04-26  David Kilzer  <ddkilzer@apple.com>

        Removed temp files and added appropriate svn:ignore properties.

        Rubber-stamped by Mark Rowe.

        * data: Added svn:ignore property for "versioncache" and "versioncache.*" files.

        * data/template: Added svn:ignore property for "template" subdirectory.
        * data/template/template: Removed precompiled template subdirectory.

        * data/versioncache: Removed.
        * data/versioncache.*: Removed backup versioncache files.

        * data/webdot: Added svn:ignore property for "*.dot" files.
        * data/webdot/*.dot: Removed cached webdot files.

2008-04-08  Adam Roben  <aroben@apple.com>

        Combine :equal operations with the following operation if they are
        fewer than 3 characters long

        This keeps us from showing lots of small changes on long lines, just
        because some letters happened to be the same.

        Inspired by
        http://code.google.com/p/reviewboard/source/browse/trunk/reviewboard/diffviewer/diffutils.py?r=1264#147

        * PrettyPatch/PrettyPatch.rb:
        (PrettyPatch::DiffSection.initialize): Remove :equal operations fewer
        than 3 characters long. The characters from the removed operations
        become part of the subsequent operation.
        (PrettyPatch::CodeLine.text_as_html): Don't wrap 0-length strings in
        <ins>/<del> tags. Also removed the @fromLineNumber.nil? and
        @toLineNumber.nil? checks as they are no longer reliable now that
        we're removing operations.

2008-04-08  Adam Roben  <aroben@apple.com>

        Change PrettyPatch to use DiffBuilder for intra-line diffs

        This gives us much prettier intra-line diffs, largely because it can
        distinguish multiple changes on the same line. e.g., if a line changes
        from:

        const int myConstant = 0;

        to

        static const unsigned myConstant;

        You will see that "static " was inserted, "int" changed to "unsigned",
        and " = 0" was deleted.

        This seems to have also gotten rid of some spurious instances of
        "<ins></ins>" and "<del></del>" at the end of a line.

        * PrettyPatch/PrettyPatch.rb:
        (PrettyPatch::DiffSection.initialize): Use DiffBuilder instead of
        setChangeExtentFromLine (which had been copied from Trac's diffing
        code).
        (PrettyPatch::CodeLine):
         - Removed the changeExtent attribute
         - Added the operations attribute
         - Removed the setChangeExtentFromLine method
        (PrettyPatch::CodeLine.text_as_html): Uses @operations to determine
        what text to wrap in <ins> and <del> tags.
        * PrettyPatch/diff.rb: Deleted a bunch of code we don't use.
        (HTMLDiff::DiffBuilder.initialize): Moved code here from the old build
        method, but left out the calls to perform_operation, since we build
        the diff HTML outside of this class.
        (HTMLDiff::DiffBuilder.split_inputs_to_words): Removed calls to
        convert_html_to_list_of_words, since we're not diffing HTML.

2008-04-08  Adam Roben  <aroben@apple.com>

        Check in diff.rb

        This came from
        http://instiki.rubyforge.org/svn/instiki/trunk/lib/diff.rb
        revision 28521

        * PrettyPatch/diff.rb: Added.

2008-03-04  Adam Roben  <aroben@apple.com>

        * PrettyPatch/PrettyPatch.rb: Allow the extent of the previous file to
        be omitted from the hunk header.

