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).
Run
hgimportsvn http://svn.foo.bar/your/repository
cd repository
hgpullsvn
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.

Saturday, May 16, 2009

Programmatically import an existing project into Eclipse

IProjectDescription description = ResourcesPlugin
   .getWorkspace().loadProjectDescription(        new Path("PROJECT_PATH/.project"));IProject project = ResourcesPlugin.getWorkspace()
   .getRoot().getProject(description.getName());
project.create(description, null);
project.open(null);

Saturday, February 21, 2009

Lorem Ipsum

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Quisque nec nisi. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed leo ante, feugiat eu, convallis et, adipiscing nec, purus. Maecenas augue. Fusce gravida nisl eu felis. Curabitur volutpat. Fusce suscipit, purus ut congue aliquam, velit erat aliquam sapien, eget elementum metus est eget urna. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Praesent nec nisl ac urna iaculis auctor. Proin metus. Aliquam erat volutpat. Sed tristique ipsum quis felis. Donec sodales, justo quis commodo tristique, nulla massa accumsan diam, vitae facilisis nisi felis ut sem. Cras sit amet lectus. Mauris placerat. Nulla facilisi. Sed eros orci, pharetra ut, pharetra non, luctus eu, lectus. Nunc pede. Nullam non diam in urna sodales accumsan. Vestibulum ac ipsum. Curabitur sed nunc eu magna commodo blandit. Duis ornare. Donec egestas neque ac justo. Vestibulum accumsan, nulla sed rhoncus scelerisque, risus erat vulputate elit, vitae laoreet massa tellus consequat odio. Aliquam eu nunc. Pellentesque eget purus. Mauris placerat est quis massa. Nulla semper. Aliquam erat volutpat. In hac habitasse platea dictumst. Vivamus eleifend neque vitae turpis. Vestibulum arcu. Nulla facilisi. Suspendisse potenti. Phasellus sodales. Suspendisse non lorem. Praesent in urna in nibh condimentum bibendum. Aenean at eros. Mauris consequat nibh tincidunt pede. Praesent condimentum est in mi porttitor elementum. Suspendisse eleifend dignissim enim. In sed justo non libero mollis eleifend. Ut sollicitudin iaculis erat. Aliquam non magna.