简体   繁体   中英

Update one specific file on any action with head revision

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

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