Bug - Fixed Script Manager fails "Update this script"

RogerMexico

New member
I've been having this error for quite a long time, just updated to latest r15889 and tried again.

Using Script Manager, right clicking any individual script and choosing "update this script" results in the following error:

"No existing project named <script-name>. Did you mean to do "checkout" instead of "update"?
Done."

This error occurs regardless which script is selected. For test purposes, I installed "Best PvP Gear" from the Install tab, then went to the Manage tab, right clicked the entry for the newly installed script, and chose update. The same error resulted.

Strangely, if I right click and choose update all scripts, this seems to work. (Mafiachit was updated, other scripts reported "at HEAD". I took this to mean they were up to date, but for all I know they are in the navy and had to use the toilet.)

Updating individual scripts from the CLI also works fine, but this is a rare instance where I prefer the gui.
 

Bale

Minion
Cannot duplicate this. I am using Windows XP, Java 1.8_45.

If you create a fresh installation of KoLmafia in a new directory does this bug still happen?
 

RogerMexico

New member
Cannot duplicate this. I am using Windows XP, Java 1.8_45.

If you create a fresh installation of KoLmafia in a new directory does this bug still happen?

I'm running Ubuntu 12.04 with Open JDK 7u79 (1.7.0_79). Renaming the .kolmafia directory and creating a new one for a fresh setup gets me the same error.
 
Last edited:

RogerMexico

New member
Guessing we resolve the home directory incorrectly for that command on *nix.

Oh hi. It's like about 2 years later and this still isn't working.

However, after copying my .kolmafia folder to another laptop, I made a discovery. If the mafia jar file that I am running is launched from the .kolmafia folder, then "update this script" from the gui works fine.

If I recall correctly, running mafia under Windows causes the settings files to be created in the same folder that mafia is launched from. Under *nix, the settings are instead created under ~/.kolmafia.

I remember asking why it wasn't possible for mafia to place its settings in the same folder as the jar under linux, and getting the answer that doing so would not follow standards. While true, it ignores the fact that it also doesn't follow Windows standards (which would be to store settings at /appdata/local/kolmafia, or somesuch).

All in all, sounds like this is something that just isn't going to get fixed. (Sorry to bother... sometimes my mind is small, and has many hobgoblins.)
 

heeheehee

Developer
Staff member
It looks like the GUI menu button is the equivalent of running "svn update https://svn.code.sf.net/p/winterbay-mafia/wham/code/" (i.e. the script manager frame uses the repo). In that particular case, svn.UpdateRunnable uses the String KoLConstants.SVN_DIRECTORY, which is just "svn/", as opposed to the File KoLConstants.SVN_LOCATION (which is indeed correctly used in the case where we specify the script name via "svn update winterbay-code-wham"), which contains the root directory logic.

I'm a little surprised that it doesn't affect Veracity on OS X, since IIRC the root directory is something like ~/Library/Applications/KoLmafia/, as opposed to the current working directory (which is the case on Windows).

(I haven't actually tested this theory, just been digging at the underlying code)
 
Top