You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by Kevin Wu <ke...@gmail.com> on 2010/06/23 04:55:37 UTC

How to find who commits the build and revision number?

Hi folks,

I am using Hudson + Subversion to automate the build process.

Everybody triggers the hudson build process is "anonymous". And I don't want
to add extra authentication to Hudson.

So I want to know if it is possible to get information from Subversion about
who commits the change to the svn repository, and the revision number of
that commit.

THANKS IN ADVANCE.

-- 
Best wishes,
Kevin Wu

Re: How to find who commits the build and revision number?

Posted by Daniel Becroft <dj...@gmail.com>.
On Thu, Jun 24, 2010 at 1:36 PM, David Weintraub <qa...@gmail.com> wrote:
> On each and every Hudson build webpage is the Subversion repository
> revision number. You can use that and "svn log" to see who did the
> commit that triggered that build.

Hudson also grabs the log information for the revisions on each
update, and displays these under the "Recent Changes" link on the
project page, or the "Changes" page for each build.

Cheers,
Daniel B.

> On Wed, Jun 23, 2010 at 12:55 AM, Kevin Wu <ke...@gmail.com> wrote:
>> Hi folks,
>>
>> I am using Hudson + Subversion to automate the build process.
>>
>> Everybody triggers the hudson build process is "anonymous". And I don't want
>> to add extra authentication to Hudson.
>>
>> So I want to know if it is possible to get information from Subversion about
>> who commits the change to the svn repository, and the revision number of
>> that commit.
>>
>> THANKS IN ADVANCE.
>>
>> --
>> Best wishes,
>> Kevin Wu
>>
>
>
>
> --
> David Weintraub
> qazwart@gmail.com
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@hudson.dev.java.net
> For additional commands, e-mail: users-help@hudson.dev.java.net
>
>

Re: How to find who commits the build and revision number?

Posted by Ryan Schmidt <su...@ryandesign.com>.
On Jun 24, 2010, at 06:01, green@corona-bytes.net wrote:

> You should look into the svn:keyword property
> 
> http://svnbook.red-bean.com/en/1.4/svn.advanced.props.special.keywords.html

It's called "svn:keywords" (not "svn:keyword"), and if we refer people to the Book, we should refer them to the most recent version, not an old version. Here is the same page in the 1.5 book:

http://svnbook.red-bean.com/en/1.5/svn.advanced.props.special.keywords.html

And the in-progress nightly version:

http://svnbook.red-bean.com/nightly/en/svn.advanced.props.special.keywords.html

Re: Re: How to find who commits the build and revision number?

Posted by gr...@corona-bytes.net.
You should look into the svn:keyword property

http://svnbook.red-bean.com/en/1.4/svn.advanced.props.special.keywords.html


----- Original Message -----
From: qazwart@gmail.com
To: kevinwu.chn@gmail.com
Date: 24.06.2010 05:36:22
Subject: Re: How to find who commits the build and revision number?


> On each and every Hudson build webpage is the Subversion repository
> revision number. You can use that and "svn log" to see who did the
> commit that triggered that build.
> 
> On Wed, Jun 23, 2010 at 12:55 AM, Kevin Wu  wrote:
> > Hi folks,
> >
> > I am using Hudson + Subversion to automate the build process.
> >
> > Everybody triggers the hudson build process is "anonymous". And I don't want
> > to add extra authentication to Hudson.
> >
> > So I want to know if it is possible to get information from Subversion about
> > who commits the change to the svn repository, and the revision number of
> > that commit.
> >
> > THANKS IN ADVANCE.
> >
> > --
> > Best wishes,
> > Kevin Wu
> >
> 
> 
> 
> -- 
> David Weintraub
> qazwart@gmail.com
> 




Re: Re: How to find who commits the build and revision number?

Posted by gr...@corona-bytes.net.
You should look into the svn:keyword property

http://svnbook.red-bean.com/en/1.4/svn.advanced.props.special.keywords.html


----- Original Message -----
From: qazwart@gmail.com
To: kevinwu.chn@gmail.com
Date: 24.06.2010 05:36:22
Subject: Re: How to find who commits the build and revision number?


> On each and every Hudson build webpage is the Subversion repository
> revision number. You can use that and "svn log" to see who did the
> commit that triggered that build.
> 
> On Wed, Jun 23, 2010 at 12:55 AM, Kevin Wu  wrote:
> > Hi folks,
> >
> > I am using Hudson + Subversion to automate the build process.
> >
> > Everybody triggers the hudson build process is "anonymous". And I don't want
> > to add extra authentication to Hudson.
> >
> > So I want to know if it is possible to get information from Subversion about
> > who commits the change to the svn repository, and the revision number of
> > that commit.
> >
> > THANKS IN ADVANCE.
> >
> > --
> > Best wishes,
> > Kevin Wu
> >
> 
> 
> 
> -- 
> David Weintraub
> qazwart@gmail.com
> 





Re: How to find who commits the build and revision number?

Posted by David Weintraub <qa...@gmail.com>.
On each and every Hudson build webpage is the Subversion repository
revision number. You can use that and "svn log" to see who did the
commit that triggered that build.

On Wed, Jun 23, 2010 at 12:55 AM, Kevin Wu <ke...@gmail.com> wrote:
> Hi folks,
>
> I am using Hudson + Subversion to automate the build process.
>
> Everybody triggers the hudson build process is "anonymous". And I don't want
> to add extra authentication to Hudson.
>
> So I want to know if it is possible to get information from Subversion about
> who commits the change to the svn repository, and the revision number of
> that commit.
>
> THANKS IN ADVANCE.
>
> --
> Best wishes,
> Kevin Wu
>



-- 
David Weintraub
qazwart@gmail.com

Re: How to find who commits the build and revision number?

Posted by Kevin Wu <ke...@gmail.com>.
I used a dumb method:

sudo su hudson

and interactively got and confirmed the certificate for Hudson server.

On Fri, Jun 25, 2010 at 11:41 AM, Kevin Wu <ke...@gmail.com> wrote:

> I get the following message when executing svn propget:
>
> Error validating server certificate for 'trunk'(or URL,making no difference):
>  - The certificate is not issued by a trusted authority. Use the
>    fingerprint to validate the certificate manually!
>
>  - The certificate hostname does not match.
>  - The certificate has expired.
>
> Certificate information:
>  - Hostname: Somebody
>  - Valid: from Tue, 19 Feb 2008 15:21:30 GMT until Wed, 18 Feb 2009 15:21:30 GMT
>
>  - Issuer: svn, Company, City, Province, Country
>  - Fingerprint: fd:17:4a:5a:78:55:a3:f4:ef:1c:cc:49:fd:18:a7:9b:3a:e4:43:32
> (R)eject, accept (t)emporarily or accept (p)ermanently? svn: OPTIONS of 'trunk': Server certificate verification failed: certificate has expired, certificate issued for a different hostname, issuer is not trusted (url)
>
> And it let me enter username and password.
> But in Hudson shell script, such interaction is not desirable. How to
> update the certificate and make it permanent?
>
> BTW, the subversion server is not maintained by me, so I need to know the
> problem and let the people concerned handle it.
>
> THANKS~
>
>
>
> On Fri, Jun 25, 2010 at 12:59 AM, David Weintraub <qa...@gmail.com>wrote:
>
>> On Thu, Jun 24, 2010 at 12:53 PM, Kevin Wu <ke...@gmail.com> wrote:
>> > I was thinking of using the svn:author property.
>> >
>> > Is this feasible from the Hudson shell script?
>> >
>> > for example,
>> >
>> > svn propget svn:author [working copy path] --revprop -r$SVN_REVISIOIN
>>
>> Exactly!
>>
>> If you're going to use a shell script, it'll look something like this:
>>
>> $user=$(svn propget svn:author http://subversion/repo/path --revprop
>> -r$SVN_REVISIION)
>> touch <archive_dir>/Committed_User_-_$user
>>
>> Now, you just set your Hudson job to archive all of the files in
>> <archive_dir>. Then, a user looking at Hudson should be able to see
>> the name of the user who did the commit. BTW, if you use the
>> repository URL instead of the working directory, you won't have to
>> worry about the location of the working directory.
>>
>> --
>> David Weintraub
>> qazwart@gmail.com
>>
>
>
>
> --
> Best wishes,
> Kevin Wu
>



-- 
Best wishes,
Kevin Wu

Re: How to find who commits the build and revision number?

Posted by Kevin Wu <ke...@gmail.com>.
I get the following message when executing svn propget:

Error validating server certificate for 'trunk'(or URL,making no difference):
 - The certificate is not issued by a trusted authority. Use the
   fingerprint to validate the certificate manually!
 - The certificate hostname does not match.
 - The certificate has expired.

Certificate information:
 - Hostname: Somebody
 - Valid: from Tue, 19 Feb 2008 15:21:30 GMT until Wed, 18 Feb 2009 15:21:30 GMT
 - Issuer: svn, Company, City, Province, Country
 - Fingerprint: fd:17:4a:5a:78:55:a3:f4:ef:1c:cc:49:fd:18:a7:9b:3a:e4:43:32
(R)eject, accept (t)emporarily or accept (p)ermanently? svn: OPTIONS
of 'trunk': Server certificate verification failed: certificate has
expired, certificate issued for a different hostname, issuer is not
trusted (url)

And it let me enter username and password.
But in Hudson shell script, such interaction is not desirable. How to update
the certificate and make it permanent?

BTW, the subversion server is not maintained by me, so I need to know the
problem and let the people concerned handle it.

THANKS~


On Fri, Jun 25, 2010 at 12:59 AM, David Weintraub <qa...@gmail.com> wrote:

> On Thu, Jun 24, 2010 at 12:53 PM, Kevin Wu <ke...@gmail.com> wrote:
> > I was thinking of using the svn:author property.
> >
> > Is this feasible from the Hudson shell script?
> >
> > for example,
> >
> > svn propget svn:author [working copy path] --revprop -r$SVN_REVISIOIN
>
> Exactly!
>
> If you're going to use a shell script, it'll look something like this:
>
> $user=$(svn propget svn:author http://subversion/repo/path --revprop
> -r$SVN_REVISIION)
> touch <archive_dir>/Committed_User_-_$user
>
> Now, you just set your Hudson job to archive all of the files in
> <archive_dir>. Then, a user looking at Hudson should be able to see
> the name of the user who did the commit. BTW, if you use the
> repository URL instead of the working directory, you won't have to
> worry about the location of the working directory.
>
> --
> David Weintraub
> qazwart@gmail.com
>



-- 
Best wishes,
Kevin Wu

Re: How to find who commits the build and revision number?

Posted by David Weintraub <qa...@gmail.com>.
On Thu, Jun 24, 2010 at 12:53 PM, Kevin Wu <ke...@gmail.com> wrote:
> I was thinking of using the svn:author property.
>
> Is this feasible from the Hudson shell script?
>
> for example,
>
> svn propget svn:author [working copy path] --revprop -r$SVN_REVISIOIN

Exactly!

If you're going to use a shell script, it'll look something like this:

$user=$(svn propget svn:author http://subversion/repo/path --revprop
-r$SVN_REVISIION)
touch <archive_dir>/Committed_User_-_$user

Now, you just set your Hudson job to archive all of the files in
<archive_dir>. Then, a user looking at Hudson should be able to see
the name of the user who did the commit. BTW, if you use the
repository URL instead of the working directory, you won't have to
worry about the location of the working directory.

-- 
David Weintraub
qazwart@gmail.com

Re: How to find who commits the build and revision number?

Posted by Kevin Wu <ke...@gmail.com>.
I was thinking of using the svn:author property.

Is this feasible from the Hudson shell script?

for example,

svn propget svn:author [working copy path] --revprop -r$SVN_REVISIOIN


On Fri, Jun 25, 2010 at 12:45 AM, David Weintraub <qa...@gmail.com> wrote:

> I think I misunderstood your earlier question.
>
> You want to display the user who committed the code on the webpage for
> that particular build?
>
> Hudson currently doesn't do that. However, Hudson must know the name
> of the user who did the commit because Hudson will send that person an
> email when they break the build.
>
> -------------
>
> I can think of a way around the issue. Hudson does retrieve the
> SVN_REVISION environment variable. You can use this in your Ant script
> to create a file via the <touch> task that contains the user name who
> committed the change. This could be placed in a particular directory.
> In Hudson job, you tell Hudson to archive any files in that directory.
>
> The result is that the name of one of your archive files will contain
> the name of the user who did the commit.
>
>
> --
> David Weintraub
> qazwart@gmail.com
>



-- 
Best wishes,
Kevin Wu

Re: How to find who commits the build and revision number?

Posted by David Weintraub <qa...@gmail.com>.
I think I misunderstood your earlier question.

You want to display the user who committed the code on the webpage for
that particular build?

Hudson currently doesn't do that. However, Hudson must know the name
of the user who did the commit because Hudson will send that person an
email when they break the build.

-------------

I can think of a way around the issue. Hudson does retrieve the
SVN_REVISION environment variable. You can use this in your Ant script
to create a file via the <touch> task that contains the user name who
committed the change. This could be placed in a particular directory.
In Hudson job, you tell Hudson to archive any files in that directory.

The result is that the name of one of your archive files will contain
the name of the user who did the commit.


-- 
David Weintraub
qazwart@gmail.com

Re: How to find who commits the build and revision number?

Posted by Kevin Wu <ke...@gmail.com>.
I understand revision number can be retreived by using the variable
SVN_REVISION  provided by Hudson.

But how to let Hudson know who commits the code?

On Wed, Jun 23, 2010 at 12:55 PM, Kevin Wu <ke...@gmail.com> wrote:

> Hi folks,
>
> I am using Hudson + Subversion to automate the build process.
>
> Everybody triggers the hudson build process is "anonymous". And I don't
> want to add extra authentication to Hudson.
>
> So I want to know if it is possible to get information from Subversion
> about who commits the change to the svn repository, and the revision number
> of that commit.
>
> THANKS IN ADVANCE.
>
> --
> Best wishes,
> Kevin Wu
>



-- 
Best wishes,
Kevin Wu