Status “S” in Subversion

后端 未结 14 1052
臣服心动
臣服心动 2021-02-03 16:52

At some point all files in my working copy got marked with \"S\" symbol as shown below:

$ svn st
M    S   AclController.php
     S   InstallationController.php
          


        
相关标签:
14条回答
  • 2021-02-03 17:13

    "Item is switched."

    If you used "svn switch" on your working copy that might explain it?

    0 讨论(0)
  • 2021-02-03 17:16

    I had this problem with a directory I successfully committed to SVN. The solution for me was to erase it locally then update. I couldn't see any differences, but the .svn file was fixed for whatever reason (no more S).

    0 讨论(0)
  • 2021-02-03 17:17

    Just a remark: I got the same S symbol when I checked out a deleted directory from the same location in the repository but using a different URL, i.e., using distinct protocols to checkout like 'svn checkout svn+ssh://user@scm.gforge...' against 'svn checkout --username user https://scm.gforge....'. I solved it by checking it out again by using the same URL that I used for the first checkout.

    0 讨论(0)
  • 2021-02-03 17:17

    There's another way in which this status can be achieved - which hopefully will save someone some time tracking it down.

    I unpacked an external library into my SVN root, and it turns out the third-party author has accidentally included their own .svn folder in one of their folders. This of course overwrites our own, correct, subversion folder, and has the same effect as described elsewhere on this page - a folder appears to have switched unexpectedly to another branch.

    0 讨论(0)
  • 2021-02-03 17:20

    In case anyone is coming in late looking for the answer (which is stated correctly above), I believe a likely CAUSE of this situation is an 'svn switch' on a parent directory that fails (as in the case of a local uncommitted file with the same name, and no --force option), leaving all files subsequent to the failure 'un-switched'.

    That is why (assuming the original issue is later corrected) a subsequent 'svn switch' again on the same parent directory will indeed switch the remaining un-switched files to a new repo path.

    0 讨论(0)
  • 2021-02-03 17:20

    A simple solution to get rid of the 'S' when you issue

    svn status
    

    is to just go to the dir that is marked with 'S' and delete the hidden .svn directory:

    rm -rf .svn

    Afterwards the sources show up marked with '?' and you could easily add them freshly:

    svn add path/to/resource

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