Clone wiki

EVEMon / EVEMonRepository

OK, I'm an EVEMon Developer, now what?

Warning: This guide assumes that you have reasonably high comfort level with C# and Visual Studio, but zero experience with Git.

First of all, go get Microsoft Visual Studio Express 2012 and TortoiseGit.

If you intent to get also into EVEMon data files generation then you will also need Microsoft SQL Express 2012.

The repository consists of three parts; tags, branches and master. Branches hold developers individual branches. If you're a developer working on a crazy feature that will take some time to implement (say, EVEMon Ship Fitter), you may consider making your own branch and then merge it back in when the time is right. Tags hold historical versions. There's no difference between tag and revision 13, but tags give us a nice, pretty way to see specific old versions. The default holds the main source code, and it's what we'll deal with first.

Cloning EVEMon repository

Open up a browser and navigate to EVEMon's repository. Locate the "Fork" selection at the right-hand side of the screen. Click on that. Bitbucket will clone a copy of EVEMon's repository to your account.

Now, pick a place where you'd like to put your EVEMon repository. It could be something like C:\Projects. Now from that directory, right click and select "Git Clone..." from the TortoiseGit menu.

[Put image here]

Enter "" for your source. Enter the directory you want to use for your working directory (notice that git requires the directory to be not existing as it will create it).

[Put image here]

Click "Git Clone..." and TortoiseGit will take its sweet time cloning the repository to your computer.
After the cloning finishes you will have the entire EVEMon repository on your machine.

Fixing a bug

Now it's time to fix a bug. First, open the solution and run it, just to make sure you got everything. For an example, let's say you're going to add yourself to the list of developers on the "About" window. How rude of you!

Open the file EVEMon/AboutWindow.cs in Visual Studio and add your name.

Now, compile and run the program to make sure it works... yep, looks like it does.

Now you're about ready to commit. Note here that committing works differently in Git than in Subversion. So if you are used to do it with SVN pay attention to the following lines.

Commiting in Git only commits the changes you made to the code, to your local EVEMon repository. This does not affect the main EVEMon repository at bitbucket. If you are just a contributor you wouldn't be able to do that as you wouldn't have write permission for that.

Before you commit your changes to your local EVEMon repository, you should open an issue to your change (everybody has issues, why not you), so that we can track its progress and rate its importance. Select the "Create new issue" from the "Issues" tab in bitbucket and type in all the pertinent data.

[Put image here]

For milestone, pick what you think is appropriate. If it's a new feature that's pretty simple, set it for the next development build. If it's a non-crash or non-blocking bug, set it for the next release build. If it's a big deal and you're not sure what to put here, leave it blank, or enter the furthest build out. One of the dev admins will probably change this anyway, to fit your issue in to our milestones.

Before committing your changes ALWAYS create a branch. Give it a name with a short description of what your changes is all about.

Now commit your changes to that branch in your local EVEMon repository.

Remember: Any time you are about to do a commit do a "Pull" first from EVEMon's master branch to your local EVEMon's master branch. Someone else may have merged changes from pull requests to EVEMon's repository while you where coding.

Right-click on your working directory and select "Git Commit -> "yourworkingbranch"..." from the TortoiseGit menu. Select the files you want to commit, make sure you have used "Add" to add any new files you made.

Type in a commit message.

Remember: Include the issue number in your commit comment like "#28 Description of changes" (be sure to use the '#' too). This will automatically link the commit to the issue tracker.

Press "OK" and you're done.

[Put image here]

Now you have an issue - whew, you're off the hook - and committed your changes. Time to make a pull request.

Submitting your changes

Open up a browser and navigate to your forked repository.

[Put image here]

Locate the "Create pull request" selection at the right-hand side of the screen and click on that. Select the branch you have committed your changes to from the left part and make sure that the right part points to 'BattleClinic/evemon' repository and the 'master' branch. If a title is not automatically created, type in a short description as a tittle for that pull request. If you want type in a more lengthy description of what you changes is all about, in the description section. Select any reviewers you want to review your code. Leave it blank if you don't know anyone or you are not sure to to address it to. Choose to close the branch after your pull request is merged.

When you are all done with the above click on "Create pull request".

[Put image here]

In a little while, a dev admin will come along, see your pull request, check your code for sanity and for any nefarious code, and then either leave you a comment requesting modifications or merge the pull request to the repository.

Grats, you just had your first pull request accepted!

Getting other people's changes

Getting other people's changes is a snap. To update your repository to any changes merged at EVEMon repository you need to "Pull" the changes made to it. Simply right click on your working directory and select "Git Sync..." in the TortoiseGit menu. Select the local branch and the remote branch you want to sync, usually it will be the master branch. When you do a pull, you'll see a list of all the changes made since your last pull.

[Put image here]

If things get messy in your local EVEMon repository, don't worry, things can be fixed. As long as you haven't pushed any of your changes to EVEMon repository, your changes can be reverted or undone if you have commit them to your local repository. For more details see the related section.

OK, great, but I'm one of those dev admins, how do I push things?

OK, so someone has submitted a pull request (great, less code writing for you), and it's OK to include that code into EVEMon code base... how do you get that pull request in there?

[Put image here]

Before you merge the pull request, you must sanity check it. Read all the changed lines. You don't have to completely immerse yourself in the submitters plan, but at least check for stupid mistakes, potential performance problems nefarious code and compliance with EVEMon coding guidelines. If you merge a pull request that puts EVEMon in harm, we don't care if you made it yourself or just merged it, you will lose all your admin rights.

If the pull request does not merge automatically, leave a comment like "hey, I need you to recreate this pull request against revision X or higher" or "your code is poorly written". Remember these two things:

  1. You're not required to merge any pull request, ever. You can always escalate it, drop the Lead Dev a note, reject it outright, we don't care - we'll back you up.
  2. EVEMon is not yours. If someone submits a pull request that adds a feature you'll never use but the pull request is well formed, apply it anyway, or pass it off to another dev admin.


If you have some changes to make that will take a while, say you're rewriting a super dupper new feature or adding support for a specific piece of hardware, you should consider making your own branch. This will allow you to have safe, source-controlled development and visibility and contributions from the community without inflicting your half-realized vision on the people that, deep down, really don't care.

Making a branch is easy. Browse to your local EVEMon repository and select "Create Branch..." from the TortoiseGit submenu.

[Put image here]

On the top row find the indication "Branch" and enter a very short description on what your changes will be about. Separate the words with a dash '-' or an underscore '_'.

Select "Switch to new branch" and click "OK". Your local working directory now points to the created branch.

[Put image here]

To move between branches, select "Switch/Checkout..." from the TortoiseGit submenu. Select the branch you want to switch to and click "OK".


So you made a mistake - no problem.

Depending on what state you're in, you have the following choices.

If you changed any files and haven't committed the changes yet, just revert the files. Browse to your local EVEMon repository, right-click on it and select "Revert..." from the TortoiseGit submenu. From the window that opens select which files you want to revert and just press "OK".

[Put image here]

If you have just committed your changes, select "Show log.." from the TortoiseGit submenu, right click on the previous commit from the faulty one and select "Reset 'yourbranch' to this...". This will undo your commits from that point and forth and leave your changed files untouched.

[Put image here]

That's all, now you can breath.

You forgot something!

Ask your questions on EVEMon forums and we'll see that they are added to this document. Also, look for answers in the TortoiseGit documentation - it's really not too shabby - and post your findings in EVEMon forums for everyone.