Svn externals and Edge Rails


#1

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.
removed_email_address@domain.invalid
267.334.6833


#2

On 22/02/06, Randy S. removed_email_address@domain.invalid 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.


#3

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


#4

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. removed_email_address@domain.invalid
To: removed_email_address@domain.invalid
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.
removed_email_address@domain.invalid
267.334.6833


#5

Hi !

2006/2/22, Łukasz Piestrzeniewicz removed_email_address@domain.invalid:

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


#6

On 23/02/06, Francois B. removed_email_address@domain.invalid 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.