MantisBT - CDash
View Issue Details
0009790CDashpublic2009-10-29 05:422011-12-22 10:43
Alex Neundorf 
Julien Jomier 
normalmajoralways
resolvedfixed 
1.4 
1.9 
0009790: URL into Trac svn browser wrong
Hi,

I'm using cdash 1.4.3 and Trac 0.11.2.
The URL generated by cdash for trac looks like:
https://<server>/trac/<project>/browser/<dirs>/<file>?rev=1696 [^]
This does not work here with Trac.
A working URL for this would be:
https://<server>/trac/<project>/changeset/1696/<dirs>/<file> [^]

Alternatively,
https://<server>/trac/<preoject>/changeset/1677/ [^]
might also be ok, this gives the whole changeset/commit, which may be even more useful.

Alex
No tags attached.
Issue History
2009-10-29 05:42Alex NeundorfNew Issue
2009-10-29 09:03Alex NeundorfNote Added: 0018270
2009-11-23 18:31Julien JomierStatusnew => assigned
2009-11-23 18:31Julien JomierAssigned To => Julien Jomier
2009-11-23 18:36Julien JomierNote Added: 0018556
2009-11-24 14:13Alex NeundorfNote Added: 0018574
2009-11-24 14:14Alex NeundorfNote Added: 0018575
2009-11-24 15:56Julien JomierNote Added: 0018581
2009-11-24 16:01Alex NeundorfNote Added: 0018582
2009-11-24 18:07Julien JomierNote Added: 0018584
2009-11-25 13:23Alex NeundorfNote Added: 0018589
2009-11-28 14:41Julien JomierNote Added: 0018609
2009-12-02 09:19Julien JomierNote Added: 0018641
2009-12-02 09:19Julien JomierStatusassigned => resolved
2009-12-02 09:19Julien JomierFixed in Version => 1.6
2009-12-02 09:19Julien JomierResolutionopen => fixed
2010-02-21 12:31Julien JomierStatusresolved => closed
2010-05-03 08:36Alex NeundorfNote Added: 0020514
2010-05-03 08:36Alex NeundorfStatusclosed => feedback
2010-05-03 08:36Alex NeundorfResolutionfixed => reopened
2011-12-08 03:12jkeirenNote Added: 0027935
2011-12-22 10:43Julien JomierNote Added: 0028038
2011-12-22 10:43Julien JomierStatusfeedback => resolved
2011-12-22 10:43Julien JomierFixed in Version1.6 => 1.9
2011-12-22 10:43Julien JomierResolutionreopened => fixed

Notes
(0018270)
Alex Neundorf   
2009-10-29 09:03   
Ok, my report was slightly wrong.
When adding trunk/ in the cdash configuration, the generated links on the viewUpdate.php work.
But they don't show the patch, which was committed, but the complete file at the given revision.
So I still think this should be changed to what I suggested above.

Alex
(0018556)
Julien Jomier   
2009-11-23 18:36   
How does Trac know it should use the trunk instead of the branch when doing this?

  https://<server>/trac/<project>/changeset/1696/<dirs>/<file> [^]
(0018574)
Alex Neundorf   
2009-11-24 14:13   
It's part of <dirs>. E.g. this is a whole changeset:
http://trac.edgewall.org/changeset/8828/trunk/trac [^]

And this is just the diff for one file in this changeset:
http://trac.edgewall.org/changeset/8828/trunk/trac/ticket/model.py [^]

Alex
(0018575)
Alex Neundorf   
2009-11-24 14:14   
Actually this is already the whole changeset, so no dirs at all required, just the revision number:
http://trac.edgewall.org/changeset/8828 [^]

I'm not sure what is better for cdash, linking to the whole changeset or directly just to the changed file.

Alex
(0018581)
Julien Jomier   
2009-11-24 15:56   
CDash should link to the changed file, because when clicking on the file you just want to see the changes. I'm going to leave CDash the way it is if that works for you.
(0018582)
Alex Neundorf   
2009-11-24 16:01   
Hmm, e.g. with websvn it links to the diff which has been committed (e.g. http://websvn.kde.org/trunk/KDE/kdelibs/cmake/modules/FindQt4.cmake?r1=1053710&r2=1053711 [^]).
This is very nice.
With trac cdash 1.4 links to the full file, i.e. I don't see what has actually been committed.
It would be nice if it would work for trac as good as for the other supported systems (i.e. link to http://trac.edgewall.org/changeset/8828/trunk/trac/ticket/model.py [^] instead of http://trac.edgewall.org/browser/trunk/trac/ticket/tests/model.py?rev=8828 [^])

Alex
(0018584)
Julien Jomier   
2009-11-24 18:07   
The main issue is how to get the "/trunk/" from the URL passed to CDash, is there some sort of convention? What kind how URL would be expected to be put in the CDash URL?
(0018589)
Alex Neundorf   
2009-11-25 13:23   
I think "trunk" is part of <dirs>.
In the example from above "http://trac.edgewall.org/changeset/8828/trunk/trac/ticket/model.py", [^] I think <dirs> should be "trunk/trac/ticket" (this is the Trac instance for trac itself).
I mean, the URL which is generated currently also already has the "trunk/" part in it (see my initial post).

Alex
(0018609)
Julien Jomier   
2009-11-28 14:41   
The problem is that you added "trunk/" has part of the URL in the CDash configuration for the project therefore it's tricky to put the revision number in the middle of the configuration URL if there is no logic. The option is to add another field to store the suffix "trunk/" in that case unless the trunk/ comes from CTest (is this the case?)
(0018641)
Julien Jomier   
2009-12-02 09:19   
Should be all set now.
(0020514)
Alex Neundorf   
2010-05-03 08:36   
Hi Julien,

unfortunately the current URL intro Trac is not correct.
CDash generates:
https://svn.itwm.fhg.de/trac/Foo/changeset/3655/Some/Dir/file.cpp [^]
but it should be
https://svn.itwm.fhg.de/trac/Foo/changeset/3655/trunk/Some/Dir/file.cpp [^]

I checked in common.php get_trac_diff_url().
$file is "Some/Dir/file.cpp", and $directory is "Some/Dir".
So the "trunk" part is missing.

The Update.xml on the build machine has the lines:

<Update mode="Client" Generator="ctest-2.8.1">
...
       <UpdateType>SVN</UpdateType>
        <Revision>3651</Revision>
        <PriorRevision>3649</PriorRevision>
        <SVNPath>/trunk/</SVNPath>
...

Grepping for "SVNPath" in the cdash php files didn't show me any results.
Maybe this could be used somehow ?

Alex
(0027935)
jkeiren   
2011-12-08 03:12   
I would like to add the following information to this issue.

The problem is still present in CDash version 1.8.2, where the link that is generated is still missing the /trunk part of the URL.

Are there any plans towards fixing the issue?
(0028038)
Julien Jomier   
2011-12-22 10:43   
I added the 'trunk' suffix for now. We would need to come up with a branch viewer at some point, or let CTest provide it as Alex mentioned.