Obstructed folders in Subversion

前端 未结 17 1257
南方客
南方客 2020-12-12 15:12

What the heck does \"obstructed\" mean when you try to check into Subversion? I see two folders in red with text status of \"obstructed.\" I don\'t see what this means anywh

相关标签:
17条回答
  • 2020-12-12 16:02

    This occurred to me when I replaced a file with a folder, having the exact same name. Solved by deleting the old file, commit, and then add the new one. A little hacky, but worked for me :)

    0 讨论(0)
  • 2020-12-12 16:03

    I have also seen this on Windows when I have created a symbolic link to a repository directory; in this case, the repository root is seen as "obstructed". This doesn't seem to have any affect, though.

    Steps to reproduce:

    1. Checkout your repo

      svn checkout --force http://svn.server.hostname/path/to/repo/and/plugin_dir
      
    2. Check that your directory is OK

      cd plugin_dir
      svn st -u
      

      Output should be

      Status against revision: 1234
      
    3. Create the symlink (which shows the problem)

      cd ..
      mklink /d link_dir plugin_dir
      cd link_dir
      svn st -u
      

      Output will be

      ~           1234  .
      Status against revision: 1234
      
    0 讨论(0)
  • 2020-12-12 16:04

    I deleted .svn in obstructed directories and update it from outside. Then outside svn command will recognize these files.

    0 讨论(0)
  • 2020-12-12 16:05

    Here's the simplest (and safest) way I've found to resolve this:

    1. Temporarily rename the offending file or directory (or a parent directory) that is obstructed (e.g. add ".backup").
    2. Delete any .svn directories inside the renamed directory (if applicable).
    3. svn revert the renamed (and now missing) object from step 1.
    4. svn delete the reverted object.
    5. Re-rename the backup from step 1 back to its original name.
    6. Add and check-in the renamed object back into svn as a new object.
    0 讨论(0)
  • 2020-12-12 16:11

    There are different variations of scenario that can cause this situation. Here is one example:

    I ended up with the ! mark on a directory which was renamed from www to www_a without using 'svn rename' command:

    1. Rename the current directory that bears the original name, for example to www_b
    2. Rename www_a back to www
    3. Make sure you do 'svn update' or 'svn revert' inside the www directory
    4. Delete the up-to-date www directory without using 'svn delete'
    5. Go to the parent directory and issue 'svn update'
    6. This will restore the original www directory
    7. This time use 'svn rename' to rename www to www_a
    8. Rename www_b back to www
    9. Use 'svn add' to add it into the repository

    You should get a correct svn work directory at this point. And learn a thing or two on how to resolve svn directory confusion.

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