# Any pros/cons between svn vs portsnap?



## mrjayviper (Aug 19, 2015)

portsnap() seems to be more "usable" since it downloads a single "zip" file instead of svnlite() which downloads thousands of little files.

Thanks!


----------



## cpm@ (Aug 19, 2015)

This question has been discussed here and on the freebsd-questions mailing list.

http://lists.freebsd.org/pipermail/freebsd-questions/2012-September/244851.html

Take your time to read it.


----------



## mrjayviper (Aug 19, 2015)

cpm said:


> This question has been discussed here and on the freebsd-questions mailing list.
> 
> http://lists.freebsd.org/pipermail/freebsd-questions/2012-September/244851.html
> 
> Take your time to read it.


*T*hanks. I did a search before posting but didn't find anything useful.


----------



## SirDice (Aug 19, 2015)

The added bonus of using SVN instead of portsnap(8) is that it's easier to merge any local changes and/or revert changes on a single port. If you're not in the habit of modifying ports or need to change versions you're probably better off using portsnap(8). For most people portsnap(8) is easier to use and they don't need the added functionality of SVN.


----------



## mrjayviper (Aug 19, 2015)

SirDice said:


> The added bonus of using SVN instead of portsnap(1) is that it's easier to merge any local changes and/or revert changes on a single port. If you're not in the habit of modifying ports or need to change versions you're probably better off using portsnap(1).



e.g. if I modified the Makefile for sysutils/tmux, running `svn update` will restore the original one. Is my understanding correct?

Thank you


----------



## SirDice (Aug 19, 2015)

mrjayviper said:


> e.g. if I modified the Makefile for sysutils/tmux, running `svn update` will restore the original one. Is my understanding correct?


Yes, you have a choice actually. To keep your local changes or overwrite them with the upstream version.


----------



## kpa (Aug 19, 2015)

mrjayviper said:


> e.g. if I modified the make file for sysutils/tmux, running `svn update` will restore the original one. Is my understanding correct?
> 
> Thank you



No, `svn update` will merge your changes with the changes from the upstream repository. This is what all revision control systems do by default on update operation. If you do `svn checkout` you'll lose your local changes.


----------



## rotor (Aug 20, 2015)

Does `portsnap` correspond to the new (i.e., 10.2) "quarterly" default in pkg.conf, or will the ports that portsnap downloads be out of sync with `pkg`'s default?


----------



## SirDice (Aug 20, 2015)

portsnap(8) doesn't care about pkg.conf, that file is used by pkg(8) only.  Have a look at portsnap.conf(5).


----------



## protocelt (Aug 20, 2015)

To add what SirDice mentioned, think of the ports tree as a rolling release. Updates to the ports tree are committed perpetually. The official package repositories are a snapshot of the ports tree at any given time. For quarterly packages(which are now the default), they are built from a snapshot of the ports tree every 3 months or so. For the latest packages(which was the default prior to 10.2-RELEASE) are built every other day or so. With that in mind, yes, the packages will always be out of sync with the ports tree. This is one of the reasons it is recommended not to use both ports and packages at the same time unless you really know what your doing.


----------

