views:

129

answers:

6

We're having a spirited discussion about this at my workplace. We're talking about user uploaded images for a bunch of products, not images needed to display the basic site. I say "no way" but I'm curious what others think.

Update: Just to clarify. These are customer supplied images for products that they are entering/modifying.

+2  A: 

Other ways of asking if something should be in version control:

  • Do the images change?
  • Are the changes related to anything else?
  • Can mistakes be made?
  • Is traceability wanted/needed?

If the rest of the site is version controlled, version control the images.

If the images are generated, version control the generator.

Ryan Graham
Additionally, version control the input data used by the generator in most cases.
Michael E
+1  A: 

It seems like what you're talking about is content that is in (or perhaps will be) in a database. If a customer is supplying you a list of products as well as the pictures of those products, then that should all come from a database. In this case, I wouldn't because your database should be backed up, but not in the VCS.

If it is not, and your web site is static, then I would only because it is "part of the site."

Nick DeVore
Product information is in database and backed up. Images are also backed up (just not in vcs or database.)
schof
+1  A: 

I agree with 'no way'.

Anything that may change on the site through day-to-day use, or is editable by whoever administers the website I consider to be 'content'. This includes uploaded files and database content, both of which are backed up separately. Nothing on the website that is in version control changes once it's been deployed. Easier that way.

Nick
+2  A: 

Presumably, what you are talking about is content that would be classified as user data, as opposed to project files. That stuff, while important, does not need versioning - that needs a plain old backup mechanism.

I recently added a new project into a fresh SVN repository, and every time I look at the 'uploads' folder I realise how stupid I was to include that in the initial commit.

karim79
A: 

If you feel you must revision it, put these resources out of the path of the main repository somehow, and then give it a dedicated repository just for that content.

You don't want everyone who has to check out code getting a copy of every image when they checkout or update, its slow, and pointless, and having them in your primary tree will just have more headaches than you can Imagine.

/common_ancestor
   /project_code/      # repository a
   /resources_dir/     # repository b

If you have to use symlinks or web-server magic to make this happen, then do that, but whatever you do, DON'T put content like that in your main repository.

As far as backups vs revisioning go, revisioning it like this does give you a slight ease if you're using SVN as your distribution method as well, that way if a developer needs a copy of the images for testing purposes, its relatively easy to get a relatively up-to-date set of them.

Kent Fredric
A: 

If you aren't going to expose the versioning to the customers, then what would be the point?

The customers are already free to use version control on their own end, before they submit the files. You may want to encourage them to do so.

Mark Ransom