# Following stable branch with subversion



## MarcoB (Nov 18, 2012)

I've started using subversion instead of csup to follow the 9-stable branche (and ports). Csup had a config file with a line that says which branch to follow. But I didn't find any file for subversion for this. I used:

```
# svn checkout svn://svn.FreeBSD.org/base/stable/9 /usr/src
```
to fetch the new src tree, and:

```
# svn update /usr/src
```
to update it.
So how does subversion know what branche I'm following when updating the tree?

Regards,

Marco


----------



## ahavatar (Nov 18, 2012)

It seems that from the URL you used, it must be 9-STABLE branch.


----------



## ahavatar (Nov 18, 2012)

And I have a question, too. In the handbook section on using subversion


```
# cd root
# make update SVN_UPDATE=yes
```

for updating the documentation, however, when I do this, I got an error.

```
# cd /usr/src
# make update SVN_UPDATE=yes
--------------------------------------------------------------
>>> Updating /usr/src using Subversion
--------------------------------------------------------------
svn update -r HEAD
svn: not found
*** [update] Error code 127

Stop in /usr/src.
*** [update] Error code 1

Stop in /usr/src.
```
Someone please explain me what the make command is supposed to do. Thanks.


----------



## gkontos (Nov 18, 2012)

MarcoB said:
			
		

> So how does subversion know what branche I'm following when updating the tree?



If you look at the /usr/src directory you will see a directory called .svn. That is where the information is being stored. 


```
drwxr-xr-x    4 root  wheel       7 Oct  7 12:49 .svn
```

If you are also in that directory, a simple:

[CMD=""]#svn up[/CMD]

Will trigger the update.


----------



## MarcoB (Nov 18, 2012)

gkontos said:
			
		

> If you look at the /usr/src directory you will see a directory called .svn. That is where the information is being stored.
> 
> 
> ```
> ...



Aha, didn't know that. Thanks for the info!

Regards,
Marco


----------



## sworn (Mar 15, 2013)

HI,
Your post is old but the problem still exists. First you have to install subversion:
`# pkg_add -r subversion`
or install it from the ports.

Then you also put following lines into your /etc/make.conf:

```
SVN_UPDATE=yes
SVN=/usr/local/bin/svn
```
Now you can go to /usr/src/ and type `# make update`
I assume that you get an clean copy from an svn mirror. You wanted stable 9:


```
mv /usr/src /usr/SRC
svn checkout [url]https://svn0.us-west.FreeBSD.org/base/stabel/9[/url] /usr/src
```
Regards

sworn


----------



## phoenix (Mar 15, 2013)

MarcoB said:
			
		

> I've started using subversion instead of csup to follow the 9-stable branche (and ports). Csup had a config file with a line that says which branch to follow. But I didn't find any file for subversion for this. I used:
> 
> ```
> # svn checkout svn://svn.FreeBSD.org/base/stable/9 /usr/src
> ...



It's all saved within the working directory:

```
# cd /usr/src
# svn info
```


----------

