You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by Rishabh Verma <ri...@gmail.com> on 2009/07/05 17:41:40 UTC

Help on SVN

Hi Stefan,

Greetings !

First of all many congratulations for creating such a wonderful product.We
are trying to automate the svn logs based on Bug Id.As part of this
requirement we want that we get the list of all the files modified against
the particular Bug Id.We are using svn command line client.Once we have the
list we will want to have all those files checked out in a new folder.

I will greatly appreciate if you can help me on this.

Thanks and warm regards,

Rishabh Verma,

Software Engineer

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=2368164

To unsubscribe from this discussion, e-mail: [users-unsubscribe@subversion.tigris.org].

Re: Help on SVN

Posted by Ryan Schmidt <su...@ryandesign.com>.
On Jul 5, 2009, at 12:41, Rishabh Verma wrote:

> First of all many congratulations for creating such a wonderful  
> product.We are trying to automate the svn logs based on Bug Id.As  
> part of this requirement we want that we get the list of all the  
> files modified against the particular Bug Id.We are using svn  
> command line client.Once we have the list we will want to have all  
> those files checked out in a new folder.

Well, "svn log -q -v -r REV" (where REV is a revision number) will  
tell you about each file/directory changed by that revision. Does  
that help?

Subversion has no idea what a bug ID is, so you'll have to have some  
mechanism external to Subversion for tying a list of revisions to a  
bug ID.

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=2368183

To unsubscribe from this discussion, e-mail: [users-unsubscribe@subversion.tigris.org].

Re: Help on SVN

Posted by Henrik Sundberg <st...@gmail.com>.
On Tue, Jul 7, 2009 at 6:35 AM, Rishabh Verma<ri...@gmail.com> wrote:
> I have to take the log
> and then parse through all the comments,find the revision numbers and then
> based on those revision numbers find the files/folders modified.This takes a
> lot of time.
>
> Can you suggest a better approach for large number of revisions.

Have you looked at http://www.viewvc.org/ ?

/$

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=2368801

To unsubscribe from this discussion, e-mail: [users-unsubscribe@subversion.tigris.org].

Re: Help on SVN

Posted by Rishabh Verma <ri...@gmail.com>.
Hi Hari,

I faced the revision issue already.It takes a lot of time.Our repository is
in a US server.This may be a reason.
The thought you described is good and we are working on same lines.
I was looking for a svn command that does the trick.Thanks anyway.
Any other suggestion will be greatly appreciated.

Thanks and regards,
Rishabh Verma

On Tue, Jul 7, 2009 at 10:58 AM, Hari Kodungallur <hk...@gmail.com>wrote:

>
> On Mon, Jul 6, 2009 at 9:35 PM, Rishabh Verma <ri...@gmail.com>wrote:
>
>> Hi David ,
>>
>> Thanks for your response.We do use Bug Id  while committing the code to
>> repository.I also agree that we can parse the comments to find the revision
>> numbers.But the problem I see is that we have more than 10,000 revisions.And
>> each time I have to find the inventory of a Bug Id,I have to take the log
>> and then parse through all the comments,find the revision numbers and then
>> based on those revision numbers find the files/folders modified.This takes a
>> lot of time.
>>
>> Can you suggest a better approach for large number of revisions.
>>
>
>
>
> I do not think it is going to take a long time. For 10,000 revision, my
> guess would be 1/2 minute to 1 minute at worst (likely way better than
> that). So you should be alright. Note that the output of svn log command
> contains all the info you need for each revision -- comment, files changed
> etc. You don't need to each of those info as a separate step.
>
> Also, how often you need to get this inventory of files. Are you going to
> be doing this all the time? If you need to do this a lot of times, you could
> parse this info in the pre-commit hook and create a db of sorts -- mapping
> bug id to the files that were checked in.
>
> In addition, you might want to add some intelligence to your script where
> it is parsing only a range of revisions and not every revision all the time.
> Say you parsed through revision 1...10,000. Then next time, you could just
> do 10,001...HEAD. Just a thought.
>
>
>
>
>>
>> Thanks and regards,
>>
>> Rishabh Verma.
>>
>> PS : I liked your status message....but why jealous...Its only a phone and
>> only a car :)
>>
>>
>>
>> On Mon, Jul 6, 2009 at 6:21 AM, David Weintraub <qa...@gmail.com>wrote:
>>
>>> You can put the bug ID in the commit comments. That's what we do. Then we
>>> can parse the commit comments to track the revision to the Subversion
>>> revision number.
>>>
>>> I have a pre-commit hook that forces the user to put the bug ID as the
>>> first part of the comment. Makes it easy to parse. (You can put "none" if
>>> there is no bug ID.)
>>>
>>> --
>>> David Weintraub
>>> David@Weintraub.name
>>> Sent from my iPhone while riding in my Ferrari. (Jealous?)
>>>
>>>
>>> On Jul 5, 2009, at 1:41 PM, Rishabh Verma <ri...@gmail.com> wrote:
>>>
>>>  Hi Stefan,
>>>>
>>>> Greetings !
>>>>
>>>> First of all many congratulations for creating such a wonderful
>>>> product.We are trying to automate the svn logs based on Bug Id.As part of
>>>> this requirement we want that we get the list of all the files modified
>>>> against the particular Bug Id.We are using svn command line client.Once we
>>>> have the list we will want to have all those files checked out in a new
>>>> folder.
>>>>
>>>> I will greatly appreciate if you can help me on this.
>>>>
>>>> Thanks and warm regards,
>>>>
>>>> Rishabh Verma,
>>>>
>>>> Software Engineer
>>>>
>>>
>>
>

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=2368654

To unsubscribe from this discussion, e-mail: [users-unsubscribe@subversion.tigris.org].

Re: Help on SVN

Posted by Hari Kodungallur <hk...@gmail.com>.
On Mon, Jul 6, 2009 at 9:35 PM, Rishabh Verma <ri...@gmail.com> wrote:

> Hi David ,
>
> Thanks for your response.We do use Bug Id  while committing the code to
> repository.I also agree that we can parse the comments to find the revision
> numbers.But the problem I see is that we have more than 10,000 revisions.And
> each time I have to find the inventory of a Bug Id,I have to take the log
> and then parse through all the comments,find the revision numbers and then
> based on those revision numbers find the files/folders modified.This takes a
> lot of time.
>
> Can you suggest a better approach for large number of revisions.
>



I do not think it is going to take a long time. For 10,000 revision, my
guess would be 1/2 minute to 1 minute at worst (likely way better than
that). So you should be alright. Note that the output of svn log command
contains all the info you need for each revision -- comment, files changed
etc. You don't need to each of those info as a separate step.

Also, how often you need to get this inventory of files. Are you going to be
doing this all the time? If you need to do this a lot of times, you could
parse this info in the pre-commit hook and create a db of sorts -- mapping
bug id to the files that were checked in.

In addition, you might want to add some intelligence to your script where it
is parsing only a range of revisions and not every revision all the time.
Say you parsed through revision 1...10,000. Then next time, you could just
do 10,001...HEAD. Just a thought.




>
> Thanks and regards,
>
> Rishabh Verma.
>
> PS : I liked your status message....but why jealous...Its only a phone and
> only a car :)
>
>
>
> On Mon, Jul 6, 2009 at 6:21 AM, David Weintraub <qa...@gmail.com> wrote:
>
>> You can put the bug ID in the commit comments. That's what we do. Then we
>> can parse the commit comments to track the revision to the Subversion
>> revision number.
>>
>> I have a pre-commit hook that forces the user to put the bug ID as the
>> first part of the comment. Makes it easy to parse. (You can put "none" if
>> there is no bug ID.)
>>
>> --
>> David Weintraub
>> David@Weintraub.name
>> Sent from my iPhone while riding in my Ferrari. (Jealous?)
>>
>>
>> On Jul 5, 2009, at 1:41 PM, Rishabh Verma <ri...@gmail.com> wrote:
>>
>>  Hi Stefan,
>>>
>>> Greetings !
>>>
>>> First of all many congratulations for creating such a wonderful
>>> product.We are trying to automate the svn logs based on Bug Id.As part of
>>> this requirement we want that we get the list of all the files modified
>>> against the particular Bug Id.We are using svn command line client.Once we
>>> have the list we will want to have all those files checked out in a new
>>> folder.
>>>
>>> I will greatly appreciate if you can help me on this.
>>>
>>> Thanks and warm regards,
>>>
>>> Rishabh Verma,
>>>
>>> Software Engineer
>>>
>>
>

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=2368650

To unsubscribe from this discussion, e-mail: [users-unsubscribe@subversion.tigris.org].

Re: Help on SVN

Posted by David Weintraub <qa...@gmail.com>.
Take a look at Hudson: <https://hudson.dev.java.net/>

Hudson is a continuous build system, and helps automate your builds.
You can setup Hudson to build every time someone checks something in
or just once per day at a set time or however you want. Hudson
integrates with Jira, MantisBT, Trac, Bugzilla, and dozens of other
defect tracking systems. It also integrates with Subversion on the
revision control side (as well as with CVS, ClearCase, TeamTrack,
Visual SourceSafe, Bitkeeper, Git, Perforce, and a few other revision
control systems).

If you integrate Hudson with a defect tracking system, and you add in
the defect ID into the Subversion commit comment, Hudson will display
this defect ID as a link back to the defect in your defect tracking
system.

More importantly, every time Hudson does a build, and it finds these
defect IDs, it automatically puts a comment on that defect to show
what build and what project was built with that ID.

That will allow you to go into that particular defect, and see which
Hudson build was involved with that defect. You can click on the
comment, and see the Hudson build. You can then see the Subversion
repository revision number of that build.

This way, buy simply knowing the defect ID, you can quickly find the
Subversion repository revision that fixed that defect ID.

So, instead of searching the revision numbers in the Subversion
repository for a particular defect in your defect tracking system, you
search the particular defect in your defect tracking system for the
Subversion repository revision number.

Hudson is free, open source, and extremely simple to use. If you
aren't already using a continuous build system, I highly recommend
Hudson.

(Disclosure, I get 10% of all the proceeds from each "sale" of Hudson.
I might not make any money on each "sale", but I hope to make it up in
volume.)

On Tue, Jul 7, 2009 at 12:35 AM, Rishabh Verma<ri...@gmail.com> wrote:
> Hi David ,
>
> Thanks for your response.We do use Bug Id  while committing the code to
> repository.I also agree that we can parse the comments to find the revision
> numbers.But the problem I see is that we have more than 10,000 revisions.And
> each time I have to find the inventory of a Bug Id,I have to take the log
> and then parse through all the comments,find the revision numbers and then
> based on those revision numbers find the files/folders modified.This takes a
> lot of time.
>
> Can you suggest a better approach for large number of revisions.
>
> Thanks and regards,
>
> Rishabh Verma.
>
> PS : I liked your status message....but why jealous...Its only a phone and
> only a car :)
>
>
>
> On Mon, Jul 6, 2009 at 6:21 AM, David Weintraub <qa...@gmail.com> wrote:
>>
>> You can put the bug ID in the commit comments. That's what we do. Then we
>> can parse the commit comments to track the revision to the Subversion
>> revision number.
>>
>> I have a pre-commit hook that forces the user to put the bug ID as the
>> first part of the comment. Makes it easy to parse. (You can put "none" if
>> there is no bug ID.)
>>
>> --
>> David Weintraub
>> David@Weintraub.name
>> Sent from my iPhone while riding in my Ferrari. (Jealous?)
>>
>> On Jul 5, 2009, at 1:41 PM, Rishabh Verma <ri...@gmail.com> wrote:
>>
>>> Hi Stefan,
>>>
>>> Greetings !
>>>
>>> First of all many congratulations for creating such a wonderful
>>> product.We are trying to automate the svn logs based on Bug Id.As part of
>>> this requirement we want that we get the list of all the files modified
>>> against the particular Bug Id.We are using svn command line client.Once we
>>> have the list we will want to have all those files checked out in a new
>>> folder.
>>>
>>> I will greatly appreciate if you can help me on this.
>>>
>>> Thanks and warm regards,
>>>
>>> Rishabh Verma,
>>>
>>> Software Engineer
>
>



-- 
David Weintraub
qazwart@gmail.com

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=2368885

To unsubscribe from this discussion, e-mail: [users-unsubscribe@subversion.tigris.org].


Re: Help on SVN

Posted by Rishabh Verma <ri...@gmail.com>.
Hi David ,

Thanks for your response.We do use Bug Id  while committing the code to
repository.I also agree that we can parse the comments to find the revision
numbers.But the problem I see is that we have more than 10,000 revisions.And
each time I have to find the inventory of a Bug Id,I have to take the log
and then parse through all the comments,find the revision numbers and then
based on those revision numbers find the files/folders modified.This takes a
lot of time.

Can you suggest a better approach for large number of revisions.

Thanks and regards,

Rishabh Verma.

PS : I liked your status message....but why jealous...Its only a phone and
only a car :)



On Mon, Jul 6, 2009 at 6:21 AM, David Weintraub <qa...@gmail.com> wrote:

> You can put the bug ID in the commit comments. That's what we do. Then we
> can parse the commit comments to track the revision to the Subversion
> revision number.
>
> I have a pre-commit hook that forces the user to put the bug ID as the
> first part of the comment. Makes it easy to parse. (You can put "none" if
> there is no bug ID.)
>
> --
> David Weintraub
> David@Weintraub.name
> Sent from my iPhone while riding in my Ferrari. (Jealous?)
>
>
> On Jul 5, 2009, at 1:41 PM, Rishabh Verma <ri...@gmail.com> wrote:
>
>  Hi Stefan,
>>
>> Greetings !
>>
>> First of all many congratulations for creating such a wonderful product.We
>> are trying to automate the svn logs based on Bug Id.As part of this
>> requirement we want that we get the list of all the files modified against
>> the particular Bug Id.We are using svn command line client.Once we have the
>> list we will want to have all those files checked out in a new folder.
>>
>> I will greatly appreciate if you can help me on this.
>>
>> Thanks and warm regards,
>>
>> Rishabh Verma,
>>
>> Software Engineer
>>
>

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=2368641

To unsubscribe from this discussion, e-mail: [users-unsubscribe@subversion.tigris.org].

Re: Help on SVN

Posted by David Weintraub <qa...@gmail.com>.
You can put the bug ID in the commit comments. That's what we do. Then  
we can parse the commit comments to track the revision to the  
Subversion revision number.

I have a pre-commit hook that forces the user to put the bug ID as the  
first part of the comment. Makes it easy to parse. (You can put "none"  
if there is no bug ID.)

--
David Weintraub
David@Weintraub.name
Sent from my iPhone while riding in my Ferrari. (Jealous?)

On Jul 5, 2009, at 1:41 PM, Rishabh Verma <ri...@gmail.com> wrote:

> Hi Stefan,
>
> Greetings !
>
> First of all many congratulations for creating such a wonderful  
> product.We are trying to automate the svn logs based on Bug Id.As  
> part of this requirement we want that we get the list of all the  
> files modified against the particular Bug Id.We are using svn  
> command line client.Once we have the list we will want to have all  
> those files checked out in a new folder.
>
> I will greatly appreciate if you can help me on this.
>
> Thanks and warm regards,
>
> Rishabh Verma,
>
> Software Engineer

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=2368205

To unsubscribe from this discussion, e-mail: [users-unsubscribe@subversion.tigris.org].