3

I am an SVN noob that has been given the job of investigating some issues with our SVN externals in a project.

Using TortoiseSVN I have made my way to the root directory of the project and selected 'commit'. After wating a couple of hours (it is a really big project) I have noticed that many of the directories which are pulled into the project as externals are listed as non-versioned, regardless of whether or not the Show externals from different repositories box is selected.

Extra Info

  • I am not using svn:ignore on the directories.
  • Only some of the svn:external directories are effected by this issue, not all of them.
  • The folders/files that I am talking about were put there using svn:externals in the format of '[relative path in the repository] [Directory]' Then pulled into the project using svn:update.

Why is this happening?

Aziz Shaikh
  • 16,245
  • 11
  • 62
  • 79
StevenP
  • 177
  • 1
  • 3
  • 15
  • Do you happen to have svn:ignore set with those directories in it? We're going to need a bit more information. – Corbin Nov 16 '11 at 00:01
  • No, no svn:ignore is set on the directories that are showing up. The weird thing is that its only some of the svn:external directories, not all of them that are showing up like this (when show externals is not ticked) – StevenP Nov 16 '11 at 00:08
  • Can you do 'svn stat .' in the directory and tell us what it says? – Corbin Nov 16 '11 at 00:09
  • Sorry, I meant in a directory that contains one of the non-versioned directories. – Corbin Nov 16 '11 at 00:23
  • Similar thing, I did a stat on the folder that contains all of the externals, and they show up as 'unmodified files'. The external folders show up at unversioned as well – StevenP Nov 16 '11 at 00:27
  • Hmmm... Maybe the files were placed there manually and not checked out as externals. Try making a new version of the working copy, and see if they show up as unversioned. (Or maybe checkout a small portion of a new working copy since you said it's quite large.) – Corbin Nov 16 '11 at 00:28
  • I can confirm that the folders/files that I am talking about were put there using svn:externals in the format of '(relative path in the repository) Directory' Then pulled into the project using svn:update, if that helps? I will try and check out a new copy as you have suggested. – StevenP Nov 16 '11 at 00:37
  • Hmmm... I'm not sure if a relative path to the same repository is valid for svn:externals. If I remember correctly, it must be a full path. Can you paste the content (names edited if you want) of svn:externals? – Corbin Nov 16 '11 at 00:39
  • Sure, for example say I have svn:external '/Config/ExternalProject/trunk Project/External1' when I commit the project, the dir Project/External1 will show up as a non-versioned folder. I can't svn:ignore the foler because that would mess up the externals and I can't add the folder for the project because its not part of the project. Essentially what I am saying is that I want to hide these external 'container folders' from the commit. is that possible? – StevenP Nov 16 '11 at 00:52
  • It sounds like svn:externals are exactly what you're looking for. Either something is misconfigured, your TortoiseSVN installation is bad, or something else squirrely is going on. Have you tried using just the svn binary to check out the repo? I'm curious how it's being pulled through an externals property, yet it's showing up as unversioned. – Corbin Nov 16 '11 at 04:39
  • How about included all the information of the comments in your question? By commenting and re-commenting, the question is kept unclear with nearly no information ... – mliebelt Nov 16 '11 at 07:09

1 Answers1

2

Solution

The problem is caused by introducing new directories to store svn:externals that are not part of any project or external in the working copy.

For example: say I have project ProA that contains directories dirB and dirC. I also have another project called ProD, which I want to add as an External to ProA's *dirC* folder within a subdirectory named 'Externals'.

I check out ProA and on its svn:externals property I add ProD to the directory ProA/DirB/Externals/ProD

Because the folder 'Externals' exists in neither project, after I update ProA, and the externals are added, ProA/DirB/Externals/ProD is an unversioned directory!

Fix To fix this, all that needs to be done is make sure the 'Externals' folder is part of either ProA or ProD ! I.e Committing the 'Externals' directory alone, solves the problem.

StevenP
  • 177
  • 1
  • 3
  • 15
  • 2
    If you compare your question with your answer, none of the relevant facts that is mentioned in the answer was known in the question. I hope that is not too rude, but you should give others a chance by being more concrete, giving more facts, and providing more information. – mliebelt Nov 17 '11 at 06:54
  • So, wait... You were trying to set the externals property on a directory 2 levels up? Well... glad it got worked out I suppose. – Corbin Nov 17 '11 at 19:38