Re: [viewvc-users] Bad ra_local URL when repository path is a Windows UNC path
"C. Michael Pilato" <[email protected]>
| Newsgroups | gmane.comp.version-control.cvs.viewcvs.user |
|---|---|
| Organization | CollabNet, Inc. |
| Message-ID | <[email protected]> |
As you likely suspect, the short answer is that ViewVC isn't expecting a UNC
path here, just a local absolute path. I can't remember right now if
Subversion itself even claims to support UNC paths represented as URLs. If
it does, then it makes sense to teach ViewVC to handle those cases, too.
Richard Copley wrote:
> In my viewvc.conf I have "root_parents = //server/share/svn : svn".
> This is the UNC path to where our repository lives on a network drive.
> If I browse to a "view=annotate" ViewVC URL I see the message "Error
> occurred while calculating annotation data."
> If I change the line in the function markup_or_annotate in viewvc.py
> that says "annotate = 'error'" so that it says "raise" and try again,
> ViewVC croaks with this traceback:
>
> Traceback (most recent call last):
> File "C:\Program Files\viewvc-1.1.3\lib\viewvc.py", line 4315, in main
> request.run_viewvc()
> File "C:\Program Files\viewvc-1.1.3\lib\viewvc.py", line 398, in run_viewvc
> self.view_func(self)
> File "C:\Program Files\viewvc-1.1.3\lib\viewvc.py", line 1772, in
> view_annotate
> markup_or_annotate(request, 1)
> File "C:\Program Files\viewvc-1.1.3\lib\viewvc.py", line 1685, in
> markup_or_annotate
> blame_source, revision = request.repos.annotate(path, rev)
> File "C:\Program Files\viewvc-1.1.3\lib\vclib\svn\svn_repos.py",
> line 570, in annotate
> youngest_rev, oldest_rev)
> File "C:\Program Files\viewvc-1.1.3\lib\vclib\svn\svn_repos.py",
> line 330, in __init__
> _rev2optrev(rev), self._blame_cb, ctx)
> File "C:\Python25\lib\site-packages\libsvn\client.py", line 1006, in
> svn_client_blame2
> return apply(_client.svn_client_blame2, args)
> SubversionException: ('Unable to open an ra_local session to URL', 180001)
>
> By inserting the line "raise RuntimeError, args[0]" in the function
> svn_client_blame2 in Python25/Lib/site-packages/libsvn/client.py, I
> see that the repository URL that libsvn is trying to use is of the
> form "file://///server/share/svn/repository/trunk/path/to/file".
>
> Where that URL has 5 slashes, my command-line SVN client will only
> accept 2; any more than 2 and it dies with "svn: Unable to open an
> ra_local session to URL".
>
> Is this a bug in ViewVC? Should the function _geturl in
> viewvc-1.1.3/lib/vclib/svn/svn_ra.py be special-cased for UNC paths on
> Windows?
>
> Regards,
> Richard Copley.
>
> ------------------------------------------------------
> http://viewvc.tigris.org/ds/viewMessage.do?dsForumId=4255&dsMessageId=2447047
>
> To unsubscribe from this discussion, e-mail: [[email protected]].
--
C. Michael Pilato <[email protected]>
CollabNet <> www.collab.net <> Distributed Development On Demand
------------------------------------------------------
http://viewvc.tigris.org/ds/viewMessage.do?dsForumId=4255&dsMessageId=2448417
To unsubscribe from this discussion, e-mail: [[email protected]].
signature.asc
(application/pgp-signature, 197 B)
-----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (GNU/Linux) iEYEARECAAYFAkt8DsMACgkQokEGqRcG/W7K9QCgjf5Q7fyfMF0G/bEyCPNmoIdz 69wAnj3fGPDOETEeJHUUy0SGfe/yV5aA =/IU3 -----END PGP SIGNATURE-----