I use putty connect to my Linux server, and checkout data from SVN server, I set the checkout process running in background. When I exit putty shell, the checkout was still running.
The next time I login and continue checkout with the at the same directory, following message is show:
svn: Working copy 'scon_project' locked
svn: run 'svn cleanup' to remove locks (type 'svn help cleanup' for details)
But when I run svn cleanup, still encounter problem like this:
svn: In directory 'var/data'
svn: Error processing command 'modify-wcprop' in 'var/data'
svn: 'var/data/logo.jpg' is not under versio开发者_运维技巧n
But the var/data/logo.jpg actually exists in the repository.
What's the matter, and how can I solve it? Thanks!
If you just exit Putty your checkout will not continue in the background; it will most likely hang wherever it was at the time, with any files that were being worked on remaining locked. This might cause the unpredictable behavior you've been seeing on 'clean'.
You can get around this by using the GNU Screen utility, which allows your session to stay alive when you close Putty, and tends to be included in the package managers of most Linux distros.
You can do lots of things with Screen, and the man pages are vast, but for this purpose you should only need to do the following:
screen
You're now in a new terminal and can do what you need to do, and close Putty if you like; your programs will keep running.
After logging in again do:
screen -x
And you'll be reattached to your old session.
To kill a session, hit ctrl+d, as you would to end any terminal session.
Why do you use remote connection (via Putty) to your server, holding your repository and checkout there? Can't you use any SVN client (like TortoiseSVN for Windows) on your LOCAL computer and perform all the operations on your repository here? It is much easier to solve some common problems.
SVN lock on some repository (or Local Working Copy) is a common problem and most times comes out of some error. There are many ways to unlock a locked repository. Try to Google around to find them.
According to how deeply your repository is locked, most of them may fail. In this situation, I always use so called "brute-force" mode. I.e.:
Checkout current version of repository to some new folder.
Export contents of this folder to another one (get all files without SVN meta data).
Delete all files in your first folder (the one, where you checked out repository).
Copy (or move) all files from second folder (where you exported) to first one.
Commit changes.
This is a common solution for many problems with repository, including problems with locked repository.
I strongly, again, advice you to use local SVN client on your local computer. Do not do anything remotely on the server, where you actually hold your SVN repository, unless you really have to and you are really sure, that there is no other way.
精彩评论