开发者

Svn revision number to a text file

I want to display svn revision number to a text file I am getting the revision number using this command $revision = ([xml](svn info "fil开发者_运维问答epath" --xml)).info.entry.commit.revision


Assuming that you will read the value from c# and can throw out the prefix:

svn info somefile.txt | find "Revision" > revision.txt


If the text file is under source control you might find it easier to investigate svn:keywords. The SVN book will tell you how to use them.

If the text file is not under source control, could you be more explicit about what you are trying to do.


The easiest way is to use the svnversion program that comes with Subversion.

As the documentation says,

It's common to use this output in your build process when defining the version number of your program.

svnversion -c gives you the latest committed version.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜