Quantcast

[ statsvn-Feature Requests-1897165 ] Support for MultiDir/svn:externals

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

[ statsvn-Feature Requests-1897165 ] Support for MultiDir/svn:externals

SourceForge.net
Feature Requests item #1897165, was opened at 2008-02-19 13:58
Message generated for change (Comment added) made by jkealey
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=833329&aid=1897165&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: Next Release (example)
Status: Open
Priority: 5
Private: No
Submitted By: Allard (allarddijk)
Assigned to: Nobody/Anonymous (nobody)
Summary: Support for MultiDir/svn:externals

Initial Comment:
Projects with linked in directories are not supported at this moment. It just skips this dirs. The information is normally not included with the normal svn commandline.

to gather this information one should make a batch in this form:

del x:\svn.log
svn log --incremental --xml directoryA >> x:\svn.log
svn log --incremental --xml directoryB >> x:\svn.log
svn log --incremental --xml directoryC >> x:\svn.log

Now one should supply this directories to the stat software. In the current situation you can only supply 1 directory.


When this is ready you have this features:

*support for multiple projects
*support for projects using svn:external

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

>Comment By: Jason Kealey (jkealey)
Date: 2010-05-25 12:21

Message:
Sounds interesting!

Thinking back to the original StatSVN implementation, I think the
limitations are as follows:
- I think we assume a sequential log file. Out of order files might be
problematic.
- More importantly, we assume a single RepositoryGUID/URL throughout the
application. With svn:externals, we could potentially be querying other SVN
repositories which would require us to pass in extra parameters for
usernames, passwords, etc. Since we fetch the Repository information using
svn info on the root of the checked out directory, we would need to do this
for all external folders.
- Assuming we did manage to treat these sub-repositories as completely
independent in the parsing/setup phases, I am not sure how the svn diff +
reporting phases would handle this. Not all files would start off with the
same repository URL.

At a high level, because of design limitations, this looks like a large
job.


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

Comment By: Aleksas Pielikis (aleksas)
Date: 2010-05-25 11:22

Message:
Wrote a powershell script to make a full log including externals set on the
project directory. But this doesn't solve the issue. I guess stats do not
show info for directories outside project directory in repository. Any way
here is the script:

$path = $args[0];
$logOutput = $args[1];
$statOuputDir = $args[2];
$statSvnJarPath = $args[3];

$svn = "svn"
$getExternalsParameters = "propget svn:externals '$path'"
$getLogParameters = "log --incremental --xml -v '$path'"

$externals = Invoke-Expression -Command ("$svn $getExternalsParameters");

'<?xml version="1.0"?>' | Out-File $logOutput;
'<log>' | Out-File $logOutput  -append;

"Resolving changes for '$path'"
Invoke-Expression -Command ("$svn $getLogParameters") | Out-File
$logOutput  -append;

foreach($external in $externals)
{
    if($external -ne "")
    {
        $dir = Join-Path $path $external.Split(" ")[1]
        $getExternalsLogParameters = "log --incremental --xml -v '$dir'"
        "Resolving changes for '$dir'"
        Invoke-Expression -Command ("$svn $getExternalsLogParameters") |
Out-File $logOutput -append;
    }
}
'</log>' | Out-File $logOutput -append;
   
if ((Test-Path -path $statOuputDir) -ne $True)
{
    New-Item $statOuputDir -type directory;
}

$currentLocation = Get-Location

Set-Location $statOuputDir

Invoke-Expression -Command ("java -jar  '$statSvnJarPath' '$logOutput'
'$path'") | ;

Set-Location $currentLocation



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

Comment By: Heiko Stoermer (stoermer)
Date: 2009-09-08 08:47

Message:
My layout is roughly the following: I have 4 projects A, B, C, D.

A has the layout
 /src/
 /components/X
 /components/Y
 /components/Z

where /src/ has A's source, and /components/* are the projects B,C,D
pulled in via svn:externals.
So after a checkout including the externals I get something like

 /A/src/
 /A/components/X/src/ (from B)
 /A/components/Y/src/ (from C)
 /A/components/Z/src/ (from D)

I can create the complete log of everything following Allard's proposal
and fixing the resulting non-well-formed XML file that svn produces by
hand.

When I run statsvn on the resulting log file giving /A/ as path, i get
tons of "problems getting diff" messages and "no such revision". All
subfolders in the resulting report do appear, but e.g. LOC calculations
seem very much off.




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

Comment By: Jason Kealey (jkealey)
Date: 2009-09-08 08:24

Message:
What is StatSVN's current behavior concerning svn:externals?

What does the svn log show when you point to an external folder? A
modification to the directory (to add the svn:externals metadata)?
Afterwards, no modifications are shown in the directories that include it,
even when the files are modified (as these changes are elsewhere in the
repository)?

What would you do if you had a repository that had an svn:externals to
itself. If you checked out the trunk, would you expect the change to the
included directory to be seen as a modification in all the places that use
it?



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

Comment By: Heiko Stoermer (stoermer)
Date: 2009-09-08 04:05

Message:
Btw, Allard's example has the flaw that seemingly in svn the combination of
"--xml" and "--incremental" does NOT result in a well-formed XML document
(at least on the machine with svn 1.4 I have available here right now, see
[1]), so you'll have to do some fixing first.

[1]
http://osdir.com/ml/version-control.subversion.devel/2002-10/msg00253.html

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

Comment By: Heiko Stoermer (stoermer)
Date: 2009-09-08 03:40

Message:
Would be great to have support for the analysis of projects that include
sub-projects via svn:externals.

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

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

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

_______________________________________________
Statsvn-developers mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/statsvn-developers
Loading...