0

I have a large, old working copy of svn repository that I checked out long time ago. I'd like to export and save it preserving the directory structure.

Over time, I've deleted most of the sub-directories and files at various levels as unneeded. I'd like to export the rest using svn export.

However, the export stops unfinished due to errors like this:

svn: Can't stat 'WSN/Somedir': No such file or directory

I'd like to avoid svn update due to following reasons:

  • The repository is old and not served any more
  • Even if it would be online, the missing directories are many gigabytes that I would rather not spend time and space downloading.

One solution I know is to copy the whole tree and to run recursive delete command that removes all ".svn" directories.

However, is there a cleaner way, to ask svn for export that ignores missing files and directories?

0

If you run svn status, you will get a list of missing assets. They are signaled with the ! characters; e.g.:

$ svn status
?       default.cfg
!       models

In this example the models folder was deleted and is thus marked with a !.

To fix this you need to delete these missing folders with svn rm; in the example this would be:

$ svn rm models
D         models
D         models/model1.png
D         models/model2.png

Then commit and the export should work afterwards.

0

Or you can revert just that sub directory. Do this by changing directory to the folder you want to revert, so you don't revert the wrong thing. Then enter:

svn revert -R .

Now you can update and export as you like.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.