Question

I have a strange problem. I am trying to implement a filter for SVN for a versionInfo.txt file that gets checked in during build. I am using CC.NET 1.6 on windows XP SP3

Below is my XML code:

With the filtered tag commented out, the code executes correctly and all files are checked out. With the filtered tag comment tags removed, I get the following error:

"Source control operation failed: svn: E155007: 'C:\Build\AmazingCharts\working\checkout' is not a working copy"

Notice the path above stops at checkout when it should contain module1 or module2 as specified in my working directory. Somehow when I specify a filter, the working directory in my SVN tags are ignored and it seems to only use the global working directory.

How do I get around this? I have been combing through the 1.6 xsd for hours and I am stumped on how to fix this.

<sourcecontrol type="multi">
    <sourceControls>
       <svn>
          <executable>$(SVN_PATH)</executable>
          <trunkUrl>$(SUBVERSION_URL2)</trunkUrl>
          <workingDirectory>$(CHECKOUT_ABS_DIR)\module2</workingDirectory>
          <timeout units="hours">2</timeout>
          <username>$(SVN_USER)</username>
          <password>$(SVN_PWD)</password>
          <autoGetSource>true</autoGetSource>

       </svn>
       <svn>
          <executable>$(SVN_PATH)</executable>
          <trunkUrl>$(SUBVERSION_URL1)</trunkUrl>
          <workingDirectory>$(CHECKOUT_ABS_DIR)\module1</workingDirectory>
          <timeout units="hours">1</timeout>
          <username>$(SVN_USER)</username>
          <password>$(SVN_PWD)</password>
          <autoGetSource>true</autoGetSource>

       </svn>
      <!-- <filtered>
       <sourceControlProvider type="svn"></sourceControlProvider>
       <exclusionFilters>
          <pathFilter>
             <pattern>**/VersionInfo.txt</pattern>
          </pathFilter>
       </exclusionFilters>
       <inclusionFilters></inclusionFilters>
    </filtered>-->
    </sourceControls>            
 </sourcecontrol>
Was it helpful?

Solution

I figured out my misunderstanding of the syntax. I was trying to add filtered as a modification of svn. Here is what is now working. I wish I could find the StackOverflow page that pointed me in the right direction on this but that is what finally gave me the clarity on this. Hopefully this helps someone else as the other page did me. It is not very clear how we are supposed to handle multi source control types.

    <sourcecontrol type="multi">
        <sourceControls>
           <multi>
              <sourceControls>
                 <filtered>
                    <sourceControlProvider type="svn" autoGetSource="false">
                       <executable>$(SVN_PATH)</executable>
                       <workingDirectory>$(CHECKOUT_ABS_DIR)\module2</workingDirectory>
                       <timeout units="hours">2</timeout>
                       <trunkUrl>$(SUBVERSION_URL2)</trunkUrl>
                    </sourceControlProvider>
                    <exclusionFilters>
                       <pathFilter>
                          <pattern>**/VersionInfo.txt</pattern>
                       </pathFilter>
                    </exclusionFilters>
                 </filtered>
                 <filtered>
                    <sourceControlProvider type="svn" autoGetSource="false">
                       <executable>$(SVN_PATH)</executable>
                       <workingDirectory>$(CHECKOUT_ABS_DIR)\module1</workingDirectory>
                       <timeout units="hours">2</timeout>
                       <trunkUrl>$(SUBVERSION_URL1)</trunkUrl>
                    </sourceControlProvider>
                    <exclusionFilters>
                       <pathFilter>
                          <pattern>**/VersionInfo.txt</pattern>
                       </pathFilter>
                    </exclusionFilters>
                 </filtered>
              </sourceControls>
           </multi>
        </sourceControls>
     </sourcecontrol>
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top