Status “S” in Subversion

后端 未结 14 1050
臣服心动
臣服心动 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:01

    For me this happens when "svn switch" command is interrupted and to solve it with TortoriseSVN, I right click on the file and select switch back to parent

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

    I had 'S' status while switching from trunk (r100) to some branch (r50). I got the error :

    svn: Failed to add file 'web/.htaccess': an unversioned file of the same name already exists
    

    All web/'s subdirs were 'S' flagged.

    The cause : i had deleted .htaccess to svn:ignore it (r100), then had created it again (unversioned and ignored). The branch (r50) still had web/.htaccess in the repo.

    The solution :

    mv web/.htaccess ../../
    svn switch back to trunk
    svn switch to branch again
    

    Everything's fine.

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

    It means that the files are from a different location in your subversion repository than the directory containing them. The solution is to switch the entire working copy to the same location. See the two sections in the subversion book for details on how to invoke the command.

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

    If you call 'svn info' on the directory itself and on (one of) the files inside you will get two different URLs.

    You get the 'S' status if the url of a file/directory does not match the URL of the parent followed by the name of the file.

    Can you post the url of the parent and one of the child nodes? (anonymizing the URL where appropriate)

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

    I suggest you read its official help, try:

    svn st --help
    

    or

    svn st --help | grep S
    
    'S' the item has a Switched URL relative to the parent
    
    0 讨论(0)
  • 2021-02-03 17:11

    This is usually caused by an interruption when switching branches.

    Switch to a different branch, and then switch back to the branch you really want.

    svn switch some_other_branch_url

    svn switch desired_branch_url

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