0

One repository that mine has been depending on decided to delete the folders that my externals were set to. The next time that I tried updating my repository, TortoiseSVN would complain that the affected externals could not be found at their URL. I can still get them by setting the revision of each external to what it was before they were deleted. It seems like the purpose of using externals (pulling remote updates) is now defeated, and I'd like to integrate the individual externalized files into my own repo.

How can I remove the external properties, and then check in the relevant files into my own repository? Trying to remove the external properties from the top folder, checking out the changes, then updating will cause the previous external folders (and their files) to be removed from my repository.

gcode
  • 2,954
  • 4
  • 21
  • 32

2 Answers2

1

The easiest way will be to:

  1. svn propdel your svn:external definitions.
  2. svn commit this, and svn up
  3. svn export <external@rev>
  4. svn add …
  5. svn commit
Paul Wagland
  • 27,756
  • 10
  • 52
  • 74
  • So if I follow this correctly, I needed to delete the property, commit my repository, then update it? Same thing as the last paragraph of my question, and my comment to Dialecticus :\ – gcode Oct 18 '13 at 23:55
  • Thanks Paul, after a few tweaks this seemed to be the solution. For anyone else needing to try this, I had to run svn propdel, to remove my svn:externals, but otherwise this was right on. Could I have possibly avoided a few steps by svn adding to begin with, then removing the properties, then committing? – gcode Oct 19 '13 at 14:52
  • 1
    @TGP1994 I don't think that this would have worked, since if anything happened, you would probably end end up adding the files to the svn:external repository. – Paul Wagland Oct 20 '13 at 13:00
0

If you want to be able to change those files then yes, you have to have them in some repository, and that repository may as well be your very same. To remove externals just delete svn:externals property. Folders will not be automatically deleted, which is good, because now you can just add files in these folders, like they are any other files.

If you don't actually need to change those files you can still have your externals, but you have to "peg" them to latest revision where they were still available.

Dialecticus
  • 16,400
  • 7
  • 43
  • 103
  • But deleting the property then checking out/updating my repo deletes the folders (and their contents) that were previously external. – gcode Oct 18 '13 at 23:54
  • @TGP1994 removal of external folders on update is contradictory to my experience. On the other hand I haven't said to commit/update working copy after deleting the property. – Dialecticus Oct 19 '13 at 10:14
  • @TGP1994 just do it like Paul wrote. Download externals again. No big deal. – Dialecticus Oct 19 '13 at 10:15
  • Alright, I guess a second download was needed for some reason. Comment posted, thanks for the encouragement Dialecticus :) – gcode Oct 19 '13 at 14:53