Apache svn - how to customize rendering?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
25 messages Options
12
Reply | Threaded
Open this post in threaded view
|

Apache svn - how to customize rendering?

Bo Berglund
I installed svn on Ubuntu 16.04.3 LTS using the following how-to
webpage:
https://tecadmin.net/install-subversion-server-on-ubuntu/#

Then I have migrated my CVS repositories to svn using cvs2svn and it
seems like all code has come though even though my cvs modules
definitions have not so I have to manually recreate the externals.

When I browse the repositories with my web browser it really looks
pretty basic with just a vertical one-column list of files/directories
shown in browser default font. Is there some way to enhance/customize
it a bit so it gets a more attractive look?

With CVS we have used ViewCVS, which has a more informative display
when browsing the repository also including navigation help and file
info. Could Apache Svn be configured to display anything similar to
what VieCVS could do back in 2005?

Or do I have to install VieVC and in that case how would it affect the
existing Apache Svn?


--
Bo Berglund
Developer in Sweden

Reply | Threaded
Open this post in threaded view
|

Re: Apache svn - how to customize rendering?

Ralph Seichter
On 10.12.2017 09:30, Bo Berglund wrote:

> Is there some way to enhance/customize it a bit so it gets a more
> attractive look?

I use the SVNIndexXSLT option to point Apache to an XSL stylesheet.

-Ralph
Reply | Threaded
Open this post in threaded view
|

Re: Apache svn - how to customize rendering?

Bo Berglund
On Sun, 10 Dec 2017 10:50:37 +0100, Ralph Seichter
<[hidden email]> wrote:

>On 10.12.2017 09:30, Bo Berglund wrote:
>
>> Is there some way to enhance/customize it a bit so it gets a more
>> attractive look?
>
>I use the SVNIndexXSLT option to point Apache to an XSL stylesheet.
>

Thanks.
I  have tried googling this but I only ever get to broken links when I
try to find some examples. I have not enough web knowledge to be able
to write something myself..

Do you know of a tutorial for this including examples?


--
Bo Berglund
Developer in Sweden

Reply | Threaded
Open this post in threaded view
|

Re: Apache svn - how to customize rendering?

Paul Hammant-3
There's dupes in here no doubt - https://github.com/search?q=SVNIndexXSLT&type=Code&utf8=%E2%9C%93 - but you'll see plenty of examples (not tutorials, sorry)
Reply | Threaded
Open this post in threaded view
|

Re: Apache svn - how to customize rendering?

Bo Berglund
On Sun, 10 Dec 2017 09:42:54 -0500, Paul Hammant <[hidden email]>
wrote:

>There's dupes in here no doubt -
>https://github.com/search?q=SVNIndexXSLT&type=Code&utf8=%E2%9C%93 - but
>you'll see plenty of examples (not tutorials, sorry)

Thanks, but your link did not work:

[quote]
We could not perform this search

Must include at least one user, organization, or repository
You could try an advanced search.
[/quote]


--
Bo Berglund
Developer in Sweden

Reply | Threaded
Open this post in threaded view
|

Re: Apache svn - how to customize rendering?

Branko Čibej
On 10.12.2017 15:56, Bo Berglund wrote:

> On Sun, 10 Dec 2017 09:42:54 -0500, Paul Hammant <[hidden email]>
> wrote:
>
>> There's dupes in here no doubt -
>> https://github.com/search?q=SVNIndexXSLT&type=Code&utf8=%E2%9C%93 - but
>> you'll see plenty of examples (not tutorials, sorry)
> Thanks, but your link did not work:
>
> [quote]
> We could not perform this search
>
> Must include at least one user, organization, or repository
> You could try an advanced search.
> [/quote]

Maybe try this search instead:

https://www.google.com/search?q=svnindexxslt


Reply | Threaded
Open this post in threaded view
|

Re: Apache svn - how to customize rendering?

Paul Hammant-3
In reply to this post by Bo Berglund
(linked worked for me - specifically I clicked in my email package - gmail)

Go to https://github.com, in the search box at the top, type "SVNIndexXSLT", press enter, click "code". There are 2,362 hits.

Here is what you will see after that :- https://screencast.com/t/007zHNoHL

- Paul
Reply | Threaded
Open this post in threaded view
|

Re: Apache svn - how to customize rendering?

Branko Čibej
In reply to this post by Branko Čibej
On 10.12.2017 16:26, Branko Čibej wrote:

> On 10.12.2017 15:56, Bo Berglund wrote:
>> On Sun, 10 Dec 2017 09:42:54 -0500, Paul Hammant <[hidden email]>
>> wrote:
>>
>>> There's dupes in here no doubt -
>>> https://github.com/search?q=SVNIndexXSLT&type=Code&utf8=%E2%9C%93 - but
>>> you'll see plenty of examples (not tutorials, sorry)
>> Thanks, but your link did not work:
>>
>> [quote]
>> We could not perform this search
>>
>> Must include at least one user, organization, or repository
>> You could try an advanced search.
>> [/quote]
> Maybe try this search instead:
>
> https://www.google.com/search?q=svnindexxslt

You may also find this bit in the Subversion repository useful:

http://svn.apache.org/repos/asf/subversion/trunk/tools/xslt/

Reply | Threaded
Open this post in threaded view
|

Re: Apache svn - how to customize rendering?

Mark Phippard-3
In reply to this post by Bo Berglund


On Dec 10, 2017, at 3:30 AM, Bo Berglund <[hidden email]> wrote:

I installed svn on Ubuntu 16.04.3 LTS using the following how-to
webpage:
https://tecadmin.net/install-subversion-server-on-ubuntu/#

Then I have migrated my CVS repositories to svn using cvs2svn and it
seems like all code has come though even though my cvs modules
definitions have not so I have to manually recreate the externals.

When I browse the repositories with my web browser it really looks
pretty basic with just a vertical one-column list of files/directories
shown in browser default font. Is there some way to enhance/customize
it a bit so it gets a more attractive look?

With CVS we have used ViewCVS, which has a more informative display
when browsing the repository also including navigation help and file
info. Could Apache Svn be configured to display anything similar to
what VieCVS could do back in 2005?

Or do I have to install VieVC and in that case how would it affect the
existing Apache Svn?


If you want any "features" like being able to view history and see diffs then you need ViewVC or a similar product.  These just install alongside and co-exist with SVN, they do not replace the server.

If you just want to be able to view HEAD revision of files then the built in support is fine and you can use SVNIndexXSLT to style it nicer.

There are some tools out there that try to use this technique to build a ViewVC-like experience but they still require something running on the server to serve up those additional history/diff related requests.  The best example I have seen is this:


Mark





Reply | Threaded
Open this post in threaded view
|

Re: Apache svn - how to customize rendering?

Daniel Shahaf-2
Mark Phippard wrote on Sun, 10 Dec 2017 10:53 -0500:
> If you want any "features" like being able to view history and see diffs then you need ViewVC or a similar product.  These just install alongside and co-exist with SVN, they do not replace the server.
>
> If you just want to be able to view HEAD revision of files then the built in support is fine and you can use SVNIndexXSLT to style it nicer.

Since 1.6, the built-in renderer also supports showing history too:

https://subversion.apache.org/docs/release-notes/1.8#davkeywordexpansion

It's not linked from anywhere in the interface, but it works:

https://svn.apache.org/repos/asf/subversion/trunk/?p=850000

(Aside: I wonder whether we should add a simple <form method="GET"> to the directory index page as UI for this)
Reply | Threaded
Open this post in threaded view
|

Re: Apache svn - how to customize rendering?

Paul Hammant-3


It's not linked from anywhere in the interface, but it works:

https://svn.apache.org/repos/asf/subversion/trunk/?p=850000

(Aside: I wonder whether we should add a simple <form method="GET"> to the directory index page as UI for this)


+1
Reply | Threaded
Open this post in threaded view
|

Re: Apache svn - how to customize rendering?

Mark Phippard-3
In reply to this post by Daniel Shahaf-2


> On Dec 10, 2017, at 12:00 PM, Daniel Shahaf <[hidden email]> wrote:
>
> Mark Phippard wrote on Sun, 10 Dec 2017 10:53 -0500:
>> If you want any "features" like being able to view history and see diffs then you need ViewVC or a similar product.  These just install alongside and co-exist with SVN, they do not replace the server.
>>
>> If you just want to be able to view HEAD revision of files then the built in support is fine and you can use SVNIndexXSLT to style it nicer.
>
> Since 1.6, the built-in renderer also supports showing history too:
>
> https://subversion.apache.org/docs/release-notes/1.8#davkeywordexpansion
>
> It's not linked from anywhere in the interface, but it works:
>
> https://svn.apache.org/repos/asf/subversion/trunk/?p=850000
>
> (Aside: I wonder whether we should add a simple <form method="GET"> to the directory index page as UI for this)

I did not mean being able to view an older version of a file, I meant svn log style output.  AFAIK, there is no way to see things like commit messages, or even a list of files modified in a revision, using the XSLT approach.

The OP does not really specify what they are looking for, but the XSLT approach is not a viable alternative to the full breadth of what ViewVC and other similar products offer.

Mark
Reply | Threaded
Open this post in threaded view
|

Re: Apache svn - how to customize rendering?

Bo Berglund
In reply to this post by Mark Phippard-3
On Sun, 10 Dec 2017 10:53:37 -0500, Mark Phippard <[hidden email]>
wrote:

>If you want any "features" like being able to view history and see
>diffs then you need ViewVC or a similar product.  
>These just install alongside and co-exist with SVN, they do not
>replace the server.

Thanks, I was thinking about getting ViewVC but was afraid it would
break ApacheSvn since svn is using Apache...
Seeing that it installs alongside svn is reassuring.

So I did this:
sudo apt-get install viewvc

And that worked, however I followed a how-to I found on the net which
seems not to work...
https://unspecified.wordpress.com/2008/06/10/viewvc/
Probably too old (I did not notice the 2008 item).

So now I am stuck in the configuration stage.
Then I found this:
http://chschneider.eu/linux/server/apache2.shtml
and was totally overwhelmed by the complexity of setting this up.

I once installed ViewCVS on Windows servers back about 10 years ago
(for CVS) and it was really not this complex to get running.

I have yet to see anything at all via the Apache web server.


--
Bo Berglund
Developer in Sweden

Reply | Threaded
Open this post in threaded view
|

Re: Apache svn - how to customize rendering?

Paul Hammant-3
Docker and ViewCVS on Github - 76 matches - https://screencast.com/t/y9GZgopQZ

Though you're not interested in Docker, some of those will be terse enough to be able to learn from to apply to your own situation.
Reply | Threaded
Open this post in threaded view
|

Re: Apache svn - how to customize rendering?

Mark Phippard-3
In reply to this post by Bo Berglund


On Dec 10, 2017, at 3:38 PM, Bo Berglund <[hidden email]> wrote:

On Sun, 10 Dec 2017 10:53:37 -0500, Mark Phippard <[hidden email]>
wrote:

If you want any "features" like being able to view history and see
diffs then you need ViewVC or a similar product.  
These just install alongside and co-exist with SVN, they do not
replace the server.

Thanks, I was thinking about getting ViewVC but was afraid it would
break ApacheSvn since svn is using Apache...
Seeing that it installs alongside svn is reassuring.

So I did this:
sudo apt-get install viewvc

And that worked, however I followed a how-to I found on the net which
seems not to work...
https://unspecified.wordpress.com/2008/06/10/viewvc/
Probably too old (I did not notice the 2008 item).

So now I am stuck in the configuration stage.
Then I found this:
http://chschneider.eu/linux/server/apache2.shtml
and was totally overwhelmed by the complexity of setting this up.

I once installed ViewCVS on Windows servers back about 10 years ago
(for CVS) and it was really not this complex to get running.

I have yet to see anything at all via the Apache web server.


I have generally just followed the ViewVC docs:


Mark
Reply | Threaded
Open this post in threaded view
|

Re: Apache svn - how to customize rendering?

Daniel Shahaf-2
In reply to this post by Bo Berglund
Bo Berglund wrote on Sun, 10 Dec 2017 21:38 +0100:
> Thanks, I was thinking about getting ViewVC but was afraid it would
> break ApacheSvn since svn is using Apache...
> Seeing that it installs alongside svn is reassuring.

It's possible to for multiple programs to read/serve a repository at the
same time.  E.g., it's possible to serve a repository using svnserve,
mod_dav_svn, and viewvc simultaneously.
Reply | Threaded
Open this post in threaded view
|

Re: Apache svn - how to customize rendering?

Bo Berglund
In reply to this post by Mark Phippard-3
On Sun, 10 Dec 2017 16:03:30 -0500, Mark Phippard <[hidden email]>
wrote:

>> I once installed ViewCVS on Windows servers back about 10 years ago
>> (for CVS) and it was really not this complex to get running.
>>
>> I have yet to see anything at all via the Apache web server.
>
>
>I have generally just followed the ViewVC docs:
>
>https://github.com/viewvc/viewvc/blob/master/INSTALL
>

I looked at this page and found the passage:

"  Quick sanity check:

    If you just want to see what your repository looks like when seen
    through ViewVC, type:

       $ bin/standalone.py -r /PATH/TO/REPOSITORY

    This will start a tiny ViewVC server at
http://localhost:49152/viewvc/,
    to which you can connect with your browser."

So I tried it on my Ubuntu box:

~$ /usr/lib/viewvc/bin/standalone.py -r /var/lib/svn
server ready at http://localhost:49152/viewvc

Notice the "localhost" entry! This will be no good because the UBUNTU
Server 16.04.3 does not have a GUI in which to run a web browser.

So I tried this instead (engineering-lx is the DNS name of my Ubuntu
test server):

http://engineering-lx:49152/viewvc

But it just resulted in a "Unable to connect" error in FireFox.

I can reach the svn via Apache fine though:
http://engineering-lx/svn/pc/

But no sign of viewvc for Subversion...
Maybe the tiny server is not connected to the eth0 public address?
Localhost seems suspicious to me.



--
Bo Berglund
Developer in Sweden

Reply | Threaded
Open this post in threaded view
|

Re: Apache svn - how to customize rendering?

Bo Berglund
In reply to this post by Mark Phippard-3
On Sun, 10 Dec 2017 12:23:33 -0500, Mark Phippard <[hidden email]>
wrote:

>The OP does not really specify what they are looking for,

Well, at first I was looking to improve the ugly looking out of the
box single column display I get in my browser.

But then I also thought about the ViewCVS we used with CVS and which
gave us a lot more info than just a list of folders/files.
So this is what I am looking for now (viewvc for svn), but I am having
problems getting it running.

PS: I sent this yesterday but it seems like it never made it to the
list. Resending it now. DS


--
Bo Berglund
Developer in Sweden

Reply | Threaded
Open this post in threaded view
|

Re: Apache svn - how to customize rendering?

Branko Čibej
In reply to this post by Bo Berglund
On 11.12.2017 11:51, Bo Berglund wrote:

> On Sun, 10 Dec 2017 16:03:30 -0500, Mark Phippard <[hidden email]>
> wrote:
>
>>> I once installed ViewCVS on Windows servers back about 10 years ago
>>> (for CVS) and it was really not this complex to get running.
>>>
>>> I have yet to see anything at all via the Apache web server.
>>
>> I have generally just followed the ViewVC docs:
>>
>> https://github.com/viewvc/viewvc/blob/master/INSTALL
>>
> I looked at this page and found the passage:
>
> "  Quick sanity check:
>
>     If you just want to see what your repository looks like when seen
>     through ViewVC, type:
>
>        $ bin/standalone.py -r /PATH/TO/REPOSITORY
>
>     This will start a tiny ViewVC server at
> http://localhost:49152/viewvc/,
>     to which you can connect with your browser."
>
> So I tried it on my Ubuntu box:
>
> ~$ /usr/lib/viewvc/bin/standalone.py -r /var/lib/svn
> server ready at http://localhost:49152/viewvc
>
> Notice the "localhost" entry! This will be no good because the UBUNTU
> Server 16.04.3 does not have a GUI in which to run a web browser.

So extend your httpd configuration to proxy the ViewVC server; you'd
want to do that anyway. Something along these lines:

<Location /viewvc>
     ProxyPass http://localhost:49152/viewvc
     ProxyPassReverse http://localhost:49152/viewvc
</Location>


and don't forget to load mod_proxy and mod_proxy_http (the command is
"a2enmod" on Ubuntu).

Really, this is basic stuff that's documented with examples all over the
place. Why not read the docs first and come here with actual problems?


-- Brane

Reply | Threaded
Open this post in threaded view
|

Re: Apache svn - how to customize rendering?

Bo Berglund
In reply to this post by Bo Berglund
On Mon, 11 Dec 2017 11:51:13 +0100, Bo Berglund
<[hidden email]> wrote:

>Maybe the tiny server is not connected to the eth0 public address?
>Localhost seems suspicious to me.

I ended up editing the /usr/lib/viewvc/bin/standalone.py file on the
line specifying the binding:

  host = sys.platform == 'mac' and  '192.168.xxx.xxx' or
'engineering-lx' # '127.0.0.1' or 'localhost'

After this I could see the repository through the basic ViewVC glasses
on my PC! Much improved view over the svn built-in Apache view :)

But standalone.py is not what I want to run anyway, so I need to plow
through the immense installation configuration to enable VieVC
integration into Apache2...
Or is there a quyick way to get the standalone.py version become the
way ViewVC serves out the repository via Apache2?

Note:
My CVS users are all working through the WinCVS application from the
CVSGui project that died about 10 years ago...

None is comfortable with command line work or Linux for that matter,
all are on Windows workstations.

So I need to give them some GUI style tools to convince of a migration
to Subversion. Maybe VisualSVN on Windows can fulfill this?


--
Bo Berglund
Developer in Sweden

12