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

Re: Can you set properties on a file without having it checked out?

From: Scott Simpson <Scott.Simpson_at_computer.org>
Date: 2005-05-12 18:51:46 CEST

Ben Collins-Sussman wrote:

>
> I'm not really understanding what you're trying to do.

What I'm trying to do is attach "metadata" to files. That is, I want to
attach a bug system number to a set of files so I can look up all the
files and changes that occurred via a bug fix number. This is my "change
request".

>
> I see two very simple options:
>
> * write a pre-commit hook that rejects a commit that doesn't have
> the metadata you expect. This forces users to remember to add the
> metadata themselves.
>
> * attached the metadata as an *unversioned* property on the
> revision itself. The book doesn't talk about this, but you can
> easily have a post-commit hook attach an extra unversioned property
> to the revision after the fact.

I don't care about rejecting any commits. I never do that.

This "unversioned" property interests me greatly and may be exactly what
I need. How would I set this on the server side in a post-commit hook?
You say it is undocumented. Go to the source, Luke?

Another way I thought about solving this was having the post-commit hook
actually write a separate database from CVS with the bug number and
revision in a separate database. (I look up the CR number if there is
one in the log message). For example, I could store key/value pairs like

CR50 "3 7 15"

saying Change Request 50 is solved by revisions 3, 7, and 15. I could
then have another server daemon that answers requests such as "What are
all the revisions related to CR50?". On the client side, I could have a
Perl script query the "Change Request Revision Server" and print out all
the changes related to that Change Request. Perl has a persistance
module and threads so this server wouldn't be that difficult to write.

Anyways, two avenues. Don't know too much about the first. Would
appreciate any enlightenment.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Thu May 12 19:37:54 2005

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