Comment 5 for bug 1265646

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to config (master)

Reviewed: https://review.openstack.org/64738
Committed: https://git.openstack.org/cgit/openstack-infra/config/commit/?id=eeb9e111fd05fbf3042d296eef074d07eb34a362
Submitter: Jenkins
Branch: master

commit eeb9e111fd05fbf3042d296eef074d07eb34a362
Author: Zane Bitter <email address hidden>
Date: Thu Jan 2 16:32:37 2014 -0500

    Separate handling of ChangeIds and Git SHAs in Gerrit

    Since Ia337ddfe2ddc82c858072135a613786070f0dc67, ChangeIds not
    surrounded by whitespace (such as that one) are no longer turned into
    links. (It also reduces the minimum length of a hex string required to
    recognise a ChangeId from 8 to 7 for reasons that are undocumented, and
    therefore suspect.)

    The purpose of that patch was to prevent overzealous matching of strings
    in e.g. URLs as possible ChangeIds. This stems from
    I5cd74bef5510c8dbf3891dcfa3086a141e445f0d, which extended the changeid
    regex to also look for Git SHA hashes, which are far more likely to
    show up as false positives.

    In fact, Ia337ddfe2ddc82c858072135a613786070f0dc67 actually destroys the
    original rationale of I5cd74bef5510c8dbf3891dcfa3086a141e445f0d by
    refusing to match SHAs that are followed by a closing parenthesis, as
    cherry-picked commits on stable branches are.

    This patch makes the following changes:
    * Separates the changeid and gitsha commentlink handlers
    * Restores the changeid patterns to their original values
    * Matches only full Git SHAs (not just all 8+ character hex strings)
    * Allows for other common punctuation around Git SHAs (commas, colons,
      semicolons, parentheses).

    Fixes bug 1265646

    Change-Id: I0844ee2fd8d8699059eb7afa92b282cf5b890c18