문제

i want to have on file, that contains the HEAD revision of the whole project.

i know, that i can do that with svn propset. but the problem of this is, if the file is not changed, the value of the revision will, indeed, stay the same.

how can i achieve that this file is always updated with the HEAD revision. no matter which file was modified.

is that even possible to achieve?

도움이 되었습니까?

해결책

You can't do this inside svn repository (unless you change this specific file on each commit, not very desirable).

However there is a small tool called svnversion (part of subversion commandline). By calling this inside your workingcopy (or pointing to it via argument) it returns the revision number of this specific workingcopy.

I suggest you call this tool after each update and write the result into a (svn ignored) textfile inside your workingcopy.

TortoiseSVN has client-side hookscripts (Post-Update-Hook) which can further automate this for you.

Keep in mind that svnversion returns more than just a single number, if you have sparse checkout, modified or switched working copies

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top