tags:

views:

46

answers:

1

I am writing a set of django apps and would like to use Hg for version control. I would like each app to be independent of the others so in each app there may be a directory for static media that contains images that I would not want under version control. In other words, the binary files would not all be in one central location

I would like to find a way to clone the repository that would include copies of the image files. It also would be great if when I did a merge, if there were an image file in one repo and not another, that there would be some sort of warning.

Currently I use a python script to find images and other binary files that are in one repo, but not the other. But a lot of people must face this problem, so there must be a more robust and elegant solution.

One one other thing...for reasons I do not want to go into, usually one of my repos is on a windows machine, and the other is on Linux. So a crossplatform solution would be nice.

Thanks!

A: 

Mercurial can track any kind of file, for binary files if something changes then the whole file gets replaced not just the changes.

On the getting a warning if one repo doesn't contain a file, that's kind of the point of a DVCS is that the repos are related but are autonomous. You could always check and see what files were added during a synch or merge operation.

msarchet
Thanks. Yes, I am aware that I can put any file type into Hg. However, I believe that when a binary file changes, the old binary file is retained by Hg. This is nice if you want to recover the file in its previous state. But also can make the repo huge.So, for now, I will continue using python to manage the image files. Here is an interesting snippet that I pulled some ideas from:http://code.activestate.com/recipes/576777-simple-ftp-mirror/If I get time, I will post my version to activestate.
Chuck