0

My requirements are:

  1. Let's say I commit a file called MyFile.item. After this, SVN should make a copy of this file to some other SVN location.

  2. Once it is copied to another location it should also rename the file in new location as MyFile.java

Requirement 1, I think we can achieve this using svn:externals property. Could someone help on how to automatically rename the files? Or any workaround?

Draken
  • 3,134
  • 13
  • 34
  • 54
Raghu
  • 1
  • 1

1 Answers1

0

If you need an actual copy of the file in the repository, with divergent histories from the point at which you copied forward, that would be a job for a post-commit hook script. But I would also ask you to take a very hard look at your processes and reconsider this, because it's wasteful, confusing, and has a good chance of breakage.

If you need a "virtual copy" of the file, in which you can modify the file in either location and the modification will appear in both places, you want a file-level external. On the directory which will host the copy, set the svn:externals property with the URL to the "real" file and the new name that you want in that directory.

svn propset svn:externals DIRECTORY http://URL_TO_YourFile.java MyFile.java
alroc
  • 27,574
  • 6
  • 51
  • 97