[viewvc-dev] RE: [viewvc-users] Hard-coded root_as_url_component ?

"Schroeder, Craig (Gale)" <[email protected]>
Newsgroups gmane.comp.version-control.cvs.viewcvs.devel
Message-ID <3118A1768A29B344AFD99C87A5DC01DE13484431E2__3203.00890966809$1204901615$gmane$org@OHCINMBX01.corp.local>
Sorry for top-posting, but I'm feeling particularly lazy.

As you pointed out, the downside of having this on (from the user side) is pretty marginal.  If users are expected to configure apache/python/etc. to get them up and running I'm sure they could do the URL Rewriting for the second case.

For the first case, I agree that some sort of script would be necessary.  In the interest of making it as simple as possible, could the redirection itself be used in ViewVC to determine when to expand the url using the default root?  Using a configurable list of old apache viewvc paths that would get this treatment?

--Craig

-----Original Message-----
From: C. Michael Pilato [mailto:[email protected]]
Sent: Thursday, March 06, 2008 2:27 PM
To: ViewVC Users; ViewVC Developers
Subject: [viewvc-users] Hard-coded root_as_url_component ?

I'm wondering (aloud, if you will) what kind of headaches it would cause
folks if ViewVC 1.1 dropped the configurability of the root_as_url_component
option and hard-coded it to always be on.  For those not familiar with this
configuration option, it basically makes ViewVC generate URLs of the form
".../ROOTNAME/path/in/root" instead of ".../path/in/root?root=ROOTNAME"
(where root=ROOTNAME is only present for roots that aren't configured as the
default_root).

I admit that all the pros of hardcoding this value are aimed at development
and maintenance of ViewVC.  I mean, there are several benefits that users
get from having root_as_url_component=1 (repository listing view, URLs that
you can protect with Apache auth rules, cross-repository HTML intra-file
linking, ...), but not everybody cares about those benefits.

There are two cons I can think of:

   1. It breaks compatibility with old URLs that don't carry the root=
      parameter.  If ViewVC get a URL like ".../some/path", it won't
      know if that represents /path in a root named "some" or /some/path
      in the default root.  The workaround is to install ViewVC 1.1 at
      a different location than previous versions, and use a stub CGI
      script at the old ViewVC location to redirect the user to the new
      ViewVC location (if the URL doesn't have the "root=ROOT" CGI param,
      then add it -- using the default_root -- and redirect to the new
      ViewVC location).  ViewVC 1.1 could even provide this script.

   2. Some folks might not want the (possibly-redundant) root name present
      in their URL.  Not sure if there's a workaround for this ... maybe
      some Apache RewriteRule magic?

Thoughts?  Opinions?

--
C. Michael Pilato <[email protected]>
CollabNet   <>   www.collab.net   <>   Distributed Development On Demand



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.