svn Can't set position pointer in file

核能气质少年 提交于 2019-12-23 16:32:19

问题


I'm having an issue with an svn repository that has been working just fine up to now.

I am getting the error

svnadmin: Can't set position pointer in file 'repository/db/revs/0/783': Invalid argument

for example when I run

svnadmin verify

Other general symptoms include not being able to checkout, update, commit etc.

Any help much appreciated

thanks! Peter


回答1:


OK... I just had this problem and was able to fix it. I'm using FSFS. The last good revision I had was Revision Number 88. Revision 89 was the one that was broken.

  1. I copied the repository and named it repository-2018-10-18-broken. Absolutely do this first!!!

  2. I deleted the following files in the original repository:

/repository/db/revs/0/89

/repository/db/revprops/0/89

/repository/db/transactions/89*.*

  1. Using my trusty text editor, I then edited the file /repository/db/current and changed the 89 to 88. I left in the trailing new line.

This worked like a charm. I can't say it will work for anyone else, but I don't see why it wouldn't. It seems like it effectively, truly, deletes the bad revision.




回答2:


The only solution I could find was to make a copy of my repository as follows

svnadmin create newrepo
svnadmin dump -r 0:783 repository | svnadmin load newrepo
mv repository repository_corrupted
mv newrepo repository

After this, an svn cleanup was generally required in users checked out directories




回答3:


Easiest way ever for Can't set position pointer in file:

I did this way:

  1. Go to Parent directory(Folder) of Project.
  2. Press Right click
  3. Press on TortoiseSVN then Press Clean up...
  4. Clean up dialog would appear automatically
  5. Select Clean up working copy status, Break locks, Fix time stamps, Vacuum pristine copies, Refresh shell overlays, Include externals
  6. Pres OK

Check the screen shots for your reference.

First step:

Second step:

Hope this will help you.




回答4:


Had the same issue with some files. When I drilled down to the folder in question the revision file repository/db/revs/89 was a zero file. I guess the problem might be due to some hardware failure or power interruption (the repos is on a usb drive). The way I fixed that is to copy 88 to 89 and then I was able to submit the change again.




回答5:


When the same problem occurred we were able to track it down to an individual folder which had files that were moved incorrectly.

Other folders allowed committing and updating, only when including that folder did we get the message of being unable to set the pointer.

The solution was:

  1. Remove the offending folder from the SVN (ignore, recursive)
  2. Add the folder again.
  3. Commit the folder.

This seemed to fix whatever was wrong.

With more trial and error I guess the problem could be tracked to the file[s] that were responsible, but in this case we stopped at folder level.



来源:https://stackoverflow.com/questions/14521473/svn-cant-set-position-pointer-in-file

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!