[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

RE: Setting up the Configuration File

From: Weintraub, David <David.Weintraub_at_ilex.com>
Date: 2005-03-31 23:51:22 CEST

I've got the same problem with the post-commit as with the pre-commit: The
script runs on the server, but the working directory is on the client.

Since "svn propset" doesn't take an URL (only a path to the working version
of the file), I would need to create a working directory, checkout the file
myself, create the property, then commit the transaction.

It appears that none of my options look too good:

1). Write a wrapper script for the "svn add" that will create the
svn:keywords property. This means creating a script that works with all the
various client and passing it around to all the client machines. It also
means that users of programs like TortoiseSVN will have to pull up a command
shell to run my script.

2). Actually create a working directory, do a "svn checkout", svn propset",
and "svn commit" on the server. It is possible in theory, but the
implementation would be clumsy and add quite a bit of time for the commit
transaction. I could run this as a post-commit script, but this script would
certainly take a lot of time to run and a lot of processing power.

3). Reject the commit and tell the user how to create the property

For now, the best choice is #3.

-----Original Message-----
From: Robert Mohr [mailto:mohr.42@gmail.com]
Sent: Thursday, March 31, 2005 12:47 PM
To: users@subversion.tigris.org
Subject: Re: Setting up the Configuration File

Use the post-commit hook in roughly the same capacity as your current
pre-commit, and call 'svn propset svn:keywords Id
file://localhost$path' when keywords are not set. Then call 'svn
commit -m "Automatically setting svn:keywords to 'Id'."'

This results in an extra revision whenever a file without svn:keywords
set is committed, but I don't see how else to do this.
Received on Thu Mar 31 23:54:25 2005

This is an archived mail posted to the Subversion Users mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.