QA@IT

Rails の CHANGELOG.md をバージョンに対して横断的に検索するには?

2241 PV

Rails の、たとえば ActiveSupport の CHANGELOG.md をバージョンに対して横断的に検索するにはどうするのが簡単でしょうか。
CHANGELOG.md の内容はリリースブランチごとに異なります。ActiveSupport を例にとると、以下のようにわかれています。

コミット 810a50dacf9ddddc1d59c1cb350e8ce785c8bf85 に方針が書いてありました。

commit 810a50dacf9ddddc1d59c1cb350e8ce785c8bf85
Author: Xavier Noria <fxn@hashref.com>
Date:   Tue Aug 28 21:15:12 2012 +0200

    CHANGELOGs are now per branch

    Changes in old branches needed to be manually synched in 
    CHANGELOGs of newer ones.
    This has proven to be brittle, sometimes one just forgets
    this manual step.
    With this commit we switch to CHANGELOGs per branch. When 
    a new major version is
    cut from master, the CHANGELOGs in master start being 
    blank.

    A link to the CHANGELOG of the previous branch allows 
    anyone interested to follow the history.

回答

ひとつ思いついました。以下は、ActiveSupport::Deprecation を検索している例です。とはいえ、1ファイルのときより手間が増えますよね。

git log -S"ActiveSupport::Deprecation" activesupport/CHANGELOG.md
commit b955939d55b71905fa3e5036149ee4c84943c599
Author: Alexey Gaziev <alex.gaziev@gmail.com>
Date:   Tue Oct 30 10:23:41 2012 +0800

    Make caller attribute in deprecation methods optional

commit 71993c6f9770b1350aa41fe8c68f1dd2c7800403
Author: Piotr Niełacny <piotr.nielacny@gmail.com>
Date:   Thu Sep 13 08:38:34 2012 +0200

    Change ActiveSupport::Deprecation to class.

    ActiveSupport::Deprecation is now a class rather than a module. You can
    get instance of ActiveSupport::Deprecation calling #instance method.

      ActiveSupport::Deprecation.instance

    But when you need to get new object od ActiveSupport::Deprecation you
    need to just call #new.

      @instance = ActiveSupport::Deprecation.new

    Since you can create a new object, you can change the version and the
    name of the library where the deprecator concerned.

      ActiveSupport::Deprecation.new('2.0', 'MyGem')

    If you need use another deprecator instance you can select it in the
    options of deprecate method.

      deprecate :method, :deprecator => deprecator_instance

    Documentation has been updated.

commit 810a50dacf9ddddc1d59c1cb350e8ce785c8bf85
Author: Xavier Noria <fxn@hashref.com>
Date:   Tue Aug 28 21:15:12 2012 +0200

    CHANGELOGs are now per branch

    Changes in old branches needed to be manually synched in CHANGELOGs of newer ones.
    This has proven to be brittle, sometimes one just forgets this manual step.
    With this commit we switch to CHANGELOGs per branch. When a new major version is
    cut from master, the CHANGELOGs in master start being blank.

    A link to the CHANGELOG of the previous branch allows anyone interested to
    follow the history.

commit 9608395923899e3f91e0d07ac2ed52efc17bcc40
Author: twinturbo <me@broadcastingadam.com>
Date:   Tue Apr 17 22:01:06 2012 +0200

    Document #behavior= and update CHANGELOG

commit 281272ad36e29b49595c1758d56a82f338c21b1a
Author: Jon Leighton <j@jonathanleighton.com>
Date:   Fri Nov 4 12:55:17 2011 +0000

    Convert CHANGELOGs to Markdown format.

    Reasons:

     * Markdown reads well as plain text, but can also be formatted.
     * It will make it easier for people to read on the web as Github
       formats the Markdown nicely.
     * It will encourage a level of consistency when people are writing
       CHANGELOG entries.

    The script used to perform the conversion is at
    https://gist.github.com/1339263
編集 履歴 (1)
ウォッチ

この質問への回答やコメントをメールでお知らせします。