Skip to content

[Gecko Bug 1369941] Replace single integers N in fuzzy() and fuzzy-if() with 0-N ranges. - #12387

Merged
dbaron merged 1 commit into
masterfrom
gecko/1369941
Aug 10, 2018
Merged

dbaron merged 1 commit into
masterfrom
gecko/1369941

Conversation

@moz-wptsync-bot

Copy link
Copy Markdown
Collaborator

This patch was written entirely by the following script:

#!/bin/bash

if [ ! -d "./.hg" ]
then
echo "Not in a source tree." 1>&2
exit 1
fi

find . -regex '.(ref|crash)test..list' | while read FILENAME
do
echo "Processing ${FILENAME}."
# The following has four substitutions:
# * The first one replaces the first argument to fuzzy() when it doesn't
# have a - in it, by replacing it with an explicit 0-N range.
# * The second one does the same for the second argument to fuzzy().
# * The third does the same for the second argument to fuzzy-if().
# * The fourth does the same for the third argument to fuzzy-if().
#
# Note that this is using perl rather than sed because perl doesn't
# support non-greedy matching, which is needed for the first argument to
# fuzzy-if.
perl -pi -e 's/(fuzzy()([^ ,()-])(,[^ ,()]))/${1}0-${2}${3}/g;s/(fuzzy([^ ,()],)([^ ,()-])())/${1}0-${2}${3}/g;s/(fuzzy-if([^ ]?,)([^ ,()-])(,[^ ,()]))/${1}0-${2}${3}/g;s/(fuzzy-if([^ ]?,[^ ,()],)([^ ,()-])())/${1}0-${2}${3}/g' "${FILENAME}"
done

Differential Revision: https://phabricator.services.mozilla.com/D2974

bugzilla-url: https://bugzilla.mozilla.org/show_bug.cgi?id=1369941
gecko-commit: e3a6f64071f2f1f82da639a7d09749839d5f053b
gecko-integration-branch: autoland
gecko-reviewers: dholbert

This patch was written entirely by the following script:

  #!/bin/bash

  if [ ! -d "./.hg" ]
  then
    echo "Not in a source tree." 1>&2
    exit 1
  fi

  find . -regex '.*\(ref\|crash\)test.*\.list' | while read FILENAME
  do
    echo "Processing ${FILENAME}."
    # The following has four substitutions:
    # * The first one replaces the *first* argument to fuzzy() when it doesn't
    #   have a - in it, by replacing it with an explicit 0-N range.
    # * The second one does the same for the *second* argument to fuzzy().
    # * The third does the same for the *second* argument to fuzzy-if().
    # * The fourth does the same for the *third* argument to fuzzy-if().
    #
    # Note that this is using perl rather than sed because perl doesn't
    # support non-greedy matching, which is needed for the first argument to
    # fuzzy-if.
    perl -pi -e 's/(fuzzy\()([^ ,()-]*)(,[^ ,()]*\))/${1}0-${2}${3}/g;s/(fuzzy\([^ ,()]*,)([^ ,()-]*)(\))/${1}0-${2}${3}/g;s/(fuzzy-if\([^ ]*?,)([^ ,()-]*)(,[^ ,()]*\))/${1}0-${2}${3}/g;s/(fuzzy-if\([^ ]*?,[^ ,()]*,)([^ ,()-]*)(\))/${1}0-${2}${3}/g' "${FILENAME}"
  done

Differential Revision: https://phabricator.services.mozilla.com/D2974

bugzilla-url: https://bugzilla.mozilla.org/show_bug.cgi?id=1369941
gecko-commit: e3a6f64071f2f1f82da639a7d09749839d5f053b
gecko-integration-branch: autoland
gecko-reviewers: dholbert

@wpt-pr-bot wpt-pr-bot left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Already reviewed downstream.

@dbaron
dbaron merged commit 8346acd into master Aug 10, 2018
@sideshowbarker
sideshowbarker deleted the gecko/1369941 branch November 22, 2018 22:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants