Skip to content

SVNANT add with fileset fails with 'svn: '<filename>' is already under version control' [Tigris #1426] #11

@markphip

Description

@markphip

Description

I am using the development build now since I wanted to use the conflict 
resolution recently built and I experience a problem since then.

Probably I am making a mistake or something, but after a day of SVNANT code 
analysis I couldn't find the reason of this behaviour.

The problem arises when I try to add all code files in a specific directory 
(also containing sub directories) as follows:

  <target name="svn-test" depends="prop.init">
    <svn>
      <add force="true">
        <fileset dir="${project.dir.src.dotnetcode}" >
          <include name="*.cs" />
        </fileset>
     </add>
    </svn>
  </target>

When I run this task I get the error 'svn: '<filename>' is already under 
version control' which is actually correct, since the directory contains some 
files under version control. In the previous version, this didn't cause any 
problems, it just added the new generated files.

Do you have a clue what is going wrong here?

Thanks,

Patrick

Metadata Imported from Tigris (Issue 1426)

  • Creation Date: 2012-06-12 07:27:35
  • Reporter: patrickhofman
  • Subcomponent: svnant
  • Version: unspecified
  • Milestone: not determined
  • Keywords:
  • Cc:

Comments

2012-07-09 14:03:32 by urbushey

I was having this same issue, just realized that it says in the documentation 
that you can only use the "force" flag if you are using the "dir" attribute (see 
http://subclipse.tigris.org/svnant/svntask.html#add.)

So, what you need to do is change your code to:

<target name="svn-test" depends="prop.init">
    <svn>
      <add force="true" dir="${project.dir.src.dotnetcode}">
     </add>
    </svn>
  </target>

Of course, this means you can no longer use fileset's include attribute to skim 
for *.cs files. My work-around here is to check out the working directory from 
SVN, copy only the files I want into that working directory using a filtered 
<fileset> and then check that in.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions