English 中文(简体)
Is there a way to specify $GlobalRev$ in a file using Subclipse for Eclipse
原标题:

I know how to get the local version number into a file with Eclipse. Right click, Team, set property then svn:keywords Id.

But how do you get the $GlobalRev$ to appear? There s something called svnversion which is supposed to do this but is it integrated into Subclipse?

问题回答

Subversion does not support the concept of a $GlobalRev$ keyword. There is a command line tool called svnversion that will output revisions to stdout. You can combine that with a script to write this to a file. This is asked about all the time, so there is a FAQ:

http://subversion.tigris.org/faq.html#version-value-in-source

If you are on Windows, there is also a command line program available called SubWCRev.exe that is similar to svnversion but will do substitution in a file for you. Note that you cannot use this on a versioned file, you need the combine it with a template file of some kind. See:

http://tortoisesvn.net/docs/release/TortoiseSVN_en/tsvn-subwcrev.html

Either of these could be run from Eclipse by setting up an External Tool command for it.





相关问题
Best practices for Subversion and Visual Studio projects

I ve recently started working on various C# projects in Visual Studio as part of a plan for a large scale system that will be used to replace our current system that s built from a cobbling-together ...

Changing username in SVN+SSH URI on the fly in working copy

I am using SVN+SSH to check out a working copy of repository from an SVN server on which all developers are members of a developer group and have full read/write permissions on the repository ...

ASP.NET MVC: How should it work with subversion?

So, I have an asp.net mvc app that is being worked on by multiple developers in differing capacities. This is our first time working on a mvc app and my first time working with .NET. Our app does not ...

How to search for file in subversion server?

Is there a way to search for a file in a subversion repository? Something similar to Unix find command, with which I can find the location of a file in a repository. I know there is svn list, but ...

热门标签