Obstructed folders in Subversion

前端 未结 17 1233
南方客
南方客 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 15:45

    I ran into this problem when pasting at folder with subdirectories into my working copy using my FTP client - I knew I screwed up as soon as I hit the transfer button... the perils of working way too late.

    I tried all the suggestions above and other found online to no avail. Every option produced the error that my directory was locked and the operation could not be performed.

    I went into my Time Machine copy, restored the directory and was good to go. I cleaned the working copy as a precaution, updated my files properly and was back in business.

    0 讨论(0)
  • 2020-12-12 15:50

    I get this "obstructed" status on directories when I do updates to a CMS (WordPress or Drupal) through the web interface -- the application is unaware that its code is actually a subversion working copy, so when updating a plugin it removes that plugin's directory (including the .svn directory) and drops in a new directory from the new version of the plugin.

    To get that .svn dir back, from the directory containing the obstructed dir. I do a checkout with --force. For example, if plugin_dir is marked "~", from its parent directory I run:

    svn checkout --force http://svn.server.hostname/path/to/repo/and/plugin_dir
    

    Any files already there are left alone and marked "E" on the output of the checkout command (marked as "M" when I run svn status).

    I sometimes have to go back and add any files that were new with the update; or delete files that should be deleted as part of the update, since they re-appeared when I did the checkout. I believe these are marked as "A" on the checkout, but a subsequent svn status won't mention them.

    0 讨论(0)
  • 2020-12-12 15:50

    This can also happen when you upgrade your subversion to a version that XCode does not support.

    0 讨论(0)
  • 2020-12-12 15:51

    Without knowing what causes this, the solution can be to export the working copy (the entire checkout you have locally) to somewhere else.

    If you are using tortoisesvn, you get the option to "export un-versioned files", but I think if doing it from the command line it only exports versioned files so you might have a bit of a laborious task copying un-versioned files manually.

    Once done, check out a clean working copy and then drop the exported backup you have over the top of it. It's very important that the backup has no .svn folders in it.

    I've seen these errors before when people have checked out working copies inside other working copies or anything else that corrupts the .svn entries.

    0 讨论(0)
  • 2020-12-12 15:51

    Had the same issue and fixed it like this:

    • renamed the obstructed dir
    • created the dir with its original name in SVN (e.g. svn mkdir)
    • updated the parent folder, so the newly created dir appears in my working copy
    • copied the files from the obstructed to the newly created dir and commited them
    0 讨论(0)
  • 2020-12-12 15:56

    Nothing worked for me so i've done the following:

    • exported with the unversioned files in a new location
    • renamed the existing folder
    • moved the folder from the export location in the project
    • renamed the new folder
    • add, commit
    • removed the old, renamed folder
    • renamed the new folder
    • commit
    0 讨论(0)
提交回复
热议问题