How to use SVN and make diff's


#1

A lot of people ask about how to use svn etc. I think, a good idea is to make topic for this people. I show only way for windows users.

Use SVN for download code

Ok, first step is download and install SVN Client. For windows the best client is TortoiseSVN, friendly and easy for use. Go to tortoisesvn.tigris.org/ and download client. Next install this program.

Next step is create folder for VCMI code from svn, do it and next click right mouse button and select **SVN Checkout… **.

http://img231.imageshack.us/img231/135/20090805102911.png

Ok, here is window with settings for repository. We need address for VCMI.

SVN address you can found in Board Navigation section in main page of VCMI.

Plaste this adress in URL of repository and click OK.

http://img188.imageshack.us/img188/9783/20090805104010.png

Now, client download code form repository.

http://img11.imageshack.us/img11/4927/20090805104136.png

When in bottom in this window you’ll see Complete At revision: xxx, you can click OK. Now, you have fresh copy of code form repositoy (green icon in folder).

Remember to refresh code ( click right mouse button on main folder of code from VCMI and select SVN Update ) when icon in folder will not green.

How to make diff’s
When you make changes in code, you can’t upload it to repository, because you don’t have permissions. But, you can make diff files and share it in forum.

Ok, click right mouse button on main folder of code from VCMI and select TortoiseSVN > Create path….

In this window select files what you want to share and click ok.

http://img13.imageshack.us/img13/3649/20090805104936.png

Save file and you can share it in forum.


#2

Many thanks for the above. This kind of guides “for dummies” are quite useful to get people like myself to make the first step… I still have a couple of questions tho:

Am I doing something wrong, or are those links outdated? If I use the SVN Repository link and follow the guide in this thread, I get the files in my folder, but for example Settings.txt is at a pretty old version, which makes me wonder how old are the other files. If I use the SVN Web Browser link, I get again to the same old version of Settings.txt.

Just to make sure, the command you’re referring to is “Create patch” actually, right?

And a more general question: does this SVN repository not include all files? I wanted to make some modification to a resolution. I think I figured out how to make a diff for the Settings.txt file, but I do not find the .pcx files of the resolutions. :-/ I need to add some and remove others, but unless I’m missing something, it looks like we don’t have the “Data” folder with the .pcx files. Or can those not be updated via SVN, but I just have to hand Tow the files in preparation for the next package?


#3

As to settings.txt file,

Revision 1527  - (view) (download) (annotate) - [select for diffs]
Modified Mon Mar 1 20:50:08 2010 UTC (2 months, 3 weeks ago) by tow-mwu
File length: 13311 byte(s)
Diff to previous 1498

For 0.8 release.

No one has modified it since then, possibly current content of package has been changed manually.

Repository includes only text files of code and other necessary config files.

I believe that more precise manual is the one on Wiki.