Attention script authors: GitHub is ending support for SVN in one year

gausie

D̰͕̝͚̤̥̙̐̇̑͗̒e͍͔͎͈͔ͥ̉̔̅́̈l̠̪̜͓̲ͧ̍̈́͛v̻̾ͤe͗̃ͥ̐̊ͬp̔͒ͪ
Staff member
See https://github.blog/2023-01-20-sunsetting-subversion-support/

When exactly will this happen?

The 8th of Jaunary 2024.

Who does this affect?
  • Authors of scripts who host them on GitHub and advise they are installed using svn checkout
  • Users of the above scripts
What can I do?

KoLmafia supports git as well as svn for checking out and updating hosted scripts.

Script authors should update their instructions to use those commands instead (remember if a script is hosted on GitHub, the command is as easy as git checkout <user>/<repo> [<branch>] since we assume GitHub if a full URL is not provided). You may be interested in the manifest.json file support. Lots of this isn't on the wiki, so we will endeavour to rectify that in due course.

Script users should expect to no longer receive automatic updates via svn update after the 8th of January 2024. They can try deleting the script via the svn delete command and installing again via git checkout, but that may not always work without the author having updated their code.

Okay, but in more detail?
This section by Ryo_Sangnoir

As a user, if you run the command js svnList().map(s => svnInfo(s)).map(i => i.url).filter(i => i.includes("github")) in the Graphical CLI, you can see which SVN scripts you have installed that are on GitHub. If you look at their README file in the root of the repo, you may be able to install these using git instead. If not, you may be able to install them using git checkout <user>/<repo> <branch> if they keep the release code in a separate branch. If not, you will have to raise the issue with the author, or use a fork.

As an example, suppose you see "https://github.com/Loathing-Associates-Scripting-Society/philter/trunk/release" in the output of that command. If you go to "https://github.com/Loathing-Associates-Scripting-Society/philter", you'll see that the README contains a "git checkout" command, so you can run svn delete philter followed by git checkout https://github.com/Loathing-Associates-Scripting-Society/philter.git main.

As an author, what you do depends on where your "scripts", "relay" etc. folders are.
  • if they're in the root directory of branch "my-scripts", tell your users to run "git checkout <user>/<repo> my-scripts"
    • if "my-scripts" is the default branch of your repository, you don't have to provide it, but you probably should as it'll affect the id of the installed script, which will affect what gets installed when your script is installed as a dependency
  • if they're in some directory deeper into the repo, you'll have to add a "manifest.json" file in the root of the repo (on the branch you tell your users to install), with the contents
    Code:
    {  "root_directory": "<where_the_files_are>" }
When you're authoring your "dependencies.txt" file, you can refer to your dependencies on GitHub using the custom "github" syntax -- e.g. "github Ezandora/Bastille Release".

aaAAH?
Aaa! It's not a big deal, but it may make some older GitHub scripts less easily accessible. If they're not regularly updated enough to fix this issue in one whole calendar year, you're not really missing out on anything because this only breaks updates.
 
Last edited by a moderator:

MCroft

Developer
Staff member
Well, some statistics for SVN repos in svnrepo.json:
all : 124
sf.net : 97
GitHub: 27

I ran svn info on each URL and got the data below, which it is not clear is useful, but it is interesting.
Raw data: https://docs.google.com/spreadsheets/d/17a_Fv2p3I5HX58rjlU2DG0wtf_iP2a99IIpHrrqCq20/edit?usp=sharing


Question: Can we convert any of the 27 on GitHub (which is the one that is closing) from SVN to GIT?

e.g. replace https://github.com/gausie/excavator/trunk/RELEASE with https://github.com/gausie/excavator.git
 

Veracity

Developer
Staff member
Tangential - and feel free to shunt to a different thread - how easy is it to move a repository from sf to native github?
 

Ryo_Sangnoir

Developer
Staff member
If they're not regularly updated enough to fix this issue in one whole calendar year, you're not really missing out on anything because this only breaks updates.
It will also break fresh installs of those scripts, unless forked.
Question: Can we convert any of the 27 on GitHub (which is the one that is closing) from SVN to GIT?
Many of them are already using git. svnrepo.json, and the script manager in general, assume everything's using SVN, and it's a bit of design work to figure out how to support git-using scripts in the Script Manager in addition to the SVN ones. "svnrepo.json" does imply they're SVN scripts -- we want to keep the name the same to support older Mafia, or maybe add another "gitrepo.json", then we have to consider how to update Script Manager to support them. So non-trivial.
Tangential - and feel free to shunt to a different thread - how easy is it to move a repository from sf to native github?
In the simplest case, quite simple, getting harder as requirements increase.

If you look at https://docs.github.com/en/get-star...b/importing-a-repository-with-github-importer, you can see instructions for using the web interface to do it, and there are further links in the blue box if that doesn't put the repo in the right state for you.

Difficulties might be:
  • mapping authors -- I'm not sure if it does this from SVN.
  • importing a SVN repositories with multiple subprojects into multiple git repositories (to reflect how people would install them)
For those you would have to use the external tools at https://docs.github.com/en/get-star...ce-code-to-github/source-code-migration-tools

The developers involved in moving Mafia from sf to GitHub might have more comments here.
 

heeheehee

Developer
Staff member
  • mapping authors -- I'm not sure if it does this from SVN.
I can answer this one: it uses the email address associated with each commit (e.g. heeheehee <heeheehee@users.sourceforge.net>), and looks to see if there's an account there. Some instructions from gausie when we were doing the migration:
Small update! It turns out that you can just add your <username>@users.sourceforge.net as an email address for your GitHub account and it will associate your commits even if you can't confirm the address. I've reimported the codebase using the authors.txt file to map the commits properly and it all seems to be working well.

To do this, go to https://github.com/settings/emails and just add an email address as described above and you should be grand! This means we don't have to do any history rewriting which is ideal.
 
Top