svn 1.7 error E200009 Could not add all targets because some targets are already versioned

后端 未结 5 1491
爱一瞬间的悲伤
爱一瞬间的悲伤 2021-02-19 03:14

I did a clean checkout of a repository then every day I have an hudson job that runs a script to backup the configuration. Part of the script is to add *.xml

<
相关标签:
5条回答
  • 2021-02-19 03:36

    Like Sydney's answer, I have another one-line command:

    svn st | grep ^? | awk '{print $2}' | xargs svn add

    0 讨论(0)
  • 2021-02-19 03:52

    Seems like the correct behaviour for SVN 1.7. An alternative is to add only unversioned files:

    svn st *.xml | grep ? | tr -s ' ' | cut -d ' ' -f 2 | xargs svn add
    

    However it's possible you have nothing to add, so you will get

    svn: E205001: Try 'svn help' for more info
    svn: E205001: Not enough arguments provided
    

    Related question: Add all unversioned files to Subversion using one Linux command

    0 讨论(0)
  • 2021-02-19 03:55

    Once, I met this error info, because I add a directory in a SVN directory. The directory which I added is copied from another SVN director, and it had a .svn directory, so I met the error info. Remove the .svn directory (rm -rf .svn) and it will work after.

    This is the same case I met. Hope it help some other people.

    0 讨论(0)
  • 2021-02-19 03:56

    This happened to me with netbeans where the GUI has "Commit" which is adding and committing as a single step. The solution was to use the command line, and call "svn commit -m "message", i.e. for some read the "add" step was already done when a file was copied.

    0 讨论(0)
  • 2021-02-19 04:01

    svn add something --force will solve the error E200009. In your case, svn add *.xml --force will solve your problem

    0 讨论(0)
提交回复
热议问题