Lighthouse has a new layout. Prefer the old one? Return to the old layout, and switch back any time from the link at the top of each page.

This project is archived and is in readonly mode.

rake rails:freeze:edge should place the git revision into a REVISION file

#1694

Hey there, this is a really minor one,

but a minor thing that is a bit annoying.

At the moment rake rails:freeze:edge does the following downloads a zip extracts the zip touches a file called REVISION_ce03... (or whatever the revision was)

this leaves us with a git changeset that looks a bit ugly;


matthew@rubuntu:~/code/jimgit$ git status
# On branch master
# Changed but not updated:
#   (use "git add/rm <file>..." to update what will be committed)
#
#       deleted:    vendor/rails/REVISION_a1fb57aa6940253dbed5423ac3e064db272eab2a
#       modified:   vendor/rails/actionpack/lib/action_controller/base.rb
#       modified:   vendor/rails/actionpack/lib/action_controller/dispatcher.rb
#       modified:   vendor/rails/actionpack/lib/action_controller/integration.rb
#       modified:   vendor/rails/actionpack/lib/action_controller/middleware_stack.rb
#       modified:   vendor/rails/actionpack/lib/action_controller/request.rb
#       modified:   vendor/rails/actionpack/lib/action_controller/request_parser.rb
#       modified:   vendor/rails/actionpack/lib/action_controller/rescue.rb
#       modified:   vendor/rails/actionpack/lib/action_view/helpers/asset_tag_helper.rb
#       modified:   vendor/rails/actionpack/test/controller/dispatcher_test.rb
#       modified:   vendor/rails/actionpack/test/controller/integration_upload_test.rb
#       modified:   vendor/rails/actionpack/test/controller/request_test.rb
#       modified:   vendor/rails/actionpack/test/controller/rescue_test.rb
#       modified:   vendor/rails/actionpack/test/template/asset_tag_helper_test.rb
#       modified:   vendor/rails/activesupport/CHANGELOG
#       modified:   vendor/rails/activesupport/lib/active_support/time_with_zone.rb
#       modified:   vendor/rails/activesupport/test/core_ext/time_with_zone_test.rb
#       modified:   vendor/rails/railties/lib/initializer.rb
#       modified:   vendor/rails/railties/test/console_app_test.rb
#
# Untracked files:
#   (use "git add <file>..." to include in what will be committed)
#
#       vendor/rails/REVISION_ce706b4b9be03a3f2e7d11438e6550d64c5f4461
#       vendor/rails/actionpack/test/controller/middleware_stack_test.rb
#       vendor/rails/actionpack/test/fixtures/multipart/hello.txt

namely; we have to delete the old REVISION file and add the new one.

I think having a single REVISION file which contains the name of the latest commit is the best way to proceed.

Attached in a patch to do this


-        touch "rails/REVISION_#{latest_revision}"
+        puts "Frozen to git revision #{latest_revision}"
+        File.open('rails/REVISION', 'w') do |revision|
+          revision.puts latest_revision
+        end

Reported by MatthewRudy · January 5th, 2009 @ 01:47 AM

State: resolved
Milestone: 3.0.2
Assigned to: José Valim José Valim
Importance: none

Activity

  1. Pratik
    Pratik
    • Assigned user set to josh
    • Tag changed from 2.3, commit, edge, freeze, git, rails, railties, rake, revision to 2.3, commit, edge, freeze, git, patch, rails, railties, rake, revision
    • State changed from new to incomplete
    • Title changed from [PATCH] rake rails:freeze:edge should place the git revision into a REVISION file to rake rails:freeze:edge should place the git revision into a REVISION file

    Agree with Matthew. But the current file name style is being used in railties/builtin/rails_info/rails/info.rb. So that needs changing too.

    Assigning to Josh as he committed the original thingy.

    March 7th, 2009 @ 07:21 PM

  2. josh
    josh
    • Assigned user cleared.

    August 19th, 2009 @ 03:45 PM

  3. Jeremy Kemper
    Jeremy Kemper
    • Milestone changed from 2.x to 3.x

    May 4th, 2010 @ 06:48 PM

  4. Luke Chadwick
    Luke Chadwick

    Added patch for 2-3-stable that includes both the patch above and the required change to 'railties/builtin/rails_info/rails/info.rb'

    A patch for edge/3.x is on it's way.

    May 7th, 2010 @ 12:18 PM

  5. Luke Chadwick
    Luke Chadwick
    • Assigned user set to Ryan Bigg

    No rails 3 patch. 'rake rails:freeze:edge' has been deprecated in favour of 'bundle install'

    May 7th, 2010 @ 01:26 PM

  6. Ryan Bigg
    Ryan Bigg
    • Milestone changed from 3.x to 2.3.6

    Fix milestone as per Luke's comments.

    Luke: Pratik mentions that it's being used in railties/builtin/rails_info/rails/info.rb. Is this still the case? Please advise.

    May 8th, 2010 @ 12:49 AM

  7. Luke Chadwick
    Luke Chadwick

    There is still code in both 2-3-stable and master to read the revision from 'railties/builtin/rails_info/rails/info.rb' and 'railties/lib/rails/info.rb' respectively.

    As I mentioned, the ability to create the file has been removed in master/3.x.

    Is reading the REVISION* file still something that needs to be supported for legacy reasons or should it be removed altogether in master?

    May 8th, 2010 @ 03:39 AM

  8. Ryan Bigg
    Ryan Bigg

    Given the circumstances with Bundler, I don't think it needs to be supported in the future release. Use the convention.

    May 8th, 2010 @ 06:52 AM

  9. Luke Chadwick
    Luke Chadwick

    Here is the patch that removes the checking master/3.x and added a deprecation warning.

    May 11th, 2010 @ 12:06 AM

  10. Rizwan Reza
    Rizwan Reza
    • Tag changed from 2.3, commit, edge, freeze, git, patch, rails, railties, rake, revision to 2.3, bugmash, commit, edge, freeze, git, patch, rails, railties, rake, revision

    May 16th, 2010 @ 02:41 AM

  11. Rizwan Reza
    Rizwan Reza
    • Milestone cleared.
    • Tag changed from 2.3, bugmash, commit, edge, freeze, git, patch, rails, railties, rake, revision to 2.3, bugmash-review, commit, edge, freeze, git, patch, rails, railties, rake, revision
    • State changed from incomplete to verified

    This is looking good. Both patches apply cleanly. This last patch is for master. There is a patch for 2-3-stable above.

    May 16th, 2010 @ 03:43 AM

  12. Repository
    Repository
    • State changed from verified to resolved

    (from [5d979de1a95bb6688d13781a7a42e04acdb3b9cb]) when we run rake rails:freeze:edge update the value of the "REVISION" file rather than creating a new file "REVISION_ce706..." each time [#1694 state:resolved]

    Signed-off-by: José Valim jose.valim@gmail.com
    http://github.com/rails/rails/commit/5d979de1a95bb6688d13781a7a42e0...

    May 16th, 2010 @ 09:45 AM

  13. José Valim
    José Valim
    • Milestone cleared.
    • State changed from resolved to open
    • Assigned user changed from Ryan Bigg to José Valim

    Luke, is there a reason to keep the "freeze_edge_version" method in the patch for rails master? We cannot simply remove it?

    May 16th, 2010 @ 09:48 AM

  14. Rizwan Reza
    Rizwan Reza
    • Tag changed from 2.3, bugmash-review, commit, edge, freeze, git, patch, rails, railties, rake, revision to 2.3, commit, edge, freeze, git, patch, rails, railties, rake, revision
    • State changed from open to resolved

    José is right, we don't need this for master/Rails 3. Please comment if otherwise.

    May 16th, 2010 @ 03:14 PM

  15. Rizwan Reza
    Rizwan Reza
    • Tag changed from 2.3, commit, edge, freeze, git, patch, rails, railties, rake, revision to 2.3, bugmash-review, commit, edge, freeze, git, patch, rails, railties, rake, revision

    Since we don't need it, let's just remove it. :)

    May 16th, 2010 @ 03:39 PM

  16. Rizwan Reza
    Rizwan Reza
    • State changed from resolved to verified

    May 16th, 2010 @ 03:39 PM

  17. Rizwan Reza
  18. Rizwan Reza
    Rizwan Reza
    • Tag changed from 2.3, bugmash-review, commit, edge, freeze, git, patch, rails, railties, rake, revision to 2.3, commit, edge, freeze, git, patch, rails, railties, rake, revision
    • State changed from verified to resolved

    May 16th, 2010 @ 04:45 PM

  19. Ryan Bigg
    Ryan Bigg
    • Tag cleared.

    Automatic cleanup of spam.

    October 9th, 2010 @ 09:48 PM

  20. Jeremy Kemper
  21. Jeff Kreeftmeijer