简体   繁体   中英

SVN: how to set external property on a remote repository through command line

I'm trying to create a batch that can automatize the set of an external property on a remote tag. This batch should run on windows.

I usually accomplish this operation through Tortoise SVN Repo Browser as showed in the image below:

外部属性编辑 I've tryed to use this command line to do the same operation

svn propset svn:externals 'LocalPath https://svnserver/svn/myproject/tags/1.00/DISTRIBUZIONE89' https://svnserver/svn/myproject/tags/Distribuzione

but it seems to not work on a remote repository.

Is it possible run a command line, executable in a batch, that performs this operation?

Many thanks...

svn propset does not operate with URLs, it require checked out working copy. So script should look like(not checked):

svn co --depth empty https://svnserver/svn/myproject/tags/Distribuzione wc
svn propset svn:externals "LocalPath https://svnserver/svn/myproject/tags/1.00/DISTRIBUZIONE89" wc
svn ci -m "Set externals"

PS I guess TortoiseSVN use same trick with temp checkout, or use some Subversion API not exposed via command line.

Use bat file windows :-

svn checkout {tag url where property is to be set} {tempfoldername} --depth empty
echo {target value url for property} {foldername} > {tempfilename}
svn propset svn:externals tempfoldername -F tempfilename
svn commit -m "your commit message" tempfoldername
RD /S /Q tempfoldername
del /F /Q tempfilename

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM