Getting Involved

bumcheekcity

Active member
Mainly out of interest, how many people code KolMafia? I'd like to see if it was easy enough for me to make changes, bugfixes, help and whatnot. Is there a CVS, or is the code avaliable somewhere for us to poke through and go "oooh"?

I'm no Java expert, but I would like to have a project this summer :D

EDIT: Here's how I did it:

1) Download and install "Tortoise SVN" from the interwebs.
2) Right-click on your Desktop once it's installed, go to "SVN Checkout", and then type "https://kolmafia.svn.sourceforge.net/svnroot/kolmafia" into the URL of Repository box.
3) Click OK, and it'll download your stuff, by default into your Desktop/kolmafia folder.
4) When you want to update the files, right-click on your kolmafia folder and select "SVN Update".
5) To compile, you'll need to install Ant. Google for and download "WinAnt".
6) Go to your C:/Program Files/WinAnt/bin folder and copy and paste "ant.bat" into your Desktop/kolmafia folder.
7) To compile, double-click on that batch file.
 
Last edited:

bumcheekcity

Active member
Posted in that thread, but as it's a sticky, it's clearly not checked that much. We have Tortoise CVS here, and I can't install anything else. Is there an easy way to get into the code using Tortoise? I'm managing to read it, but I'm unsure how to actually submit any changes that I'd like to make.
 

Veracity

Developer
Staff member
You need submit privileges on Sourceforge before you can submit changes directly. I can enable that, but I suggest you do what the other developers did initially: submit your code to existing developers who have submit privileges for inspection and let them submit it for you, so we can get to know you and trust your code. Who ARE you, anyway? What is your sourceforge ID? I'd like to look at your profile there. Send me e-mail. :)

Edit: Actually, holatuwol added me immediately, after I sent him e-mail with my credentials and stated desire to work, but he clearly read every single line I submitted for months, since it seems like he submitted changes to my changes pretty darn often. Eventually, I learned the ropes - and started submitting changes to HIS submits.
 
Last edited:

bumcheekcity

Active member
My username is "bumcheekcity", on Sourceforge.

By submitting to existing developers, do you mean to email one of you manually with information about what I changed, and the edited files?
 

jasonharper

Developer
The normal way of submitting changes is in the form of a "diff" - I'm sure that Tortoise can generate them, but I don't know the details. The edited files themselves aren't of much use, since anyone using them would lose any changes they'd made to that file, or that had been committed since you'd grabbed your copy of the file.
 

bumcheekcity

Active member
OK, I'm using Tortoise and the various PuTTY programs, but I get the error:

cvs [checkout aborted]: read lock failed - giving up

When I try to checkout the "Kolmafia" module. I'm connecting to :ext:bumcheekcity@kolmafia.cvs.sourceforge.net:/cvsroot/kolmafia and can fetch the module list without problem.

I've generated an SSH key using puttygen.exe, I've linked it to my Sourceforge account in the options there, and I'm running pageant.exe in the background with my open key thing loaded into it.

So yeah, I can't checkout the module. Is this a common first error, or am I being dumb?

You know, or both :p

Edit: Oh yeah, and how is it best to compile and test anything I've done when I've done it?
 
Last edited:

Alhifar

Member
You are trying to check out from the CVS source, that hasn't been used in quite a while. You should be checking out from the SVN repository instead.
 

Veracity

Developer
Staff member
We switched from CVS to SVN on April 3, 2006. I am not interested in looking at changes you make to the last CVS version. :)

I have no idea how you compile and test on Windows. On my Mac, I just type "ant" in my Terminal window to create the .jar file and then execute it via "java -jar KoLmafia.jar".
 

bumcheekcity

Active member
That might help. I downloaded Tortoise SVN and I've got the source all downloaded. I'll be cocking about and testing over the next couple of days. Perhaps I can do something useful :D
 

Alhifar

Member
I personally always use ant daily, but otherwise it is the same on windows and linux, assuming you have ant installed and configured correctly (Which can occasionally be a bit of a feat on windows)
 

plus4

New member
The normal way of submitting changes is in the form of a "diff" - I'm sure that Tortoise can generate them, but I don't know the details. The edited files themselves aren't of much use, since anyone using them would lose any changes they'd made to that file, or that had been committed since you'd grabbed your copy of the file.

Does it have to be a diff file? I've did what Veracity said (submitted my code) and asked essentially the same question here: http://kolmafia.us/project.php?issueid=384 , but I didn't get any replies. "Resubmit this in the form of a diff file" or "We don't want to put in this change" would have been enough. Being ignored is disappointing.

The edited files would still be useful, with a utility like WinMerge it's easy to check/merge changes.
 

StormCrow42

Member
Diff files are the gold standard for submission of software changes to free software projects everywhere. They are easy to parse to see what's changed as well as easy to apply to files that have been changed elsewhere.
 

Veracity

Developer
Staff member
I didn't get any replies. "Resubmit this in the form of a diff file" or "We don't want to put in this change" would have been enough. Being ignored is disappointing.
I'm sure it is. I remember that your suggestion looked perfectly reasonable.

However, speaking for myself, a lot of things have been looming large in my life, recently. I simply do not have the time to look over code, edit it into the source, test, and submit, unless it's something that makes my personal KoL experience better. Since I never, ever, pull things from Hagnk's via the Relay Browser (in fact, since I'm perma-Hardcore, the only time I pull things is in aftercore - and I do that all at once via the Item Manager), I didn't rush out to put in your change.

In other words, the lack of response had nothing to do with the format of submission, the quality of the code, or the reasonableness of the change. It had to do with balancing time spent on KoL/KoLmafia with time spent elsewhere.

Speaking for myself, not Jason or hola or others with commit privileges...
 

bumcheekcity

Active member
Right, so I made a change. Nothing special, just some things in /src/data/adventure.txt that were bugging me (i.e. something I couldn't feck up that badly).

I'm a little unsure HOW to submit this diff. Using Tortoise, I can right-click on it and see the differences, and that's all right. What's the process of actually submitting this change?

EDIT: Tortoise tells me to right-click on the basefolder and select "Make Patch", and then I just uploaded the files. Is that of any use to anyone? I'm aware the change isn't exactly anything really useful, but knowing HOW to submit things will help.
 

Attachments

  • kolmafia.zip
    2 KB · Views: 18
Last edited:

jasonharper

Developer
The .diff and .patch files in your .zip were identical; either is exactly what is needed for applying the changes to the source.

Now, as for the actual changes - in the Spooky Forest, under what circumstances would you want the sapling and map as goals, but NOT the fertilizer?
 

lostcalpolydude

Developer
Staff member
Now, as for the actual changes - in the Spooky Forest, under what circumstances would you want the sapling and map as goals, but NOT the fertilizer?

You can pull the fertilizer. You might want to pull it only if you don't get it before getting the other items.
 

bumcheekcity

Active member
The .diff and .patch files in your .zip were identical; either is exactly what is needed for applying the changes to the source.

Now, as for the actual changes - in the Spooky Forest, under what circumstances would you want the sapling and map as goals, but NOT the fertilizer?

Ah yeah. Tortoise just decided to create a .patch file, and I thought a .diff file might be also useful. That's fair enough.

The sapling and map should be goals in SC, fertilizer added in HC (when you can't ever pull it). And obviously, once you've got the mosquito. In which file are these conditions set?
 

jasonharper

Developer
That makes sense - patch accepted in r7414.

There's no current mechanism for making the available goals conditional on your ascension type or prior actions, if that's what you're asking.
 
Top