Wednesday, November 18, 2009

Getting Started with hgsvn on Windows

You will need the following tools (the versions used by me are in the brackets):
  1. Slik SVN (Slik-Subversion-1.6.6-win32)
  2. TortoiseHg (TortoiseHg-0.9-hg-1.4.exe)
  3. Python (python-2.5.4.msi)
  4. Python setuptools (setuptools-0.6c11.win32-py2.5.exe)
Install them and add svn_install_dir, python_install_dir, python_install_dir\Scripts and tortoisehg_install_dir to the system PATH variable if they are not.
Run 'easy_install.exe hgsvn' from the command line. This will download and install the latest version of hgsvn (utilities hgimportsvn, hgpullsvn, hgpushsvn will appear in python_install_dir\Scripts).
cd repository
That's it! Now you have a Mercurial copy of your repo.
See hgsvn homepage and Mercurial Wiki: WorkingWithSubversion for further information.

Monday, November 2, 2009

Set MIME types for SVN files

If you wish your SVN files to be viewable by browsers (e.g. HTML documents with images), you must set MIME types for them:
svn propset svn:mime-type text/html index.html
svn propset svn:mime-type text/css styles.css
svn propset svn:mime-type application/javascript script.js
svn propset svn:mime-type image/jpeg logo.jpg
svn commit
Also see svn propset manual and MIME Media Types.