# New best practice for tracking 12-STABLE sources?



## Terry_Kennedy (May 3, 2021)

Due to the conversion to Git for ports, I had to re-tool my local scripts to switch to using Git. Right now I'm running a hybrid script that uses svnlite to update the 12-STABLE kernel/world sources and gitup for updating the ports tree.

Is there any advantage to transitioning to gitup for 12-STABLE kernel/world sources? The last time we did this (changing from CVS to SVN), during the time that both were supported it was 'better' to use SVN because that put the SVN revision number in the `uname -a` output. I'm wondering if there are any similar advantages to using Git now. A secondary question is whether the 12-STABLE source tree will remain available via SVN until the EoL of 12, or if it is going to go away at some point.


----------



## SirDice (May 4, 2021)

Terry_Kennedy said:


> A secondary question is whether the 12-STABLE source tree will remain available via SVN until the EoL of 12,


Yes, it will remain in SVN until its demise.


----------



## ShelLuser (May 4, 2021)

Terry_Kennedy said:


> Is there any advantage to transitioning to gitup for 12-STABLE kernel/world sources?


I wouldn't know about Gitup because I personally prefer using the regular tool, but there is definitely a major advantage for using Git in this context: not having to renew your source tree every time.

For example:

```
peter@vps:/usr/src $ git branch -r | grep stable
  origin/stable/10
  origin/stable/11
  origin/stable/12
  origin/stable/13
  origin/stable/2.1
  origin/stable/2.2
  origin/stable/3
  origin/stable/4
  origin/stable/5
  origin/stable/6
  origin/stable/7
  origin/stable/8
  origin/stable/9
```
Let's say for the sake of argument that I've be using Stable 12 and would now like to upgrade to Stable 13. Well, instead of having to check out a whole new tree (as was the case with Subversion) you can now issue one command: `git switch origin/stable/13` and you're done.

And this applies throughout the whole source tree. I'm using releng/12 on this server, upgrading to version 13 is simply issueing one command before configuring and building my system: `git switch origin/releng/13` and I'm done.


----------



## Terry_Kennedy (May 4, 2021)

ShelLuser said:


> I wouldn't know about Gitup because I personally prefer using the regular tool, but there is definitely a major advantage for using Git in this context: not having to renew your source tree every time.


I hear what you're saying. I'm using gitup instead of git because it is much more lightweight, doesn't clone the complete repository history, just the newest version of each file, and has a far better chance than git to become part of base in a future release.


ShelLuser said:


> Let's say for the sake of argument that I've be using Stable 12 and would now like to upgrade to Stable 13. Well, instead of having to check out a whole new tree (as was the case with Subversion) you can now issue one command: `git switch origin/stable/13` and you're done.
> 
> And this applies throughout the whole source tree. I'm using releng/12 on this server, upgrading to version 13 is simply issueing one command before configuring and building my system: `git switch origin/releng/13` and I'm done.


I generally do every other major release (6/8/10/12 so far) so we're talking about something that happens every 4 years or so. Given that, the overhead in:

```
cd /usr
rm -Rf src
mkdir src
gitup stable
```
doesn't seem too onerous.


----------

