Notifications
Clear all

[Closed] Code management

 JHN

Hi Dave,

Sure… once you get used to it it’s really simple and conviniend.

Turtoise is a subversion spinoff integrated into the windows shell. So it’s only meant to be accessed by the shell.

I think you’re somewhat familiar with the concept, it uses a repository to store all the data, (this can/could be accessed by many people) and a working copy, where you edit your stuff in. If you think you’ve done enough coding you commit your changes back to the repository. If someone else had also put up stuff to the repository you’ll need to update your working copy first before committing. If there’s a conflict you will be notified and a comparison is made too see which changes to keep. With every commit you’ll increase the revision of the project. You can always go back to older versions of your scripts. Which is very very handy, especially when you deleted portions of code that you thought weren’t relevant anymore, but later on are relevant again. This also helps keeping your code clean and not worrying about loss of code you worked hard on.

Practical stuff:

Repository:
I have a repository c:\SVN folder on my harddrive where in each subfolder I create a repository. Say I have a project named “hairtools”.
create C:\SVN\hairtools\ -> RMB : create repository.
depending on which version choose something like “native file format” or “file system” can’t remember exactly, for the storage type… the latest version seems not to do this anymore.
This is your database, you’ll won’t find the files here since they’re stored in a database.

Working copy:
Now you’ll have to make a local folder anyplace and hit “svn checkout”. This will get all the data from the repository. But since it’s empty it will create a .svn folder which holds meta data. It will ask for the URL of the repository, which is in my case the C:\SVN\hairtools
Hit ok. Now I can start working. Add files directories etc. Once I think I’m due to make a contribution to the repository I hit “SVN Commit” (RMB on the root folder of your working copy) and it will popup a dialog showing what’s unversioned etc. Add all or just the files you want.

Export:
You can export your working copy to another location cleaning up all .svn folders. That’s what you do if you want to publish your script online or to some else.

There’s lot’s more options but you’ll find out their uses once your busy using tortoise.

Also, some people use 1 repository for all script and some like me use a repository per project. There’s something to say for both. I have this nag that I think a svn version of a script should be for that script alone not for all scripts in the repository. But that’s just this weird control thing I have. Cause one big repository is also quit easy to maintain…

Hope this gets you a head start!
Let us know your findings

Cheers,
-Johan

Hi all!

I use a single SVN reposiory for everything (max script, java code, c code, tools and libraries) and I’ve found it miles ahead of CVS (which it’s suppose to be seen as it’s the replacement…:P)

It’s great because I can login to the VPN at work and do work on the go…so if I get that cracker of an idea at home, I can test it against real working code…great time saver…

I’d like to pull together a solution for the studio where the artiests can also use it, but I don’t really have the time to develope one up…yet…(it would need to compliment the open and save functionality in some way, because I’d really like not to confuse them)

One of the biggest complaints I’ve had with CVS in the past is the inability to lock files (I think it can be done in later versions, but we had huge problems with it when I was first using it…). While I’ve not used it, I’m pretty sure that SVN provides this feature, great for stopping people from editing a file you’re behind you back :{ … Particularly binary files…

Shane.

1 Reply
(@robgalanakis)
Joined: 11 months ago

Posts: 0

You can register a pre-save callback to check out the current or target file from SVN using ShellLaunch or DOSCommand? The artist could have a checkbutton on his toolbar whether he is in checkout mode or something (turning it off would unregister the callback).

I was thinking about adding new menu items and adding the functionaility under that, but the it’s all the same in the end…all I need now is time

Shane

Hey Johan,
WOW! Thanks so much for that detailed explanation, I’m sure that will give me a great head start. No doubt I’ll be back with questions, but for teh meantime, that’s perfect.
Cheers,
Dave

Hi again Johan (or any other SVN users!),

OK – I’m getting it. Still options that look dangerous like “patch this” and “branch that”, but I get the basics of

[ul]
[li]how to create a new repository[/li][li]dropping your files in there[/li][li]updating / committing those files to the repository[/li][li]getting different versions from the repository[/li][/ul]So that’s good.

Now I’m free to look at how I manage everything, with one big repository, or as you say, repositories per project. I have a LOT of development folders – so I guess it would be best to get them all in there.

So, justo be clear, here’s my MaxScript folder on my Development drive:

So I’m wondering at which level should I create repositories? I know it’s a personal choice, but does one big repository eat up more room, or does it only store changes?
And does having loads of repositories become unmanageable?

Cheers,
Dave

 JHN

Hi Dave,

Glad your getting the hang of it! I have to admit that I never branch or path anything, just create new ones, or export them and update and checkout files. Sometimes I get back to get an old version of a file and use the compare tool (very handy!).
My biggest ussue is a personal one… when do you commit to the repository. Do you want to use it as a backup tool, or a project tool with versions that make sense, not just commiting at the end of the day. So this is my issue with using 1 big repository, the version relates to nothing concrete. While in project I take care on what to commit when.
Cause 1 big repository will always +1 all files in it to each commit action. But then again maybe I’m just being neurotic…

The coolest thing about SVN is that you can use it over the network easy (though very slow over VPN :()… I use it alot with websites or scripts… and I can always update to the latest version of anything from home or the other way around.

As you guessed it’s really a personal choice… I don’t have a problem managing multiple repositories, they are all found in c:\SVN”repname1|repname2|etc”

I would not make a repository that holds your scripts and your websites, actionscript or whatever…

-Johan

Page 2 / 2