Forum: Ruby on Rails svn externals and Edge Rails

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
0babf8dc63e63a6684706b1ef2e1b691?d=identicon&s=25 Randy Schmidt (Guest)
on 2006-02-22 22:54
(Received via mailing list)
Hi all:

I am considering using edge rails so I can use join tables. I want to
use svn:externals to manage edge rails, however I want to understand
it more before I go and set everything up. so everytime I commit my
app it will pull the most recent version of rails from the svn
repository, right? What if the current version of rails is unstable,
is there a way to rollback edgerails and NOT my app? does it update if
I freeze_edge? Does it update my local copy as well as what is being
commited to the repository? Is there anything else I need to know
about setting this up? Complications some people have had that would
be good advice?

Thanks!
--
Randy Schmidt
x@altorg.com
267.334.6833
6578456ff00ab3520b1fe684bc572b45?d=identicon&s=25 Łukasz Piestrzeniewicz (Guest)
on 2006-02-22 23:44
(Received via mailing list)
On 22/02/06, Randy Schmidt <x@altorg.com> wrote:
> about setting this up? Complications some people have had that would
> be good advice?

Commits and updates are independent between your local repository and
part of workspace fetched using svn:externals. They are updated and
committed independently of each other.

How it works in real life?

$ svn propset svn:externals 'rails
http://dev.rubyonrails.org/svn/rails/trunk' vendor
$ svn ci -m 'Using edge rails'
$ svn up vendor/rails

Now you have edge Rails version. From now on this works:

$ svn up

Will bring up to date your working copy, does not update vendor/rails

$ svn ci

Copy changes from your working copy to your svn repository. DOES NOT
copy changes from vendor/rails neither to your repository nor Rails
repository.

$ svn up vendor/rails

Updates your version of Rails to latest in Rails repository. DOES NOT
touch your working copy.

$ svn ci vendor/rails

Tries to send your changes done to Rails to Rails repository. Will
most likely fail (unless you have write access to Rails repo that is
:) )

So as you can see using svn:externals is quite safe. You may also
choose specific revision to use when specifying svn:externals. This is
useful if external repo has been tainted with some very disruptive
change. In that case you just have to modify svn:externals like this:

$ svn propset svn:externals 'rails -r2756
http://dev.rubyonrails.org/svn/rails/trunk' vendor
$ svn ci -m 'Using edge rails revision 2756, because 2757 breaks hell
lose'
$ svn up vendor/rails

And you have 'safe' version of edge rails. Of course this doesn't
change your own code at all.
0babf8dc63e63a6684706b1ef2e1b691?d=identicon&s=25 Randy Schmidt (Guest)
on 2006-02-22 23:50
(Received via mailing list)
Um, all I can say is WOW. That was very helpful. Much thanks!
1b275ea705cc1671f13105d29684cbec?d=identicon&s=25 Scott Walter (sfwalter)
on 2006-02-22 23:53
(Received via mailing list)
Randy,

It won't pull the latest from rails svn site on commits, just updates.
If you're worried about instability you can set the svn:externals to get
a particular revision # with the --revision option.  That way it gives u
a safety net.

scott.

----------------------------------------------------------------------------------------------------
What's an Intel chip doing in a Mac? A whole lor more that it's ever
done in a PC.

My Digital Life - http://scottwalter.com/blog
Pro:Blog - http://scottwalter.com/problog

----- Original Message ----
From: Randy Schmidt <x@altorg.com>
To: rails@lists.rubyonrails.org
Sent: Wednesday, February 22, 2006 3:52:06 PM
Subject: [Rails] svn externals and Edge Rails

Hi all:

I am considering using edge rails so I can use join tables. I want to
use svn:externals to manage edge rails, however I want to understand
it more before I go and set everything up. so everytime I commit my
app it will pull the most recent version of rails from the svn
repository, right? What if the current version of rails is unstable,
is there a way to rollback edgerails and NOT my app? does it update if
I freeze_edge? Does it update my local copy as well as what is being
commited to the repository? Is there anything else I need to know
about setting this up? Complications some people have had that would
be good advice?

Thanks!
--
Randy Schmidt
x@altorg.com
267.334.6833
3dd4b52a0946bd698b1d1635a46ea3a3?d=identicon&s=25 Francois Beausoleil (Guest)
on 2006-02-23 03:59
(Received via mailing list)
Hi !

2006/2/22, Łukasz Piestrzeniewicz <bragi.ragnarson@gmail.com>:
> $ svn propset svn:externals 'rails
> http://dev.rubyonrails.org/svn/rails/trunk' vendor
> $ svn ci -m 'Using edge rails'
> $ svn up vendor/rails
>
> Now you have edge Rails version. From now on this works:
>
> $ svn up
>
> Will bring up to date your working copy, does not update vendor/rails

This is wrong.  vendor/rails WILL be updated, like this:

$ svn up

Fetching external item into 'vendor\rails'
U    vendor\rails\activerecord\test\reflection_test.rb
...
U    vendor\rails\railties\CHANGELOG
Updated external to revision 3638.

Hope that helps !
6578456ff00ab3520b1fe684bc572b45?d=identicon&s=25 Łukasz Piestrzeniewicz (Guest)
on 2006-02-23 07:34
(Received via mailing list)
On 23/02/06, Francois Beausoleil <francois.beausoleil@gmail.com> wrote:
> Hope that helps !
True, my mistake. But suppressing external updates is still possible
using --ignore-externals flag. This flag is also handy when checking
status of own repository.
This topic is locked and can not be replied to.