# Question on using subversion



## scottro (Jan 16, 2013)

I am not sure what I'm misunderstanding here.  

I did a very basic install of FreeBSD-9.1 from disk 1.  During installation, I just chose src. 

After installation, I ran 
	
	



```
portsnap fetch update
```
 to get the ports tree.  I then install subversion.  

As I understand the docs, I should run



```
# svn co svn://svn.freebsd.org/base/head /usr/src
```

and should then be able to run buildworld and kernel to get to CURRENT.   Yet, when I check sources, I still have 9.1.  What I was able to do to get it to work was to first remove /usr/src (including the hidden  
.subversion directory.)  Then, when I run the checkout command it brought in sources for 10 CURRENT.

However, from what I'm seeing in the docs, the prior removal of /usr/src shouldn't be necessary.  
What am I missing?

(And yes, I know one could argue that if I don't get this I shouldn't run CURRENT, but this is on an expendable machine, and I'm testing something for myself.)


----------



## wblock@ (Jan 16, 2013)

Using svn to checkout source should suggest removing any existing /usr/src.  Or at least not give the impression that a checkout over an existing directory will work.  If you could point to what gives that impression, I'll see about fixing it.


----------



## scottro (Jan 16, 2013)

Thanks, now I know that it is acting as expected.  
I will follow up with the links.
I looked at several sources, I will follow up on this tonight and give you more specific links.   (Where I will be at the computer I used, and can view my history.)

I don't see an option for me to mark the thread solved. I looked in thread tools and searched for the word solved on the page.  I will follow up as promised, but the thread can be marked as solved since you answered my question.


----------



## SirDice (Jan 16, 2013)

scottro said:
			
		

> I don't see an option for me to mark the thread solved. I looked in thread tools and searched for the word solved on the page.


Edit the post and click on "Go Advanced".


----------



## scottro (Jan 16, 2013)

Thanks SirDice, done. 

Back to wblock--I probably used http://www.freebsd.org/doc/handbook/svn.html, and may have googled a bit more for examples. Examples might have shown up right on the google results page, and at that point, I would have just been doublechecking syntax.  (That is, looking for the svn co line).  The handbook's page doesn't, as far as I can see, mention removing old /usr/src.  

A quick search this morning, however, shows your page http://www.wonkity.com/~wblock/docs/html/stable.html with the words


> This example shows updating to FreeBSD 9-STABLE. If an old /usr/src directory already exists and was not created by svn, remove or rename it first. Do not check out source over and existing directory, it will cause unexpected problems later.



So, at least on your page, it's about as clear as can be.


----------



## wblock@ (Jan 16, 2013)

Warning added, thanks!


----------



## scottro (Jan 16, 2013)

Wow, that's what I call service.  Thanks!


----------

