开发者

Restoring a subversion repository to workcopy revision

My subversion VM died the other day (host hardware melted) and I had to restore a back开发者_高级运维ed up copy of the vmware server image. The restore went well and the VM is running again on a new host.

The problem I have is that my restored repository is at revision 60 but my working copy on my PC is at 66. When I try and commit my working copy I get the following error message.

svn: Commit failed (details follow):
svn: No such revision 61

What is the best way to force this commit and bring subversion up to the same revision as my working copy?


I don't think your old working copy can "teach" the new SVN server about the missing revisions (61-66).

I would suggest:

  1. Check out new working copy
  2. SVN EXPORT your old working copy onto the new working copy, thereby updating the files with your changes
  3. SVN COMMIT the changes

At this point the new SVN server will be up-to-date.


Do a fresh checkout from the restored repository. Copy the changes from your existing working copy over to the new checkout and then commit.

You do not want to copy the .svn directories. A tool like rsync can help sync to two directories.

rsync --del --exclude=".svn"

If there are lots of differences such as new files and deleted files svn_load_dirs.pl may be able to help.


Without the backup, this approach is much faster then the accepted method for getting the checkout back up and running. Furthermore, rsync is not native to a windows OS.

  1. (optional) Create a backup copy of your 'broken' checkout.
  2. Delete the .svn folder at the top level of your broken SVN checkout
  3. Run SVN Checkout on your broken checkout.
  4. (optional) SVN COMMIT the changes

An alternate solution might be possible in using SQLLite to read the SVN .db file and update the revision number manually.

Reference: How can I create SVN versioning on top of an existing project?

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜