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?

1 Answer 1

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
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.