Page MenuHomePhabricator

CodeReview links to ViewVC are broken for directories (works for files)
Open, LowPublicFeature

Description

Author: gangleri

Description:
Dear friends;

https://bugzilla.wikimedia.org/show_bug.cgi?id=2777#c17
shows r38054
http://www.mediawiki.org/wiki/Special:Code/MediaWiki/38054
shows /trunk/extensions/SubstAll (added)

http://svn.wikimedia.org/viewvc/mediawiki/trunk/extensions/SubstAll/?pathrev=38054&view=markup
generates:

An Exception Has Occurred
Python Traceback

Traceback (most recent call last):

File "/usr/local/viewvc/lib/viewvc.py", line 3665, in main
  request.run_viewvc()
File "/usr/local/viewvc/lib/viewvc.py", line 388, in run_viewvc
  self.view_func(self)
File "/usr/local/viewvc/lib/viewvc.py", line 1368, in view_markup
  fp, revision = request.repos.openfile(path, rev)
File "/usr/local/viewvc/lib/vclib/svn/__init__.py", line 610, in openfile
  fp = FileContentsPipe(fsroot, path, self.pool)
File "/usr/local/viewvc/lib/vclib/svn/__init__.py", line 431, in __init__
  self._stream = fs.file_contents(root, path, self._pool)
File "/var/lib/python-support/python2.5/libsvn/fs.py", line 588, in svn_fs_file_contents
  return apply(_fs.svn_fs_file_contents, args)

SubversionException: ('Attempted to get textual contents of a *non*-file node', 160017)

Regards Reinhardt [[user:Gangleri]]


Version: unspecified
Severity: enhancement
URL: https://bugzilla.wikimedia.org/show_bug.cgi?id=2777#c17
See Also:
http://viewvc.tigris.org/issues/show_bug.cgi?id=472

Details

Reference
bz21927

Event Timeline

bzimport raised the priority of this task from to Low.Nov 21 2014, 10:58 PM
bzimport set Reference to bz21927.
bzimport added a subscriber: Unknown Object (MLST).

overlordq wrote:

Switching to CodeReview extension, seems to be adding view=markup to all changed paths, directories included, which generally don't have markup.

Probably needs a better summary.

reedy@ubuntu64-esxi:~$ svn up test
A test/trunk/lol
Updated to revision 2.
reedy@ubuntu64-esxi:~$ svn up test
A test/trunk/test
Updated to revision 3.
reedy@ubuntu64-esxi:~$ svn up test
A test/trunk/test.txt

lol is a folder, test is an extensionless file name

I'm not sure we can actually do anything in CR for this, but maybe file upstream with viewvc, and not have it go OMGNO?

Logged bug upstream with ViewVC, not a huge amount we can do.

RESOLVED LATER

Reopening, WONTFIX'd at viewvc

"I don't see any benefit to making this not error when you've explicitly asked
the tool for something that makes no sense. Rather, the CodeReview module in
the original referenced report should be more intelligent about the URLs it
generates. (It's not as if Subversion doesn't provide ample ways for scripts
and such to tell whether a given path changed in a commit is a file or a directory.)"

Anyone any suggestions? The tests above don't give any useful information..

A google suggests svnlook http://stackoverflow.com/questions/1840805/how-to-check-if-path-is-a-folder-or-a-file-with-svnlook

But that needs to be against the phyiscal repo directory....

svn info can tell us a bit more...

reedy@ubuntu64-esxi:~/test/trunk$ svn info lol
Path: lol
URL: https://192.168.0.202/svn/test/trunk/lol
Repository Root: https://192.168.0.202/svn/test
Repository UUID: 09e567e2-95c0-854f-9fda-fa730f2ac68d
Revision: 4
Node Kind: directory
Schedule: normal
Last Changed Author: reedy
Last Changed Rev: 2
Last Changed Date: 2010-11-21 22:43:49 +0000 (Sun, 21 Nov 2010)

reedy@ubuntu64-esxi:~/test/trunk$ svn info test
Path: test
Name: test
URL: https://192.168.0.202/svn/test/trunk/test
Repository Root: https://192.168.0.202/svn/test
Repository UUID: 09e567e2-95c0-854f-9fda-fa730f2ac68d
Revision: 4
Node Kind: file
Schedule: normal
Last Changed Author: reedy
Last Changed Rev: 3
Last Changed Date: 2010-11-21 22:44:59 +0000 (Sun, 21 Nov 2010)
Text Last Updated: 2010-11-21 22:45:07 +0000 (Sun, 21 Nov 2010)
Checksum: 9cdfb439c7876e703e307864c9167a15

reedy@ubuntu64-esxi:~/test/trunk$ svn info test.txt
Path: test.txt
Name: test.txt
URL: https://192.168.0.202/svn/test/trunk/test.txt
Repository Root: https://192.168.0.202/svn/test
Repository UUID: 09e567e2-95c0-854f-9fda-fa730f2ac68d
Revision: 4
Node Kind: file
Schedule: normal
Last Changed Author: reedy
Last Changed Rev: 4
Last Changed Date: 2010-11-21 22:45:30 +0000 (Sun, 21 Nov 2010)
Text Last Updated: 2010-11-21 22:45:37 +0000 (Sun, 21 Nov 2010)
Checksum: 9cdfb439c7876e703e307864c9167a15

Krinkle renamed this task from CR creates broken links to ViewVC to CodeReview links to ViewVC are broken for directories (works for files).Jan 26 2019, 5:37 PM
Krinkle removed a subscriber: wikibugs-l-list.
Aklapper changed the subtype of this task from "Task" to "Feature Request".Feb 4 2022, 11:01 AM