You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by David Weintraub <qa...@gmail.com> on 2005/06/20 16:04:29 UTC

Revision Properties Question

We have a requirement that any change in Subversion should require a
revision property called "bugnum" that contains the bug number (or
numbers) of the bugs that were fixed with this revision.

I would like to enforce this in a hook. Is there a way I can via the
pre-commit hook to see whether a revision property was actually set?

--
David Weintraub
qazwart@gmail.com

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


Fwd: Revision Properties Question

Posted by David Weintraub <qa...@gmail.com>.
---------- Forwarded message ----------
From: David Weintraub <qa...@gmail.com>
Date: Jun 20, 2005 3:48 PM
Subject: Re: Revision Properties Question
To: Mark Phippard <Ma...@softlanding.com>


> David Weintraub <qa...@gmail.com> wrote on 06/20/2005 12:04:29 PM:
>
> > We have a requirement that any change in Subversion should require a
> > revision property called "bugnum" that contains the bug number (or
> > numbers) of the bugs that were fixed with this revision.
> >
> > I would like to enforce this in a hook. Is there a way I can via the
> > pre-commit hook to see whether a revision property was actually set?

On 6/20/05, Mark Phippard <Ma...@softlanding.com> wrote:
> It isn't possible to set a custom revision property as part of a commit,
> so it definitely isn't possible to enforce it with a hook.  Revision
> properties can only be set after the commit.  That is why we chose to just
> use the log message in the issue tracking integration we designed for GUI
> clients, and is implemented by TortoiseSVN and Subclipse.
>
> http://svn.collab.net/repos/tortoisesvn/trunk/doc/issuetrackers.txt
>

I first found out that I had to upgrade to Subversion 1.2 to get the
svnlook propget command to look at revision properties (Subversion
1.1.3 didn't work).

Now, I can use svnlook to see if a revision property is actually set
on a commit transaction, but as you pointed out, there's no way to set
a revision property.

So, is this considered a bug? I hate the fact Subversion keeps
overloading the log with all sorts of information. I guess it doesn't
really matter anyway since there is no easy way to search a revision
property for a particular value.

--
David Weintraub
qazwart@gmail.com


-- 
--
David Weintraub
qazwart@gmail.com

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


Re: Revision Properties Question

Posted by David Weintraub <qa...@gmail.com>.
On 6/21/05, Ben Collins-Sussman <su...@collab.net> wrote:
> That said, a pre-commit hook *could* still check a revision property:
> 
>   $ svnlook propget -t txn --revprop /path/to/repos propname /path/
> to/file
> 
> ... if, say the commit came in via some other way other than via svn
> client.

Actually, my hook can currently do just that. I spent about three
hours modifying it and testing it. And, right before I decided to make
it live, I ran through a complete testing scenero where I would set
the revprop "bugnum", or have my commit rejected.

The hook worked just as it was suppose to. The problem I had was
getting Subversion to let me actually set the revision property.

Apparently, this is an oversite. If I want to, I can write my own
program and do it through the Subversion bindings. I might actually do
that too.

--
David Weintraub
qazwart@gmail.com

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


Re: Revision Properties Question

Posted by Ben Collins-Sussman <su...@collab.net>.
On Jun 20, 2005, at 1:49 PM, kfogel@collab.net wrote:

> Mark Phippard <Ma...@softlanding.com> writes:
>
>> I meant for a user using the command line or other client which  
>> was the
>> foundation of David's question.  David wanted to validate that  
>> they had
>> set a revision property as part of their commit.  I was pointing  
>> out that
>> would be impossible -- which it is.
>>
>> http://subversion.tigris.org/issues/show_bug.cgi?id=1976
>>
>
> Gotcha, thanks.
>

That said, a pre-commit hook *could* still check a revision property:

   $ svnlook propget -t txn --revprop /path/to/repos propname /path/ 
to/file

... if, say the commit came in via some other way other than via svn  
client.


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

Re: Revision Properties Question

Posted by kf...@collab.net.
Mark Phippard <Ma...@softlanding.com> writes:
> I meant for a user using the command line or other client which was the 
> foundation of David's question.  David wanted to validate that they had 
> set a revision property as part of their commit.  I was pointing out that 
> would be impossible -- which it is.
> 
> http://subversion.tigris.org/issues/show_bug.cgi?id=1976

Gotcha, thanks.

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

Re: Revision Properties Question

Posted by Mark Phippard <Ma...@softlanding.com>.
kfogel@newton.ch.collab.net wrote on 06/20/2005 02:26:02 PM:

> Mark Phippard <Ma...@softlanding.com> writes:
> > > I would like to enforce this in a hook. Is there a way I can via the
> > > pre-commit hook to see whether a revision property was actually set?
> > 
> > It isn't possible to set a custom revision property as part of a 
commit, 
> > so it definitely isn't possible to enforce it with a hook. 
> 
> Why is this impossible?  You can just set the revision property on the
> txn (pre-commit hook receives the txn name), and then the property
> will get automatically preserved when the txn turns into a revision.

I meant for a user using the command line or other client which was the 
foundation of David's question.  David wanted to validate that they had 
set a revision property as part of their commit.  I was pointing out that 
would be impossible -- which it is.

http://subversion.tigris.org/issues/show_bug.cgi?id=1976

Mark






_____________________________________________________________________________
Scanned for SoftLanding Systems, Inc. by IBM Email Security Management Services powered by MessageLabs. 
_____________________________________________________________________________

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

Re: Revision Properties Question

Posted by kf...@collab.net.
Mark Phippard <Ma...@softlanding.com> writes:
> > I would like to enforce this in a hook. Is there a way I can via the
> > pre-commit hook to see whether a revision property was actually set?
> 
> It isn't possible to set a custom revision property as part of a commit, 
> so it definitely isn't possible to enforce it with a hook.  

Why is this impossible?  You can just set the revision property on the
txn (pre-commit hook receives the txn name), and then the property
will get automatically preserved when the txn turns into a revision.

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

Re: Revision Properties Question

Posted by Mark Phippard <Ma...@softlanding.com>.
David Weintraub <qa...@gmail.com> wrote on 06/20/2005 12:04:29 PM:

> We have a requirement that any change in Subversion should require a
> revision property called "bugnum" that contains the bug number (or
> numbers) of the bugs that were fixed with this revision.
> 
> I would like to enforce this in a hook. Is there a way I can via the
> pre-commit hook to see whether a revision property was actually set?

It isn't possible to set a custom revision property as part of a commit, 
so it definitely isn't possible to enforce it with a hook.  Revision 
properties can only be set after the commit.  That is why we chose to just 
use the log message in the issue tracking integration we designed for GUI 
clients, and is implemented by TortoiseSVN and Subclipse.

http://svn.collab.net/repos/tortoisesvn/trunk/doc/issuetrackers.txt

Mark

_____________________________________________________________________________
Scanned for SoftLanding Systems, Inc. by IBM Email Security Management Services powered by MessageLabs. 
_____________________________________________________________________________

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