Is it possible to commit a single file to multiple directories that use the same parent directory using subversion

I would like to know how to copy a file / folder to several folders at a time using the subversion tool. I can put the file in several folders and then execute commit, but I just want to put it in one folder, and it should create copies in the necessary folders. Is it possible?

+3
source share
3 answers

Something like Apache Ant or Maven will help you complete this task.

Edit: maybe something like this in a pre-commit capture (create a “pre-commit” file in your repository / interceptor) (draft):

#!/bin/bash

REPOS="$1"
TXN="$2"
SVNDIR=""
SVNLOOK="/usr/bin/svnlook"
NEWPATH="/path"

CHANGED=`$SVNLOOK changed -t "$TXN" "$REPOS" | $GREP "^[U|A]" | $AWK '{print $2}'`

for FILE in $CHANGED
do 
cp "$FILE" "$NEWPATH/$FILE" 
done

svn add -force "$SVNDIR" 
0

, subversion . . , , -. , .

+2

, svn:externals. - , svn: externals (, , ). , ( , svn: externals), .

0

Source: https://habr.com/ru/post/1771062/


All Articles