darcs

Issue 649 darcs.cgi: bad links for directories that don't appear in pristine

Title darcs.cgi: bad links for directories that don't appear in pristine
Priority bug Status wont-fix
Milestone Resolved in
Superseder Nosy List darcs-devel, dmitry.kurochkin, kowey, limare, markstos, thorkilnaur, tommy
Assigned To
Topics

Created on 2008-02-07.17:29:42 by limare, last changed 2009-09-11.08:27:53 by kowey.

Messages
msg3185 (view) Author: limare Date: 2008-02-07.17:29:40
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

from http://darcs.net/cgi-bin/darcs.cgi/stable/debian?c=patches or
http://darcs.net/cgi-bin/darcs.cgi/stable/debian/?c=patches (note the
trailing slash) you get for the first (oldest) patch a link to
http://darcs.net/cgi-bin/darcs.cgi/stable/debian?c=annotate&p=20030301134611-e9342-23bac40309679b53a63d2edca43f7f0a2591a6ab.gz&ch=20030301134611-e9342-23bac40309679b53a63d2edca43f7f0a2591a6ab.gz&o=./debian

On this page, "annotate" links are broken; The problem seems to be that
a "/" is missing at the end of the "o" parameter. It is very annoying
for browsing the repo through the cgi.

I ran some diff between my version (1.0.9, debian stable) and the last
unstable version, and the only change seems to be the site url
(abridgegame -> darcs).

- --
Nicolas LIMARE             labo. j-l lions - univ. pierre et marie curie
limare@ann.jussieu.fr                 http://www.ann.jussieu.fr/~limare/
+33 (0) 144 272 721         175 rue du chevaleret - 75013 paris - france

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)

iD8DBQFHqn1mvviFAPpCP08RAtm/AJ9gZ2MqukTNJehwP39DXIBn/ayWqACgkUPh
QCp6+TdIWreUGr2NZ0SsN+g=
=+EML
-----END PGP SIGNATURE-----
msg3225 (view) Author: markstos Date: 2008-02-08.03:08:19
I tracked down the bug, but I haven't decided how to fix it. Input welcome on
that. The bug is in these lines:

            # check if last element of path, stored in $file, is really a dir
            if (-d (pristine_dir ($repo) . "/${dir}/${file}")) {

It assumes that a directory will always exist as a directory in the pristine
directory, but that is not true if the pristine directory is missing, or if the
directory has since been renamed (which is the case with the debian directory).

I suppose to really fix this we have to make a call to darcs to ask "was this
path ever a directory?". I'm not sure how to do that. 

Ideally, we could find a performance-friendly way to do this for all the files
and directories being reviewed on a page.
msg8637 (view) Author: kowey Date: 2009-09-02.14:29:42
In general, the darcs.cgi script has gone through a certain amount of bitrot.  I
nominate this for wont-fix and the script for removal.  

(I'm not too sure what our policy should be contribs.  Perhaps we should require
that they be maintained or deleted)
msg8640 (view) Author: markstos Date: 2009-09-02.14:48:53
On Wed, 02 Sep 2009 14:29:44 +0000
Eric Kow <bugs@darcs.net> wrote:

> 
> Eric Kow <kowey@darcs.net> added the comment:
> 
> In general, the darcs.cgi script has gone through a certain amount of bitrot.  I
> nominate this for wont-fix and the script for removal.  
> 
> (I'm not too sure what our policy should be contribs.  Perhaps we should require
> that they be maintained or deleted)

I think that's a reasonble policy. If it's going to be deleted, will there an official
recommendation about an alternate web-based repo browser to use instead?

    Mark
msg8777 (view) Author: markstos Date: 2009-09-09.19:21:22
So, in the hashed format, is it possible to query darcs in such a way that this
can still work?

The question we need to ask darcs is: "was this path ever a directory?".
msg8787 (view) Author: kowey Date: 2009-09-11.08:27:50
Hi Mark,

Thanks for continuing to look into this.  Unfortunately, we have adopted the
maintained-or-dropped policy for contribs, so after checking with Will, I've
submitted patch getting rid of the cgi script.  So it's staying wont-fix until
somebody steps up to the plate.

If you're interested in the problem, I would investigate how darcsweb and
trac-darcs deal with the problem at all.  Also, it may be worth thinking up a
general feature request for darcs which may help.  I can't really think of one
off the top of my head.  Perhaps you could parse the changes output, looking for
adddir patches (but then you'll also have to check for renames)
History
Date User Action Args
2008-02-07 17:29:42limarecreate
2008-02-07 17:38:57markstossetpriority: bug
nosy: + limare, - limare
2008-02-07 19:35:42markstoslinkissue651 superseder
2008-02-08 03:08:22markstossetstatus: unread -> unknown
topic: + Confirmed
title: bad folder urls in darcs.cgi -> darcs.cgi: bad links for directories that don't appear in pristine
messages: + msg3225
nosy: + markstos
2008-02-16 22:15:55markstossetstatus: unknown -> has-patch
nosy: droundy, tommy, beschmi, kowey, markstos, limare
topic: + Darcs2
2009-08-06 17:53:22adminsetnosy: + jast, Serware, dmitry.kurochkin, darcs-devel, zooko, dagit, mornfall, simon, thorkilnaur, - droundy, limare
2009-08-06 20:56:43adminsetnosy: - beschmi
2009-08-10 22:13:29adminsetnosy: + limare, - darcs-devel, zooko, jast, dagit, Serware, mornfall
2009-08-25 18:04:48adminsetnosy: + darcs-devel, - simon
2009-08-27 13:55:44adminsetnosy: tommy, kowey, markstos, darcs-devel, thorkilnaur, limare, dmitry.kurochkin
2009-09-02 14:29:44koweysetstatus: has-patch -> wont-fix
nosy: + limare, - limare
topic: - Confirmed, Darcs2
messages: + msg8637
2009-09-02 14:48:55markstossetnosy: tommy, kowey, markstos, darcs-devel, thorkilnaur, limare, dmitry.kurochkin
messages: + msg8640
2009-09-09 19:21:24markstossetnosy: tommy, kowey, markstos, darcs-devel, thorkilnaur, limare, dmitry.kurochkin
messages: + msg8777
2009-09-11 08:27:53koweysetnosy: tommy, kowey, markstos, darcs-devel, thorkilnaur, limare, dmitry.kurochkin
messages: + msg8787