[ statsvn-Bugs-2345106 ] problem with generated stat when folder is moved into parent

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[ statsvn-Bugs-2345106 ] problem with generated stat when folder is moved into parent

SourceForge.net
Bugs item #2345106, was opened at 2008-11-25 13:38
Message generated for change (Comment added) made by jkealey
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=833326&aid=2345106&group_id=164845

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Input Layer: SVN
Group: None
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Alex (alex15)
Assigned to: Nobody/Anonymous (nobody)
Summary: problem with generated stat when folder is moved into parent

Initial Comment:
I am trying to use StatSVN on a repository containing a moved
directory directory. The directory was moved from a sub directory its parent directory (in my case it is the repository root directory). I am seeing the following behavior:
- Files that have not been modified after the directory move operation do not  appear on the directories statistics main page (index.html) and they are also not included in the current LOC count.

The local copy of the repository is the same version, the svn log was created from and the svn log correctly includes the move operation:

<logentry  
revision="1234">
 <author>abc</author>
 <date>2008-11-13T08:54:25.978873Z</date>
 <paths>
 <path
   action="D">/trunk/sub/movedDir/src</path>
 <path
   copyfrom-path="/trunk/sub/movedDir/include"
   copyfrom-rev="1233"
   action="A">/trunk/movedDir/include</path>
 <path
   copyfrom-path="/trunk/sub/movedDir/src"
   copyfrom-rev="1233"
   action="A">/trunk/movedDir/src</path>
 <path
   action="D">/trunk/sub/movedDir/include</path>
 </paths>
 <msg>Move the movedDir directory</msg>
</logentry>

I am able to reproduce the problem with a minimal repository.

- Create a new svn repository
- Add the directories sub/dir and a file sub/dir/main.cpp containing 2 lines and commit the added files
- if I generate the statistics on the repository now by calling the
following commands, I get the empty log error (maybe this is a fringe case -
head revision 0):
svn.exe log "%SVNREPOSITORY%" --xml -v > \Temp\svn.log
svn.exe co "%SVNREPOSITORY%" "\Temp\LocalSVNRepoCopy"
java -jar statsvn.jar -include "**\*.cpp" "\Temp\svn.log"
"\Temp\LocalSVNRepoCopy"

- Now I add a third line to the main.cpp file and commit the change - the statsvn statistics now does not output any warnings and correctly identifies the three LOC of the project.
index.html shows the following information now:
Generated: 2008-11-25 11:21
Head revision: 1
Report Period: 2008-11-25 to 2008-11-25
Total Files: 1
Total Lines of Code: 3
Developers: 1
Directories
 [root] (0 files, 0 lines)
    sub (0 files, 0 lines)
        dir (1 files, 3 lines)

- Now I move the directory dir directory out of the sub directory into the root directory of the repository and commit the change.

- statSVN now does not report any warnings but outputs the current LOC to be 0!

index.html shows the following information:
Generated: 2008-11-25 11:43
Head revision: 2
Report Period: 2008-11-25 to 2008-11-25
Total Files: 0
Total Lines of Code: 0
Developers: 1
Directories
 [root] (0 files, 0 lines)
    sub (0 files, 0 lines)
        dir (0 files, 0 lines)




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

>Comment By: Jason Kealey (jkealey)
Date: 2010-07-06 08:40

Message:
The recommended workaround is to spend a few days implementing the feature
in StatSVN to benefit the whole community :)

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

Comment By: Antti Maula (amaula)
Date: 2010-07-06 07:58

Message:
Is there a known workaround? Modifying all files in the move target subtree
would do the trick, but is probably not the best solution :)

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

Comment By: Jason Kealey (jkealey)
Date: 2010-07-06 07:54

Message:
That is corrected. StatSVN does not support SVN moves properly at this
point.

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

Comment By: Antti Maula (amaula)
Date: 2010-07-06 03:39

Message:
The issue seems to exists on all directory moves. Moving a directory will
delete that amount of code from all calculations. The directory which was
moved is marked in the report as deleted, but the new directory in which
the files were moved is not included in the report at all. So, as a
arranged my repository a bit, statsvn now reports 50% less code in the
whole repository.

This is probably related to the directory tracking problem listed on
limitations?

Tested with version 0.7.0.


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

You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=833326&aid=2345106&group_id=164845

------------------------------------------------------------------------------
This SF.net email is sponsored by Sprint
What will you do first with EVO, the first 4G phone?
Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
_______________________________________________
Statsvn-developers mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/statsvn-developers