views:

219

answers:

2

Hi,

I have updated my post according to the clarifications requested below. Thanks a lot.

We have a web application that stores audio, video, and pictures in it.

We didn't consider it before, but the digital files are being committed in and out when we do an svn export (publish). Obviously this isn't a good way to go.

We have a /video folder that has 2 gb of videos that got accidentally uncommitted. What I want to do is have svn manage everything except the video /asset folders.

The videos/images/audio files are uploaded by users of the app. So, we need to be able to roll out a site update without those being overwritten ..

Any thoughts on how we could manage deploying an app that won't overwrite the video/asset folder on export?

Thansk in advance!

A: 

I don't quite understand. svn (normally) uses an edit/merge/commit flow, not checkin/out. Can you clarify what you mean?

Anyway, can't you just svn:ignore the user-generated files?

Gabe Moothart
damn you are right, that's what he meant. Ok. Then just put them into svn ignore.
AndreasT
Thanks Gabe. I tried to clarify above. If I svn ignore an entire folder (as the number of files in it will vary) , when I svn export to the existing, will the video folder be overwritten? I guess I'm looking to do this in the most sensible way..
No it will not be overwritten. You might have to provide switches to svn export. (like --force to suppress warnings about existing directories and such like.)
AndreasT
Beware: You have to snv delete the files from the repo, then commmit, then you can export without overwriting. svn ignore works only for svn commit. If the files are in the head revision of the repo, those files will appear in an export too.
AndreasT
... and potentially override your media.
AndreasT
A: 

Well if I understood this correctly, you have certain resources in your app that are big and can not reasonably be version controlled. I would write a deployment/backup script, that keeps backups of these files, and on deployment, it just copies the newest ones into the right places in the fresh checkout. This can be done by storing/updating and extracting a simple zip(or whatever) archive that stores directories. svn can even be extended by certain events, or hooks to those events. That would enable you to do this completely on automatic. On every checkout, run a script that pulls the media.zip over ftp, extract it with "preserve structure" and "update only".

AndreasT
well I think this misses the point of the question, but I'll leave it here for now. Maybe it helps.
AndreasT
Andreas, actually, I think you have the right idea too. I was thinking we'd have to create a script to manage what we are after..
Well this is still useful as a backup system for your media content
AndreasT