You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Kristis Makris <kr...@asu.edu> on 2004/07/13 22:05:31 UTC

Question on Subversion hooks

Hello,

I'm trying to add Subversion support to Scmbug, an SCM to Bugtracking
integration system (http://www.public.asu.edu/~makrists/scmbug/). I'm
trying to figure out how subversion hooks work. I'm going over the
documentation on hooks
(http://svnbook.red-bean.com/svnbook/ch05s02.html) and I am having a
hard time determining if hooks can be installed externally (i.e. without
local access to the repository storage location). Is it possible to
checkout a repository and "check-in" a hook script ?

Another question I have is how can I get a list of files that are about
to be commited using the hook scripts ? I didn't see in the hook
template files documentation on additional arguments that may provide
those. Should I be calling 'svn status' and 'svn info' to manually
collect all this information ?

Any feedback on what's the designated method of installing hooks is
welcome.

Thanks,
Kristis


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

Re: Question on Subversion hooks

Posted by Kristis Makris <kr...@asu.edu>.
> > Another question I have is how can I get a list of files that are about
> > to be commited using the hook scripts ? 
> 
> You use a tool like 'svnlook' to examine the pending commit
> transaction.  'svn status' and 'svn info' only operate on working
> copies, while 'svnlook' operates directly on a repository, and was
> written almost expressly for the purpose of being called by hook
> scripts.

Is there a possibility that "svnlook changed" might output something
like:

A  +  somefile.txt

rather than simply

A     somefile.txt

?? I just noticed in http://svnbook.red-bean.com/svnbook/ch04s04.html
that "svn status" might output that. I want to make sure I'm parsing the
output of "svnlook changed" correctly for integration with bug-tracking.




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

Re: Question on Subversion hooks

Posted by Ben Collins-Sussman <su...@collab.net>.
On Tue, 2004-07-13 at 17:05, Kristis Makris wrote:
> Hello,
> 
> I'm trying to add Subversion support to Scmbug, an SCM to Bugtracking
> integration system (http://www.public.asu.edu/~makrists/scmbug/). I'm
> trying to figure out how subversion hooks work. I'm going over the
> documentation on hooks
> (http://svnbook.red-bean.com/svnbook/ch05s02.html) and I am having a
> hard time determining if hooks can be installed externally (i.e. without
> local access to the repository storage location). Is it possible to
> checkout a repository and "check-in" a hook script ?

Nope, there's no analogue of CVSROOT.  The hook scripts live in the
repos/hooks/ directory.  You need direct access to the repository.

That said, you *could* make that directory into a working copy, and
create a post-commit hook that auto-updates that working copy.  :-)

> 
> Another question I have is how can I get a list of files that are about
> to be commited using the hook scripts ? 

You use a tool like 'svnlook' to examine the pending commit
transaction.  'svn status' and 'svn info' only operate on working
copies, while 'svnlook' operates directly on a repository, and was
written almost expressly for the purpose of being called by hook
scripts.



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