Discussion:
Apache svn - how to customize rendering?
Bo Berglund
2017-12-10 08:30:14 UTC
Permalink
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
Ralph Seichter
2017-12-10 09:50:37 UTC
Permalink
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
Bo Berglund
2017-12-10 12:10:23 UTC
Permalink
On Sun, 10 Dec 2017 10:50:37 +0100, Ralph Seichter
Post by Ralph Seichter
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
Paul Hammant
2017-12-10 14:42:54 UTC
Permalink
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)
Bo Berglund
2017-12-10 14:56:46 UTC
Permalink
Post by Paul Hammant
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
Branko Čibej
2017-12-10 15:26:45 UTC
Permalink
Post by Bo Berglund
Post by Paul Hammant
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)
[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
Branko Čibej
2017-12-10 15:52:28 UTC
Permalink
Post by Branko Čibej
Post by Bo Berglund
Post by Paul Hammant
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)
[quote]
We could not perform this search
Must include at least one user, organization, or repository
You could try an advanced search.
[/quote]
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/
Paul Hammant
2017-12-10 15:41:45 UTC
Permalink
(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
Mark Phippard
2017-12-10 15:53:37 UTC
Permalink
Post by Bo Berglund
I installed svn on Ubuntu 16.04.3 LTS using the following how-to
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:

http://svn.code-host.net/project.html

Mark
Daniel Shahaf
2017-12-10 17:00:36 UTC
Permalink
Post by Mark Phippard
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)
Paul Hammant
2017-12-10 17:12:52 UTC
Permalink
Post by Daniel Shahaf
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
Mark Phippard
2017-12-10 17:23:33 UTC
Permalink
Post by Daniel Shahaf
Post by Mark Phippard
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.
https://subversion.apache.org/docs/release-notes/1.8#davkeywordexpansion
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
Bo Berglund
2017-12-11 10:53:12 UTC
Permalink
Post by Mark Phippard
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
Paul Hammant
2017-12-11 12:00:20 UTC
Permalink
Hi Bo,

I keep trying to drive you to look at working Docker configurations on
Github. Here's one https://github.com/RainerBlessing/Docker-ViewVC for
ViewVC on Ubuntu14.10. Can you run docker for yourself? In terms of
self-education you need to be able to run Docker on you Mac or Windows
workstation (or laptop), as this isn't so much about the intended server,
more about "oooh, I wonder how that works" hacking around. Please tell me
directly if you've no Docker capability on any workstation you have access
to, and I'll shut up!

- Paul
Bo Berglund
2017-12-11 23:58:57 UTC
Permalink
Post by Paul Hammant
Hi Bo,
I keep trying to drive you to look at working Docker configurations on
Github. Here's one https://github.com/RainerBlessing/Docker-ViewVC for
ViewVC on Ubuntu14.10. Can you run docker for yourself? In terms of
self-education you need to be able to run Docker on you Mac or Windows
workstation (or laptop), as this isn't so much about the intended server,
more about "oooh, I wonder how that works" hacking around. Please tell me
directly if you've no Docker capability on any workstation you have access
to, and I'll shut up!
Hi,
I went to the github link you gave and had a look at the viewvc.conf
file. It looks like almost everything inside it is commented out and
it also states there is not yet able to run as a service...
What really "docker" is eludes me however, could you expand a bit on
it? It must be something general since I noticed this at the bottom of
Dockerfile
#sudo apt-get install docker.io

So I could perhaps use it as a testing tool, but then I could as well
use the standalone.py file which is part of viewvc itself, right?

In any case both standalone.py and the docker thing seems to publish
the view on localhost:someport, which kind of defeats the object here.
I want the view to be available from computers outside of the server
so it has to be published to the eth0 interface.

I made this happen in standalone.py by editing it and changing the
host variable so it uses the server's address (hardcoded) and hostname
(also hardcoded).
Then I was able to run standalone.py and view the result on
http://hostname:someport/viewvc/

Looked all right, but has now to be transported into Apache2...
--
Bo Berglund
Developer in Sweden
Ryan Schmidt
2017-12-13 16:44:59 UTC
Permalink
Post by Bo Berglund
What really "docker" is eludes me however, could you expand a bit on
it? It must be something general since I noticed this at the bottom of
Dockerfile
#sudo apt-get install docker.io
I clicked that link "docker.io", then clicked "What is Docker?"

https://www.docker.com/what-docker

Maybe that helps.

Bo Berglund
2017-12-10 20:38:18 UTC
Permalink
Post by Mark Phippard
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
Paul Hammant
2017-12-10 20:51:48 UTC
Permalink
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.
Mark Phippard
2017-12-10 21:03:30 UTC
Permalink
Post by Bo Berglund
Post by Mark Phippard
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.
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.
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:

https://github.com/viewvc/viewvc/blob/master/INSTALL

Mark
Bo Berglund
2017-12-11 10:51:13 UTC
Permalink
Post by Mark Phippard
Post by Bo Berglund
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.
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
Branko Čibej
2017-12-11 11:34:09 UTC
Permalink
Post by Bo Berglund
Post by Mark Phippard
Post by Bo Berglund
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.
https://github.com/viewvc/viewvc/blob/master/INSTALL
If you just want to see what your repository looks like when seen
$ 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."
~$ /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
Bo Berglund
2017-12-11 11:47:02 UTC
Permalink
Post by Branko Čibej
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?
'All over the place' is a bit of an overstatement. I have found a
number of examples or how-to's but when following those it turns out
to not work and then after looking closer most are outdated
documents....
And they often assume that you know a whole lot more about the inner
workings of Apache or Linux than I do.
--
Bo Berglund
Developer in Sweden
Bo Berglund
2017-12-11 11:43:27 UTC
Permalink
On Mon, 11 Dec 2017 11:51:13 +0100, Bo Berglund
Post by Bo Berglund
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
Branko Čibej
2017-12-11 12:00:46 UTC
Permalink
Post by Bo Berglund
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?
I propose starting with TortoiseSVN. It's a plugin for Windows Explorer.

https://tortoisesvn.net/downloads.html

Other than that: most common IDEs have SVN integration built-in, or have
plugins available. Of course that's only relevant for developers.

-- Brane
Daniel Shahaf
2017-12-10 22:46:11 UTC
Permalink
Post by Bo Berglund
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.
Loading...