GoogleCodeArchives / svnplot

Automatically exported from code.google.com/p/svnplot
0 stars 0 forks source link

Not working on repository root #11

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?

python svnlog2sqlite.py -l file:///var/lib/svn/repositories/myrepo/
/root/svnplot.sl3

Updating the subversion log

                                           Repository :
file:///var/lib/svn/repositories/myrepo/                                  

Log database filepath : /root/svnplot.sl3
Update Changed Line Count : True
ERROR:root:Error list index out of range
Error list index out of range
Traceback (most recent call last):
  File "svnlog2sqlite.py", line 40, in convert
    (startrevno, endrevno) = self.svnclient.findStartEndRev()
  File "/root/SVNPlot-0.5.6/svnplot/svnlogiter.py", line 158, in
findStartEndRev
    if( startrev != None and len(startrev[0]) > 0):
IndexError: list index out of range

If I point to
file:///var/lib/svn/repositories/myrepo/trunk 

it works (but I am mostly interested in the modified lines graph)

What version of the product are you using? On what operating system?
svnplot 0.5.6

Original issue reported on code.google.com by p.filip...@gmail.com on 13 Jul 2009 at 8:14

GoogleCodeExporter commented 9 years ago
Thanks for the report. I will check update. 

Original comment by nitinbh...@gmail.com on 14 Jul 2009 at 2:39

GoogleCodeExporter commented 9 years ago
I am doing some progress... the problem seems to be caused by svnplot not being 
able
to determine the first revision in the repository

If I replace in findStartEndRev:

        startrevno = 0
        endrevno = 0
        if( startrev != None and len(startrev[0]) > 0):
            startrevno = startrev[0].revision.number
            endrevno   = headrev.revision.number

        return(startrevno, endrevno)

with:
        startrevno = 0
        endrevno =  headrev.revision.number

        return(startrevno, endrevno)  

it works.

I think the problem is caused by the way svnplot uses the date to get the first 
revision.

Original comment by p.filip...@gmail.com on 14 Jul 2009 at 8:39

GoogleCodeExporter commented 9 years ago
Originally it was similar to what you have suggested. I modified the logic to 
support the 'non root' repository paths. 

What is the version of PySVN that you are using ?

Original comment by nitinbh...@gmail.com on 14 Jul 2009 at 3:36

GoogleCodeExporter commented 9 years ago
python-pysvn-1.6.3-1mdv2009.1

Original comment by p.filip...@gmail.com on 14 Jul 2009 at 3:38

GoogleCodeExporter commented 9 years ago
General Statistics
Head Revision Number    :   1479
First Revision Number   :   1
Last Commit Date    :   Jul 13, 2009 04:51
First Commit Date   :   Aug 22, 2007 01:55

This is correct... but it seems "Revision 0" is "missing", it was @Aug 22, 2007 
01:14

Original comment by p.filip...@gmail.com on 14 Jul 2009 at 3:46

GoogleCodeExporter commented 9 years ago
Please check with the latest version 0.5.7

Original comment by nitinbh...@gmail.com on 20 Jul 2009 at 5:41

GoogleCodeExporter commented 9 years ago
Hi,
I have tried, but unfortunately this does not solve the problem.

I deleted the sqlite db, and when I call svnlog2sqlite, it exits almost 
immediately.
The sqlite db is create, but it is only 5120 bytes long.

Original comment by p.filip...@gmail.com on 20 Jul 2009 at 9:49

GoogleCodeExporter commented 9 years ago
Add the following line to enable logging in RunMain in svnlog2sqlite 

logging.basicConfig(level=logging.DEBUG,
                    format='%(asctime)s %(levelname)s %(message)s',
                    filename='/tmp/myapp.log',
                    filemode='w')
change filename to appropriate name for your system.

Please check if the log file is getting generated. If yes, check/send the log 
file.

Original comment by nitinbh...@gmail.com on 21 Jul 2009 at 2:54

GoogleCodeExporter commented 9 years ago
Here it is:
2009-07-21 09:19:02,477 DEBUG found rooturl 
file:///var/lib/svn/repositories/itfutures
2009-07-21 09:19:02,478 DEBUG Trying to get head revision
rooturl:file:///var/lib/svn/repositories/itfutures
2009-07-21 09:19:02,478 DEBUG Found head revision 1499
2009-07-21 09:19:02,479 DEBUG Trying to get head revision
rooturl:file:///var/lib/svn/repositories/itfutures
2009-07-21 09:19:02,479 DEBUG Found head revision 1499
2009-07-21 09:19:02,480 DEBUG Trying to get revision log. revno:1,
url=file:///var/lib/svn/repositories/itfutures
2009-07-21 09:19:02,482 DEBUG Trying to get head revision
rooturl:file:///var/lib/svn/repositories/itfutures
2009-07-21 09:19:02,483 DEBUG Found head revision 1499
2009-07-21 09:19:02,483 DEBUG Trying to get head revision
rooturl:file:///var/lib/svn/repositories/itfutures
2009-07-21 09:19:02,483 DEBUG Found head revision 1499
2009-07-21 09:19:02,484 DEBUG Trying to get revision log. revno:1,
url=file:///var/lib/svn/repositories/itfutures
2009-07-21 09:19:02,486 DEBUG Trying to get head revision
rooturl:file:///var/lib/svn/repositories/itfutures
2009-07-21 09:19:02,487 DEBUG Found head revision 1499
2009-07-21 09:19:02,487 DEBUG Trying to get head revision
rooturl:file:///var/lib/svn/repositories/itfutures
2009-07-21 09:19:02,488 DEBUG Found head revision 1499
2009-07-21 09:19:02,488 DEBUG Trying to get revision log. revno:1,
url=file:///var/lib/svn/repositories/itfutures

Original comment by p.filip...@gmail.com on 21 Jul 2009 at 8:20

GoogleCodeExporter commented 9 years ago
it seems for some reason svnlog2sqlite is not able to retrieve the revision log 
for revision 1. Since usually there is no revision 0, in the repository, I try 
to get revision 1 to 'head revision'. I will add few more logging checks and 
update you.

Original comment by nitinbh...@gmail.com on 28 Jul 2009 at 2:30

GoogleCodeExporter commented 9 years ago

Original comment by nitinbh...@gmail.com on 28 Jul 2009 at 2:31

GoogleCodeExporter commented 9 years ago
From: "Trying to get revision log. revno:1" it seems it is able to find the 
first
revision is 1. 

If I hardcode 1 in findStartEndRev it works!

Original comment by p.filip...@gmail.com on 28 Jul 2009 at 8:14

GoogleCodeExporter commented 9 years ago
please check the latest version. I think now i have fixed this issue.

Original comment by nitinbh...@gmail.com on 31 Aug 2009 at 4:53

GoogleCodeExporter commented 9 years ago

Original comment by nitinbh...@gmail.com on 31 Aug 2009 at 4:56

GoogleCodeExporter commented 9 years ago
Version 0.5.10 contains better repository root detection (for non-root 
repository paths) and fixed the bug "line count not getting updated for 
non-root paths"

Original comment by nitinbh...@gmail.com on 3 Sep 2009 at 3:07