How to use keywords in SVN (TortoiseSVN)

后端 未结 4 1868
一个人的身影
一个人的身影 2021-02-08 17:44

I can\'t do a document with the Keyword Substitution tool to have only a few data as: -Date -Revision -Author -HeadURL -Id

I\'m doing a test but I can\'t implement the K

4条回答
  •  [愿得一人]
    2021-02-08 18:10

    You've done half of what you need. Now you need to use svn propset to do the rest of it, as it shows in the documentation, about halfway down the page:

    You've done this part:

    For example, say you have a versioned file named weather.txt that looks like this:

    Here is the latest report from the front lines.
    $LastChangedDate$
    $Rev$
    Cumulus clouds are appearing more frequently as summer approaches.
    

    Now you need to do the other half of it:

    With no svn:keywords property set on that file, Subversion will do nothing special. Now, let's enable substitution of the LastChangedDate keyword.

    $ svn propset svn:keywords "Date Author" weather.txt
    property 'svn:keywords' set on 'weather.txt'
    $
    

    The easiest way to set these properties using TortoiseSVN is to right-click the file, choose TortoiseSVN->Properties from the pop-up menu, and then configure the properties there. You can find this info in the Project Settings page of the TortoiseSVN documentation; see SVN keywords roughly 2/3 of the way down the page. (There's no anchor provided, but you can search the page once you get there.)

提交回复
热议问题