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

Re: pre-commit hook log verification

From: <kfogel_at_collab.net>
Date: 2006-03-14 19:59:53 CET

"Kusar, Jason" <Jason.Kusar@ngc.com> writes:
> I am currently using a pre-commit hook to verify that a valid bugzilla
> bug number is entered into a log message before allowing a commit.
> The hook then attaches the log to the bug entry.

This isn't about your question, but: shouldn't the bug attachment take
place in the post-commit hook, not pre-commit? The pre-commit hook
doesn't know the revision number, for one thing, so it *can't* tell
the bug tracker what revision was committed. And what if the commit
gets bounced for some reason? Then the bug entry will have a log
message that was never committed.

> However, I have
> discovered that when JBuilder places a new project into Subversion, it
> does so with an empty commit message with no place to add one.
>
> Is there any way for a pre-commit hook to recognize that the commit is
> an import as opposed to an update or regular add? I'd like to just go
> ahead and allow an empty log message when the action is import. As
> far as I can tell, the only thing I could do would be to check if all
> of the changed files are additions, but unfortunately, this would also
> be true if the only change was a single added file or directory, so
> that doesn't really work.

There is no difference between importing and adding a directory tree
in Subversion, so I don't think what you want can be done reliably.

-Karl

-- 
www.collab.net  <>  CollabNet  |  Distributed Development On Demand
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Tue Mar 14 21:49:29 2006

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.