Mafia SVN for Scripts?

bumcheekcity

Active member
Wow, this is amazing! Thanks, roippi, I'm sure this will be ridiculously helpful to many scripters and end users. I'll update the bumcheekascend SVN repo immediately. If anyone has a script that they want to use and open up to contributions from others, then feel free to make a subfolder in there. I think I have about 8 people listed to contribute to the various scripts there now.
 

Winterbay

Active member
Eh? No, I've stated several times that nesting files is okay within the four permissible folders. You are restricted from putting files in the top level, and in places like ccs/ or settings/. I think this is reasonable.

Well, it will stop users from moving scripts around in their /scripts folder if it is connected to a SVN-repository since Mafia will copy the file to its original location every time and so if you set up your own folder structure you will have the file two times.
 

roippi

Developer
Well, it will stop users from moving scripts around in their /scripts folder if it is connected to a SVN-repository since Mafia will copy the file to its original location every time and so if you set up your own folder structure you will have the file two times.

Actually you'll only have it once. Moving SVN-installed scripts around locally will stop them from being updated via svn update since I've put checks in to make it only push local updates if the file still exists locally. Moving it to another location is the same as deleting it, as far as that check is concerned.
 

holatuwol

Developer
Seems like a side-effect of this would be to declare script dependencies and have those dependencies auto-download.
 

roippi

Developer
How would one suggest we declare dependancies?

I can think of three options:

1) svn externals: you can do this right now. I haven't coded the event handler to push externals updates to local folders, but doing so would be easy. I have concerns about making this the go-to method though, as lots of scripts will want to pull in the same externals, which will cause numerous numerous issues.
2) Top-level text file in your repo that declares a list of dependencies. Pretty straightforward. Would be the only top-level file allowed through validation, along with the four directories.
3) We could wait until the GUI gets implemented, and dependencies could be declared in the list-of-scripts-you-can-install file.

I think I like option 2 the best?
 

Winterbay

Active member
So... I'm trying this out and have created a project for WHAM and my sushi-script just for the fun of it. When I try to check it out with Mafia it fails validation and I'm not sure why...
Code:
[COLOR=olive]> svn checkout      https://svn.code.sf.net/p/winterbay-mafia/code/[/COLOR]

Validating      repo...
The requested repo failed validation. Complain to the script's      author.
repo at /p/winterbay-mafia/code did not pass validation.      Aborting Checkout.

I have a root folder called "Winterbays Helpful Scripts" within which is a Scripts-folder the folder Winterbay containing the two files WHAM.ash and sushi.ash. Wasn't that the way it was supposed to be?
 
Last edited:

lostcalpolydude

Developer
Staff member
So... I'm trying this out and have created a project for WHAM and my sushi-script just for the fun of it. When I try to check it out with Mafia it fails validation and I'm not sure why...
Code:
[COLOR=olive]> svn checkout      https://svn.code.sf.net/p/winterbay-mafia/code/[/COLOR]

Validating      repo...
The requested repo failed validation. Complain to the script's      author.
repo at /p/winterbay-mafia/code did not pass validation.      Aborting Checkout.

I have a root folder called "Winterbays Helpful Scripts" within which is a Scripts-folder the folder Winterbay containing the two files WHAM.ash and sushi.ash. Wasn't that the way it was supposed to be?

You need to checkout https://svn.code.sf.net/p/winterbay-mafia/code/Winterbays Helpful Scripts/ instead, since that is the folder with /scripts in it. And I don't know if Scripts instead of scripts matters.
 

roippi

Developer
Bale-

:) nevermind. Looks like you saw it.

Winterbay-

Yes, what lost said. You were giving it the repo root, which is invalid; you need to give it the url to your project folder, which is valid.
 
Last edited:

roippi

Developer
Oh yes, and Scripts/ will fail validation, you need scripts/. They signify different directories in some environments, so presumably it's a good thing that that fails validation.

One very small recommendation: probably best to refresh the list of scripts after a checkout command.

That command just lists out the directories that are currently in svn/, I'm not sure what you're reporting.
 

bumcheekcity

Active member
Like I just checked out bumcheekascend and went to immediately run it, but I had to click "Scripts->Refresh Menu". It's not a massive issue, but might confuse a person new to mafia.
 

Winterbay

Active member
Oh yes, and Scripts/ will fail validation, you need scripts/. They signify different directories in some environments, so presumably it's a good thing that that fails validation.

I tried changing it, but TortoiseSVN didn't think changing the S to an s was something that mattered.
 

fronobulax

Developer
Staff member
FWIW, I finally got around to updating for the first time since SVN went in and NetBeans built 12151 just fine. Confirmation that you got the build file right.

Also, which version of the local SVN directories is the client expecting? I assume 1.7 and that's fine. but I ask because I have not found a SVN plugin for NetBeans that handles 1.7 (maybe I should look again) and so I keep my Tortoise downgraded to 1.6. This just means that if I try to use Tortoise to supplement mafia's commands, I will get what I deserve.
 

roippi

Developer
I tried changing it, but TortoiseSVN didn't think changing the S to an s was something that mattered.

Do right click folder> tortoisesvn > rename... then commit changes.

In windows, files are not case sensitive, but in svn they are. So if you try to just change case (and nothing else) in windows explorer, it's going to break things.
 

roippi

Developer
Also, which version of the local SVN directories is the client expecting?

Well svnkit 1.7.9 is 1.7 compatible. I forget how this works - I think 1.7 svn clients automatically upgrade working copies to 1.7 even if the server they're getting the repo from is <1.7? I'd have to google it.

Chances are pretty good that it's not going to be 1.6 compatible if I had to guess, sorry.
 
Top