Setting up Symbolic Links to your Orchard enlistment

The Media Garden source code contains a number of projects. These all have to go directly into the ~/Modules folder of your Orchard website; which creates problems as you can't just clone the whole source into there. Mercurial also has issues with supporting "sub-repositories" (unlike Subversion which allows you to easily check out a subfolder of a repository).
To get around this we've provided a simple Windows batch file to set up "directory junctions" which are basically soft links from one place to another on your hard drive.
The nice thing about these is that when you commit from your Orchard repository, Mecurial won't see the linked folders; so no clutter of untracked files to ignore. Additionally you don't need any elevated privileges to create junctions (unlike some other types of link in Windows)

Step-by-step instructions

  1. Create your clone of the Orchard Media Garden repository anywhere you like.
  2. Open a Windows Command Prompt
  3. Change directory to the root of your Media Garden enlistment
  4. Type: CreateSymbolicLinks.cmd \Path\To\Orchard.Web
  5. The various Media Garden projects will appear under your Modules directory and show up in the Orchard Dashboard
  6. You can use any HG tools from the root of your enlistment as normal; it's the same files and directories, they're just now showing up in two places at once

Further reading

For more information about junctions see:
Thanks to ... for the tip: ...

Last edited Apr 9, 2011 at 5:07 PM by randompete, version 1


No comments yet.