Select the relevant template from the configuration file

Cut and paste the relevant template, for Git, Mercurial or Subversion, outside the <Examples> elements of the configuration file.

The template looks as follows

<Examples>
  <GitRepo>
    <ShouldClone>false</ShouldClone>
    <RemoteUrl>git@host-url:repo-name</RemoteUrl>
    <LocalRepo>C:\Path\To\Local\Repo</LocalRepo>
    <ShouldPullAndPush>true</ShouldPullAndPush>
    <XoomQuery>
      <!-- Source is xp-style source, and if specified is used instead of HostName and GetQuery. -->
      <Source>[xoom-server?localhost]:[query-name?DEFAULT] | repo-relative\file\path.xml</Source> 
      <HostName>xoom-server</HostName>
      <GetQuery>query-name</GetQuery>
      <Transform>xp.exe-relative\transformation\path.xsl</Transform>
      <Transform>another\transformation.xsl</Transform>
      <Transform>Reports\RemoveTransactionalInformation.xsl</Transform>
      <Path>configuration\path\file.xml | configuration\path\per-item\</Path>
    </XoomQuery>
    <!-- There can be multiple queries -->
    <XoomQuery>
      <Source>localhost:DEFAULT</Source>
      <Transform>Reports\RemoveTransactionalInformation.xsl</Transform>
      <Path>configuration\server-name.xml</Path>
    </XoomQuery>
    <XoomQuery>
      <HostName>localhost</HostName>
      <GetQuery>DEFAULT</GetQuery>
      <Transform>Reports\RemoveTransactionalInformation.xsl</Transform>
      <Path>configuration\server-name\</Path>
    </XoomQuery>
  </GitRepo>
  <HgRepo>
    <ShouldClone>true</ShouldClone>
    <RemoteUrl>hg-repo-url</RemoteUrl>
    <LocalRepo>C:\Path\To\Local\Repo</LocalRepo>
    <ShouldPullAndPush>true</ShouldPullAndPush>
    <XoomQuery>
      <!-- Source is xp-style source, and if specified is used instead of HostName and GetQuery. -->
      <Source>[xoom-server?localhost]:[query-name?DEFAULT] | repo-relative\file\path.xml</Source> 
      <HostName>xoom-server</HostName>
      <GetQuery>query-name</GetQuery>
      <Transform>xp.exe-relative\transformation\path.xsl</Transform>
      <Transform>another\transformation.xsl</Transform>
      <Transform>Reports\RemoveTransactionalInformation.xsl</Transform>
      <Path>configuration\path\file.xml | configuration\path\per-item\</Path>
    </XoomQuery>
  </HgRepo>
  <SvnRepo>
    <ServerUrl>svn-repo-url</ServerUrl>
    <WorkingCopy>C:\Path\To\Local\Working\Copy</WorkingCopy>
    <XoomQuery>
      <Source>[xoom-server?localhost]:[query-name?DEFAULT] | repo-relative\file\path.xml</Source> 
      <HostName>xoom-server</HostName>
      <GetQuery>query-name</GetQuery>
      <Transform>xp.exe-relative\transformation\path.xsl</Transform>
      <Transform>another\transformation.xsl</Transform>
      <Transform>Reports\RemoveTransactionalInformation.xsl</Transform>
      <Path>configuration\path\file.xml | configuration\path\per-item\</Path>
    </XoomQuery>
  </SvnRepo>
</Examples>
  1. Copy the relevant section of the template, paste it outside the <Examples> elements, then modify it according to your local system requirements. So, for example, if you are using Git, you should cut and paste everything within and including the <GitRepo> elements, as follows.
    <GitRepo>
      <ShouldClone>false</ShouldClone>
      <RemoteUrl>git@host-url:repo-name</RemoteUrl>
      <LocalRepo>C:\Path\To\Local\Repo</LocalRepo>
      <ShouldPullAndPush>true</ShouldPullAndPush>
      <XoomQuery>
        <!-- Source is xp-style source, and if specified is used instead of HostName and GetQuery. -->
        <Source>[xoom-server?localhost]:[query-name?DEFAULT] | repo-relative\file\path.xml</Source> 
        <HostName>xoom-server</HostName>
        <GetQuery>query-name</GetQuery>
        <Transform>xp.exe-relative\transformation\path.xsl</Transform>
        <Transform>another\transformation.xsl</Transform>
        <Transform>Reports\RemoveTransactionalInformation.xsl</Transform>
        <Path>configuration\path\file.xml | configuration\path\per-item\</Path>
      </XoomQuery>
      <!-- There can be multiple queries -->
      <XoomQuery>
        <Source>localhost:DEFAULT</Source>
        <Transform>Reports\RemoveTransactionalInformation.xsl</Transform>
        <Path>configuration\server-name.xml</Path>
      </XoomQuery>
      <XoomQuery>
        <HostName>localhost</HostName>
        <GetQuery>DEFAULT</GetQuery>
        <Transform>Reports\RemoveTransactionalInformation.xsl</Transform>
        <Path>configuration\server-name\</Path>
      </XoomQuery>
    </GitRepo>
  2. Each template specifies which revision control repositories will be used and where the working copies will be located (if this is confusing, bear in mind that a repository and a working copy are one and the same in distributed control systems, such as Mercurial for example). Typically there will be a single repository for storing configuration information, but the script can control any number of elements of the three supported kinds.