You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by Chris McKay <ch...@defacto.com.au> on 2004/07/21 01:34:04 UTC

Config auto-props and svn:keywords on w2k server

Hi,

I'm having major problems getting the auto-props config to work on
Subversion running on a w2k server. I'm just trying to get the $Id$
keyword to be substituted for all *.txt files in SVN.

Does this actually work on w2k, has anyone got it going? If so then
could you look over my attempts or is there some debug flag I can turn
on to find out what is going on.

I have svn installed and working with Apache2. All imports, adds,
commits and updates etc work fine from the svn CLI client and
TortoiseSVN.

C:\TEMP\develop\trunk>svn --version
svn, version 1.0.5 (r9954)
   compiled Jun 11 2004, 09:44:29

So far I have done the following:
1. Initially there were no files in C:\Documents and Settings\All
Users\Application Data\Subversion (a clue?) I copied the directory from
C:\Documents and Settings\Administrator\Application Data\Subversion

I modded the config file to enable:
### Section for configuring miscelleneous Subversion options.
[miscellany]
enable-auto-props = yes

### Section for configuring automatic properties.
[auto-props]
*.txt = svn:eol-style=native;svn:keywords=Id

Restarted Apache for kicks. Then from TortoiseSVN added a file with $Id$
as the first line. Committed and Updated but the $Id$ was unchanged.

2. Copied the config file back to C:\Documents and
Settings\Administrator\Application Data\Subversion and tried again.

3. Started up regedit and created key for Config in
HKLM/SOFTWARE/Tigris.org/Subversion
Add keys for auto-props and miscellany
In miscellany add String Value Name for enable-auto-props  and Data of
yes
In auto-props add String Value Name for *.txt  and Data of
svn:keywords=Id

Try again. Everything fails.


Just for a sanity check I did the following on the server itself:

C:\TEMP\develop\trunk>svn propset svn:keywords "Id" test5.txt 
property 'svn:keywords' set on 'test5.txt'

C:\TEMP\develop\trunk>svn commit -m "sub please" test5.txt
Sending        test5.txt

Committed revision 12.

C:\TEMP\develop\trunk>svn update
At revision 12.

C:\TEMP\develop\trunk>type test5.txt
$Id: test5.txt 12 2004-07-20 23:11:01Z cmckay $

So that works...

Anyone with ideas?



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

Re: Config auto-props and svn:keywords on w2k server

Posted by Michael W Thelen <th...@cs.utah.edu>.
* Chris McKay <ch...@defacto.com.au> [2004-07-21 16:27]:
> Actually that wasn't the source of my confusion, the confusion has
> arisen in that I thought that a server side auto-props config would
> apply to adds from a remote workstation. I see this topic has been
> beaten to death by various Zope developers, For what it's worth I'm on
> their side. "Honestly:  how often do you add new source files to a
> repository?" - well when you start out on a brand new project (with a
> brand new source code control system...), you add a hell of a lot (and
> not all at once) ...

Just yesterday, I posted a Perl script to the dev list that recursively sets
properties on files/dirs in your working copy based on the auto-props section
of a configuration file.  This might be useful for you if you have imported
files without auto-props turned on, but now want to set properties as if
auto-props had been enabled.  This is a very common occurrence where I work,
since we've just switched totally over to Subversion and not everyone is
completely up to speed with their local configuration files.

I hope that the script may be accepted into the contrib section of the
Subversion project repository, but in the meantime, you can find it archived
in this message:

http://www.contactor.se/~dast/svn/archive-2004-07/0866.shtml

Right now it only runs on Linux (as far as I know), and since I just whipped
it up yesterday, there are no guarantees that it is completely bug-free, but
hopefully this will help you in your situation.  (Hmm, I just double checked
your previous message and it looks like you're running on Windows.  I will
make an effort to get it working on Windows in the next day or two.)

-- Mike

-- 
Michael W. Thelen
If there were in the world today any large number of people who desired their
own happiness more than they desired the unhappiness of others, we could have
paradise in a few years.
                -- Bertrand Russell

RE: Config auto-props and svn:keywords on w2k server

Posted by Chris McKay <ch...@defacto.com.au>.
Actually that wasn't the source of my confusion, the confusion has
arisen in that I thought that a server side auto-props config would
apply to adds from a remote workstation. I see this topic has been
beaten to death by various Zope developers, For what it's worth I'm on
their side. "Honestly:  how often do you add new source files to a
repository?" - well when you start out on a brand new project (with a
brand new source code control system...), you add a hell of a lot (and
not all at once) ...

Now what I need to do is to find out how to set auto-props for
TortoiseSVN ...

C

-----Original Message-----
From: Ben Collins-Sussman [mailto:sussman@collab.net] 
Sent: Thursday, 22 July 2004 3:54 a.m.
To: Chris McKay
Cc: users@subversion.tigris.org
Subject: Re: Config auto-props and svn:keywords on w2k server

Here's the source of your confusion:  the auto-props feature *does not*
make properties automatically appear on files when you update and
commit.  It *only* affects the behavior of the 'svn add' and 'svn
import' commands.  That's it.  So if you have a bunch of files already
under version control, enabling auto-props does nothing (or rather, it
only affects the act of *adding* new files to version control).  For
files already under version control, you'll have to 'svn propset' each
file accordingly, either manually or using a script of some sort.





---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

Re: Config auto-props and svn:keywords on w2k server

Posted by Ben Collins-Sussman <su...@collab.net>.
On Tue, 2004-07-20 at 20:34, Chris McKay wrote:

> ### Section for configuring miscelleneous Subversion options.
> [miscellany]
> enable-auto-props = yes
> 
> ### Section for configuring automatic properties.
> [auto-props]
> *.txt = svn:eol-style=native;svn:keywords=Id

This looks fine.  If you do this, there's no need to set stuff in the
registry.  The two methods are redundant.

Here's the source of your confusion:  the auto-props feature *does not*
make properties automatically appear on files when you update and
commit.  It *only* affects the behavior of the 'svn add' and 'svn
import' commands.  That's it.  So if you have a bunch of files already
under version control, enabling auto-props does nothing (or rather, it
only affects the act of *adding* new files to version control).  For
files already under version control, you'll have to 'svn propset' each
file accordingly, either manually or using a script of some sort.



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org