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 S.
[email protected]
267.334.6833

On 22/02/06, Randy S. [email protected] 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
:slight_smile: )

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.

Um, all I can say is WOW. That was very helpful. Much thanks!

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 S. [email protected]
To: [email protected]
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 S.
[email protected]
267.334.6833

Hi !

2006/2/22, Łukasz Piestrzeniewicz [email protected]:

$ 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 !

On 23/02/06, Francois B. [email protected] 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.