0

I normally would connect files like this with a symlink to outside the project root, where the optional files can be linked to a separate repo URL. The trouble is that now I have a large collection of files and directories that must reside in the same directories as other files that are in the repo, which I optionally do not want to exist in certain working copies. I really do not want to make symlinks for all those files and directories. I was wondering if there was a better way.

I think an example might explain it best: (WC stands for working copy)

WC1:

  • dir_1
  • file_1

WC2:

  • dir_1
  • file_1

BUT THEN I also have 2 more working copies that I want to keep connected that have all the files of the first 2, PLUS some more files that I need to ONLY appear in working copies 3 and 4:

WC3:

  • dir_1
  • dir_2
  • file_1
  • file_2

WC4:

  • dir_1
  • dir_2
  • file_1
  • file_2

I want to be able to commit modifications to file_1 or dir_1 in WC3 and WC4 and be able to update WC1 and WC2 with those commits. I also want it to work in the other direction so that modifications committed to WC1 or WC2 can be updated in WC3 and WC4. I want to be able to have file_2 and dir_2 exist on WC3 and WC4 but not on WC1 and WC2 (and I do not want WC1 and WC2 to know or notice modifications of them). I also want to be able to commit modifications to file_2 or dir_2 on either WC3 or WC4 and update those commits on the other working copies that have those files (WC3 or WC4).

Is there a way to have the properties of a directory set differently per working copy? So the idea would be to ignore the collection of files and directories on SPECIFIC working copies while maintaining the ability to update them on the rest? Just a thought..

Make sense? How do I do this?

ghbarratt
  • 11,496
  • 4
  • 41
  • 41
  • Take a look at http://stackoverflow.com/q/122313/684934 and http://stackoverflow.com/q/704334/684934 –  Oct 06 '11 at 01:01
  • @bdares Thanks for a quick answer, but after looking at those I fail to see how they answer this question. I want to have certain files ignored in SPECIFIC working copies while NOT being ignored in others. Is there a way to make the svn properties of a file or directory working copy specific? – ghbarratt Oct 06 '11 at 01:07
  • I do believe those solutions work client-side only. Here's a question worded more similarly to what you're asking: http://stackoverflow.com/q/895548/684934 (but it doesn't seem to have a satisfactory answer) –  Oct 06 '11 at 01:11
  • @bdares Yes this third question is asking about ignoring files in a specific working copy. My problem is similar. It's too bad there was no good answer. If someone can answer this question, then they might be able to answer that one as well. – ghbarratt Oct 06 '11 at 01:21

2 Answers2

1

It's better to achieve this by splitting it on repository level and using different URLs for these WCs (and I suppose this only way it is doable). By using SVN svn:externals property you are able to combine files/dirs you need.

/shared1
   dir_1
   file_1

/shared2
   dir_2
   file_2

/proj1  -> external to /shared1 
/proj2  -> external to /shared2 
/proj3  -> external to /shared1 
        -> external to /shared2 
/proj4  -> external to /shared1 
        -> external to /shared2 
pmod
  • 10,450
  • 1
  • 37
  • 50
  • I have never used the externals property. It looks very promising. I am looking into it more now. Although it may not be the perfect answer, I am accepting this answer as the best answer. Thank you. – ghbarratt Oct 13 '11 at 05:23
0

You ask and want impossible for SVN in any way

You can try emulate to some degree using separate branches (TBT) for 1+2|3+4

Lazy Badger
  • 94,711
  • 9
  • 78
  • 110