# Subversion in base?



## ygg (Dec 9, 2013)

Yes? No? Maybe? Is anyone talking about it? Will it happen? When?


----------



## ljboiler (Dec 9, 2013)

FreeBSD 10 has svnlite included in base, and drops CVS.


----------



## ygg (Dec 9, 2013)

I've been thinking that once that happens it would be neat if someone created a command called sync that could be called with `sync ports`, `sync doc`, `sync src`, or `sync all`. The corresponding Subversion commands would be:

`svn co [url=https://svn0.us-west.freebsd.org/doc/head/en_US.ISO8859-1]https://svn0.us-west.freebsd.org/doc/he ... .ISO8859-1[/url] /usr/doc/en_US.ISO8859-1`
`svn co [url=https://svn0.us-west.freebsd.org/ports/head]https://svn0.us-west.freebsd.org/ports/head[/url] /usr/ports`
`svn co [url=https://svn0.us-west.freebsd.org/base/releng/9.1]https://svn0.us-west.freebsd.org/base/releng/9.1[/url] /usr/src`

It could even replace Portsnap. The only trick would be that we wouldn't want to hard-code "svn0.us-west.freebsd.org" into it, so maybe there's an "svn.freebsd.org" that multiplexes over all of the available SVN servers or selects the nearest one to you and routes you to it. I don't know how the freebsd.org network is architectured. The only other trick would be that it would have to know which version of src and doc you wanted, but that could be a simple configuration file. What does everyone think? We don't have a sync yet. Would that be useful?

`sync ports`
`sync doc`
`sync src`
`sync all`


----------



## ljboiler (Dec 9, 2013)

Once you have done the initial `svn co` as you describe above (and right there is where you would define which server and which version you want), keeping things "in sync" is a simple as cd'ing to the directory where you did that checkout and typing `svn update`.  I don't think you have to worry too much about selecting a "closer" SVN server, especially if you use `svn update` to keep things that change often (like ports/head) in sync, because updating only pulls down changes and not the entire tree, as `svn co` would do.

Perhaps some shell aliases to cd to the proper directory and run `svn update` are all you need.


----------



## phoenix (Dec 9, 2013)

ygg said:
			
		

> I've been thinking that once that happens it would be neat if someone created a command called sync that could be called with `sync ports`, `sync doc`, `sync src`, or `sync all`. The corresponding Subversion commands would be:
> 
> `svn co [url=https://svn0.us-west.freebsd.org/doc/head/en_US.ISO8859-1]https://svn0.us-west.freebsd.org/doc/he ... .ISO8859-1[/url] /usr/doc/en_US.ISO8859-1`
> `svn co [url=https://svn0.us-west.freebsd.org/ports/head]https://svn0.us-west.freebsd.org/ports/head[/url] /usr/ports`
> ...



It already exists, has for months now.  It's called svnup(1) and available in the ports tree as net/svnup. It was originally scheduled to be imported into the base.  I'm not sure if it was or not, or whether svnlite(1) took its place.


----------



## wblock@ (Dec 9, 2013)

I don't think svnup was ever scheduled to be imported to base.

svnlite is not a full version of svn.  Last time I tried it, it did not support HTTPS.


----------



## kpa (Dec 9, 2013)

It does support HTTPS just fine now. I think it's called lite because it does not have anything that would need bindings to external languages like Perl or Python.


----------



## xibo (Dec 20, 2013)

It can update repositories just fine, including ones with externals and others. I think there's no svn server in base though.
If you want the "traditional" naming, set 
	
	



```
WITH_SVN=YES
```
 in src.conf


----------



## chrcol (Dec 23, 2013)

*T*he csup servers seem offline, so should svnlite be backported to 9.x?

*H*aving to install ports/packages to update base src files isn*'*t ideal.  Especially subversion as it*'*s a bloaty package.


----------



## xibo (Dec 23, 2013)

It is unlikely that svnlite will be backported into FreeBSD-9. If you can't or don't want to install the normal subversion port but need a client that is merely used to download/update the FreeBSD source code, use net/svnup, which AFAIK has no dependencies.


----------

