简体   繁体   中英

I've setup SVN to automatically update the revision number in a txt file but only on changes to file. I'd like it to update Rev on every commit

So if the text file is altered and I commit those changes, the $Revison 12345 number updates to match.

How can I have the revision number in the text file update when it was other files/folders changes that were being committed?

Thanks

My setup is:

In SVN Settings press edit on the Subversion Configuration File

Uncomment the lines:

enable-auto-props = yes

Add the line:

VERSION.txt = svn:eol-style=native;svn:keywords=Author Date Id Rev URL;

Create VERSION.txt in your project and store in it

AppNameVersion(1.2.3.4)

$Revision: 144 $

  1. Don't reinvent the wheel, don't store existing (in repo) data in one more additional independent location even inside repo
  2. You have to have this data only for use with sources outside the repo , thus - getting and storing rev-info is a task for your build|deploy tool
  3. You can get GlobalRevision at any time with at least two slightly different ways:
    • Pure Subversion with svnversion call
    • If you have TSVN (according to tagging), you have SubWCRev , which you can use for complex processing of data, than "plain numbers" in svnversion,if you want it

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