The function and usage skills of the clean up command of the SVN command

When using SVN to update, or using IDEA to update SVN, the update may stop halfway. Prompt when update again....clean up....file locked...

SVN cleanup command clean up

  • When SVN changes your working copy (or any information in .svn), it will be as careful as possible. When any modification operation is performed, SVN will record the log to the log file, and then execute the command in the log file, and save a lock on the relevant part of the working copy during the execution process to prevent the SVN client from accessing the working copy during the change process. . If the operation of SVN is interrupted (for example: the process is killed, the machine dies, IDEA is manually stopped)

  • Log files are saved on the hard disk. By executing the log file, SVN can complete operations that were not completed last time, and your working copy can be brought back to a consistent state.

  • This is what the svn clean up command does: it finds any remaining log files in the working copy and removes the lock on the working copy in the process. If SVN tells you that part of your working copy is "locked",
    you need to run this command.

2. Local file locking. When using the "Clear" command to
update SVN locally, some operations are interrupted, such as insufficient disk space, user cancellation, etc., which may cause local files to be locked. At this time, no matter you are executing subcommands such as SVN update, commit, etc., it will
prompt "**locked" error. The usual solution for this situation:

1. You can use SVN clean up to clear the lock.
2. If this directory is not locked, the system prompts that the upper directory is locked, and it needs to be cleared in the upper or root directory.
3. If the root directory cannot be cleaned, the general method is to find another directory to CHECKOUT again. However, sometimes there may be some locally modified files in the SVN directory, which have not been submitted to the SVN server. In this case,
when re-CHECKOUT, you need to pay attention to the backup of the local files, and do not force the content modified by others on the server to be overwritten.
4. In fact, SVN lock will generate a file named lock (no suffix) in .SVN (hidden file), find all and delete them manually. Then try to update again, the system may prompt that a .base file cannot be accessed.
Find it, delete the relevant file or the directory where it is located, and re-UPDATE.
5. In the corresponding directory, for example, I encountered a similar situation when I updated the "/opt/metasploit3/msf3/lib/active_support/core_ext" directory of metasploit, put the .SVN subdirectory (note that the
"." directory It is a hidden directory. You need to select the "Folder Options" → "View" → "Show Hidden Files" menu item) to delete the log file in it. Then go ahead and do the svn cleanup command.

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=324534326&siteId=291194637