Uploaded image for project: 'Subversion'
  1. Subversion
  2. SVN-3425

Links generated by ?r=/p= public URL schema aren't revision-sticky

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • trunk
    • 1.6.6
    • mod_dav_svn
    • None

    Description

      Hyrum Wright (hwright) reported the following on the dev@ list:
      
         I noticed when browsing a repository using the new ?r=REV syntax for
         GET, that the links generated by the page link to HEAD, not to the
         revision given by r=REV.
      
      He proposed a somewhat naive patch, and discussion ensued.  Here's the relavent
      bits of a revised proposal:
      
      Martin Furter wrote:
      > 
      > On Thu, 14 May 2009, C. Michael Pilato wrote:
      > 
      >> Ben Collins-Sussman wrote:
      >>> On Thu, May 14, 2009 at 3:18 PM, Branko Cibej <brane@xbc.nu> wrote:
      >>>
      >>>> IMHO he should use the exact same query string as was on the original
      >>>> URL. Anything else is guesswork, no?
      >>>
      >>> Er, this is tricky.  Suppose I type in "http://host/some/dir?p=x&r=y".
      >>>
      >>> This wil locate dir@p, then follow the directory back in time to
      >>> revision y (where it might exist at a different location).
      >>>
      >>> The children displayed in the output are therefore all being displayed
      >>> at revision Y, and at some (possibly new) path.   My first instinct is
      >>> to point out that they should all therefore have the ?p=y bit attached
      >>> to their hrefs, but this doesn't take into account the possibly new
      >>> parental path.  :-/
      >>
      >> You're right, this is tricky.  But I think the solution is as simple as
      >> behaving *literally* in the way we interpret the inputs semantically:
      >> respond to PATH?r=REV[&p=PEGREV] with a "301 Redirect" whose
      >> destination is
      >> the resolved, real location (path + rev) -- that is, REALPATH?p=PEGREV.
      > 
      > Shouldn't this be a "302 Moved Temporarily" since if r=HEAD it can point
      > to a different path later if it is replaced by something else?
      > 
      > (I guess if REV is not HEAD a 301 is perfectly fine.)
      > 
      > Martin
      

      Attachments

        1. 1_issue-3425-again-patch.txt
          1 kB
          C. Michael Pilato

        Issue Links

          Activity

            People

              cmpilato C. Michael Pilato
              cmpilato C. Michael Pilato
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: