PDA

View Full Version : SVN - I just don't get it...


MrJackdaw
09-18-2010, 12:29 AM
Ok, I've looked around, I've read faqs and guides and this is what I understand about SVN;


It allows multiple users to work on a plugin, should you wish them to.
It allows different branches of a plugin - so that you can try new ideas without damaging the main plugin
You can use it solo and the "Revert" function sounds very useful!
Enabling SVN for a plugin on the site is very simple
To upload I have been using the repo browser and dragging-and-dropping.


Ok, ok. So, I have enabled SVN for Align, and made it private for now...

What I don't understand is - using tortoise - how do I upload revisions or download the old versions? And believe me when I say I *have* looked and looked at different guides. I just don't get it. I have used the "Repo Browser" to upload - but then I get a load of new folders and don't understand how to use them.

I want;

To be able to upload the current files to the SVN keeping the current file structure
To have a seperate SVN for my libraries that are shared by my plugins, that is not on the lotrointerface site as a download but for dev purposes only
To be able to work on a "live" copy on my machine and sync it with the online copy - essentially for the copy on my PC to be the alpha one at all times.
I am not bothered about branches yet as I intend to just keep it to myself until I understand it better. Essentially the SVN copy will be my alpha version.


In other words - I want a magic button that uploads the version of the plugin on my computer that is used by me in game to be uploaded to the SVN, and a second magic button to reverse the process should I need to.

I wouldn't even mind if I had a single SVN for all my plugins - a JackdawPlugins SVN - so I only have one folder to sync.

Sorry for my ignorance, and believe me when I say I have looked!

EDIT: In fact - the more I think about it the more a single SVN for all my plugins sounds very attractive.

Cairenn
09-18-2010, 12:50 AM
You probably already did this, but did you look through the FAQ for it that we have over on WoWI? (I still need to get it ported to LotROI, sorry)

http://www.wowinterface.com/forums/faq.php?faq=svn

MrJackdaw
09-18-2010, 01:08 AM
That was the first one I looked at. But it doesn't quite tell me all I need to know - sorry!

Cairenn
09-18-2010, 01:14 AM
No problem at all. I'll see if I can find someone with more SVN knowledge that might be able to assist.

[Edit] /me imports some help from WoWI.

cladhaire
09-18-2010, 06:48 AM
A few things:

You could create a single SVN that can be used for all of your plugins, but then you will not be able to take advantage of the packaging system. In my personal opinion, this is the most attractive part of using the integrated SVN system, so I'd recommend against this.

Unfortunately, I can't help you out terribly with Tortoise SVN, but the basic steps are:

Create your SVN through the web interface
Copy the address, which should look like this: svn://svn.lotrointerface.com/TestProject-708
Add /trunk to the end of that, making it svn://svn.lotrointerface.com/TestProject-708/trunk
Using a guide (http://tortoisesvn.net/docs/release/TortoiseSVN_en/tsvn-dug-checkout.html) check out a working copy of this directory to somewhere on your computer.
Add the files, make any changes you want to make
Then commit your changes using This guide (http://tortoisesvn.net/docs/release/TortoiseSVN_en/tsvn-dug-commit.html).
Some notes:

You can add the files to this repository keeping the exact same structure you already have, just drop them in the checked out folder and commit.
You can make svn repositories for projects on lotrointerface.com that you don't actually publish, no worries there.
This is how things are meant to work, just do what I've done above.


There isn't and won't be a 'magic' button. You commit changes to the repository using the guide I list above, and then they are pushed to the server. 'Reversing' that is a bit more difficult, since that doesn't really make sense in the context of development, but you can do everything you want to do.

MrJackdaw
09-19-2010, 12:25 PM
Thanks Claidhaire! I will give that a try tomorrow - Just got back from a long weekend camping with 14 kids and I am well and truly bushed... think my brain would implode if I try this tonight!

EDIT: My brain didn't explode and I am... intrigued. May give this a go with my other plugins too!

Digital_Utopia
09-19-2010, 10:26 PM
Yeah ran into some difficulty with this as well....but pretty much figured that there's no way to both use the plugin folder as my working copy, and also keep the folder structure I need for deployment. (I actually did get Svn to import correctly, but updating wasn't working - probably due to the difference in folder names)

Which pretty much means I have to constantly copy to the plugin folder in order to test - and would just make development a pain. So for now I think I'll just stick with doing it without Subversion - as copying files into a folder when I'm ready to release and zipping it is a lot less annoying.

If I'm just misinformed, I'd welcome anybody to "prove me wrong" :)

Dolby
09-20-2010, 02:16 AM
You can keep the files in the root of the trunk folder and if you want it to put all the files in the trunk folder into a subfolder you can set the "lotroi:dirname" svn property on the trunk directory. This will force the packager to put all the files in /trunk into a folder with the name you specified.

Was that what you were having trouble with?

Digital_Utopia
09-20-2010, 03:08 AM
You can keep the files in the root of the trunk folder and if you want it to put all the files in the trunk folder into a subfolder you can set the "lotroi:dirname" svn property on the trunk directory. This will force the packager to put all the files in /trunk into a folder with the name you specified.

Was that what you were having trouble with?

yeah, that would do it - I'll give it another try a little later. Thanks for the tip!

MrJackdaw
09-23-2010, 12:53 AM
Another question, now I have Align working properly through SVN;

My folder structure is that all plugins are stored in JackdawPlugins - my libs, and every plugin uses this folder. So, can one folder on my PC be committed to more than one SVN? Different files and sub-folders would be updated on each - though, for example Bevy o' bars and PopUps would share the Libs folder.

MrJackdaw
09-24-2010, 01:22 AM
Forget it - I have found a work-around.

Digital_Utopia
10-04-2010, 11:13 AM
You can keep the files in the root of the trunk folder and if you want it to put all the files in the trunk folder into a subfolder you can set the "lotroi:dirname" svn property on the trunk directory. This will force the packager to put all the files in /trunk into a folder with the name you specified.

Was that what you were having trouble with?

lotroi:dirname property doesn't appear to do anything. :/