This project is archived and is in readonly mode.
rake rails:freeze:edge should place the git revision into a REVISION file
Reported by MatthewRudy | January 5th, 2009 @ 01:47 AM | in 3.0.2
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
Comments and changes to this ticket
-
Pratik March 7th, 2009 @ 07:21 PM
- 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.
-
josh August 19th, 2009 @ 03:45 PM
- Assigned user cleared.
-
Luke Chadwick May 7th, 2010 @ 12:18 PM
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.
-
Luke Chadwick May 7th, 2010 @ 01:26 PM
- Assigned user set to Ryan Bigg
No rails 3 patch. 'rake rails:freeze:edge' has been deprecated in favour of 'bundle install'
-
Ryan Bigg May 8th, 2010 @ 12:49 AM
- 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.
-
Luke Chadwick May 8th, 2010 @ 03:39 AM
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?
-
Ryan Bigg May 8th, 2010 @ 06:52 AM
Given the circumstances with Bundler, I don't think it needs to be supported in the future release. Use the convention.
-
Luke Chadwick May 11th, 2010 @ 12:06 AM
Here is the patch that removes the checking master/3.x and added a deprecation warning.
-
Rizwan Reza May 16th, 2010 @ 02:41 AM
- 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
-
Rizwan Reza May 16th, 2010 @ 03:43 AM
- 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.
-
Repository May 16th, 2010 @ 09:45 AM
- 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... -
José Valim May 16th, 2010 @ 09:48 AM
- 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?
-
Rizwan Reza May 16th, 2010 @ 03:14 PM
- 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.
-
Rizwan Reza May 16th, 2010 @ 03:39 PM
- 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. :)
-
Rizwan Reza May 16th, 2010 @ 03:39 PM
- State changed from resolved to verified
-
Rizwan Reza May 16th, 2010 @ 04:45 PM
- 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
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile »
<h2 style="font-size: 14px">Tickets have moved to Github</h2>
The new ticket tracker is available at <a href="https://github.com/rails/rails/issues">https://github.com/rails/rails/issues</a>
People watching this ticket
Attachments
Referenced by
- 1694 rake rails:freeze:edge should place the git revision into a REVISION file (from [5d979de1a95bb6688d13781a7a42e04acdb3b9cb]) when we...