Question

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?

Was it helpful?

Solution

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

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top