0

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?

emfi
  • 649
  • 6
  • 23

1 Answers1

1

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

Peter Parker
  • 29,093
  • 5
  • 52
  • 80
  • after some research, i know now how to use your suggestion. but i wonder if something like this is available for netbeans... – emfi Oct 15 '13 at 15:15
  • I am not expert for netbeans, but I am sure there are ant or maven task out there you can easily modify to insert these actions into a pre-build step – Peter Parker Oct 16 '13 at 12:41