Kevin Grover wrote:
> On 8/11/07, blewis999 <robert.lewis@shaw.ca> wrote:
>> Andy Levy wrote:
>>> On 8/10/07, blewis999 <robert.lewis@shaw.ca> wrote:
>>>> Robert Roessler wrote:
>>>>> blewis999 wrote:
>>>>>> I am new to Tortoise SVN and used to use Tortoise CVS although I had a
>>>>>> very minimal grasp of that system. I used to be able to have Tortoise
>>>>>> CVS update the following into the files if there were certain
>>>>>> delimiters in the code. Is there a way to do this in SVN. I have
>>>>>> looked through the documentation but can't see the entries.
>>>>>>
>>>>>> This really is an awesome program; it has saved me many times.
>>>>>>
>>>>>> $Author: Copyright iMn MicroControl Ltd. - Robert Lewis$
>>>>>> $Revision: 1.23 $
>>>>>> $Date: 2007/06/20 03:11:52 $
>>>>>> $Source:
>>>>>> G:/cvsrepo-may-30-2005/FreescaleDemo/Common/lcdDispFcns.c,v $
>>>>> Sure, check out Chapter 3 of the SVN book: "Keyword Substitution".
>>>>>
>>>>> Robert Roessler
>>>>> robertr@rftp.com
>>>>> http://www.rftp.com
>>>> Thank you; I found this but it seems that there is another program to
>>>> run from a command line called SubWCRev.exe
>>>>
>>>> This would be a lot of work for me as there are dozens of files in the
>>>> build. Is there anyway to get SVN to do this automatically for each
>>>> file when they are committed? It would be very problematic for me to
>>>> try and create multiple versions of the file (source and destination)
>>>> for all the changed files and get it right. Plus it would mess up the
>>>> build system because I would have to have different names and change
>>>> them in the build each time.
>>> Keyword expansion is done by the client upon checkout/update, not when
>>> committing.
>>>
>>> You can set properties on files automatically when they're added via
>>> auto-props, but that doesn't help with files already in the
>>> repository. You can run svn_apply_autoprops.py to apply the auto-props
>>> you have in your config file to a working copy, however, to get caught
>>> up. Or, you can just find all the files that need a particular set of
>>> properties, then right-click and choose TSVN->Properties and set the
>>> properties on all those files at once.
>> Thank you; but I can't get this to work. I have the following in a
>> header in the file
>> /*============================================================================================================
>> $RCSfile: TimeFcns.c,v $
>>
>> $Author: Copyright iMn MicroControl Ltd. - Robert Lewis$
>> Revision = "$WCREV$"
>> Modified = "$WCMODS?Modified:Not modified$"
>> Date = "$WCDATE$"
>> RevRange = "$WCRANGE$"
>> Mixed = "$WCMIXED?Mixed revision WC:Not mixed$"
>> URL = "$WCURL$"
>> $ID$
>>
>> =============================================================================================================*/
>> I did the following:
>> 1) committed a change to the file
>> 2) did an update, nothing changed in the header
>> 3) created a new directory, and checked out the code, and nothing
>> change in the header
>> 4) selected the file with svn properties and added a file with the
>> above contents in the add dialog, committed the file, then updated.
>> Still nothing.
>> 5) deleted the file, checked it out and still nothing
>>
>> I can't get the keyword substitution to work, although that is exactly
>> what seems to be the solution.
>>
>> What used to happen with CVS is that on every checkout the revision
>> number and all the other parameters was changed. This allowed us to
>> know what code was actually in the final build.
>>
>> So any method is fine, if someone could give a working example or
>> explanation it would be greatly appreciated. Thank you for all the
>> suggestions.
>>
>
> This is covered quite well in the manual. Have you really read it?
>
> http://svnbook.red-bean.com/nightly/en/svn.advanced.props.special.keywords.html
>
>
> In CVS all Keywords substitutions are automatic unless you explicitly
> tell CVS that the file is binary (-kb).
>
> In SVN _no_ keyword substitution occurs unless you explicitly ask for
> it by keyword (per file).
>
> You ask for it by setting the 'svn:keywords' property (listing which
> keywords to substitute) for _every_ file for which substitution should
> occur
>
> For example,
> if you have
> main.c svn:keywords = Id
> main.h svn:keywords = Date
> readme.txt (no svn:keywords)
>
> Then, you'll get Id tags (ONLY) in main.c, Date dates (ONLY) in
> main.h, and nothing in readme.txt.
>
> Set set the properties in TSVN, you can right-click on files you want
> keywords in, choose 'Properties', pick the Subversion tab, select
> 'Properties' and then set the svn:keywords property.
>
> If you want the svn:keywords property to be by default, you can edit
> the 'config'. NOTE: That this is a per-user setting.
> (%APPDATA%\Subversion\config). Also NOTE: This file is used by the
> Subversion _library_ and thus will be used be any Subversion client
> you're using (RapidSVN, Subcommander, or the CLI). This file can be
> used to set properties (any you want) for files (using wildcards) and
> only affects new files added after the changes to the config are made.
>
> To really understand this, read the manual.
>
> - Kevin
This is a good explanation. I must was reading the manual chapter 6.2,
and 6.3, under TortoiseSVN help in the hellp file that comes with the
program. The manual I was reading is much different then the manual
you have linked to. I will give it a try; thank you.
Robert
Robert
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tortoisesvn.tigris.org
For additional commands, e-mail: users-help@tortoisesvn.tigris.org
Received on Sun Aug 12 04:42:02 2007