[WebSVN issue] [Issue 256] New - Diff fails for files which have been moved

View: New views
12 Messages — Rating Filter:   Alert me  

[WebSVN issue] [Issue 256] New - Diff fails for files which have been moved

by Bob Kline :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

http://websvn.tigris.org/issues/show_bug.cgi?id=256
                 Issue #|256
                 Summary|Diff fails for files which have been moved
               Component|websvn
                 Version|2.2.1
                Platform|All
              OS/Version|All
                     URL|
                  Status|NEW
       Status whiteboard|
                Keywords|
              Resolution|
              Issue type|DEFECT
                Priority|P2
            Subcomponent|Unknown
             Assigned to|issues@websvn
             Reported by|bkline






------- Additional comments from bkline@... Mon Oct  5 14:57:04 -0700 2009 -------
We have a repo which we converted from cvs using cvs2svn.  After the conversion
we took advantage of Subversion's superior support for moving files to modify
the structure of the directories in the repository.  So, for example, what used
to be at

  $SVNBASE/trunk/cdr/Validation/Schemas

is now located at

  $SVNBASE/trunk/Schemas

Unfortunately, websvn is unable to provide a diff for older versions of files in
that directory unless the user manually fixes path locations which websvn gets
wrong.  For example, bringing up the "View Logs" page for one of the files in
that directory shows (in the first and last columns):

9235  /trunk/Schemas/CTGovProtocol.xml
9213  /trunk/Validation/Schemas/CTGovProtocol.xml
9173  /trunk/Validation/Schemas/CTGovProtocol.xml
9172  /trunk/Validation/Schemas/CTGovProtocol.xml
8816  /trunk/Validation/Schemas/CTGovProtocol.xml
....  ...........................................

In other words, all revisions except the youngest are shown with the same path.
 For whatever reason, the scripts which moved this directory did so in two
phases.  The first created revision 9213 moving the directory from
/trunk/cdr/Validation/Schemas to /trunk/Validation/Schemas; the second, creating
revision 9235, moved the directory from /trunk/Validation/Schemas to
/trunk/Schemas.  So the path on the top row of the page is correct, as is the
path on the second row, but all of the other paths are wrong.  The result is
that clicking on "Compare Revisions" results in empty output for the diff for
any pair of those older revisions.

Subversion itself knows where the paths are for the earlier versions; the
following command produces the correct diff output:

$ svn diff $SVNTRUNK/Schemas/CTGovProtocol.xml -r8816:9173

I have what may (or may not) be a clue about the cause of the problem.  When I
click on the "Next" link at the bottom of the log page for the file, I get the
following error message:

================================= snip ======================================
Error running this command: "svn --non-interactive --config-dir /tmp log --xml
--verbose -r4934:4314
"file:///d:/VisualSVN/Repositories/CDR/trunk/Schemas/CTGovProtocol.xml@4934""

svn: File not found: revision 4934, path '/trunk/Schemas/CTGovProtocol.xml'
================================= snip ======================================

It's not surprising that embedding the older revision number in the URL with a
path which matches the HEAD revision won't find anything in this case.  If the
command quoted in the error message is submitted without the revision number
embedded in the URL websvn would get back from Subversion everything it needs
(including correct paths for each of the revisions of the file).

------------------------------------------------------
http://websvn.tigris.org/ds/viewMessage.do?dsForumId=2390&dsMessageId=2403891

[WebSVN issue] [Issue 256] Diff fails for files which have been moved

by Quinn Taylor :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

http://websvn.tigris.org/issues/show_bug.cgi?id=256






------- Additional comments from quinntaylor@... Mon Oct  5 15:49:15 -0700 2009 -------
My first question is whether this occurs with the trunk version, or just with 2.2.1, since we've made lots of
changes in this area since then. (I don't rule out the possibility that not everything works yet, but it should
be much better on the whole.)

------------------------------------------------------
http://websvn.tigris.org/ds/viewMessage.do?dsForumId=2390&dsMessageId=2403905

[WebSVN issue] [Issue 256] Diff fails for files which have been moved

by Bob Kline :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

http://websvn.tigris.org/issues/show_bug.cgi?id=256






------- Additional comments from bkline@... Mon Oct  5 17:14:23 -0700 2009 -------
I have tested against 2.2.1 (as reported) as well as 2.0.  I'll see if I can set
up a test version using the latest trunk code.  May take me a few days.  Will
report back.

It is easily reproducible, though.  Set up a test repo.  Add files at
/trunk/a/b/c.  Then perform two moves:

 $ svn move $BASEURL/trunk/a/b $BASEURL/trunk/b -m "First relocation"
 $ svn move $BASEURL/trunk/b/c $BASEURL/trunk/c -m "Second move"

Then bring up the "View Log" page for /trunk/c/foo and look at the paths.

------------------------------------------------------
http://websvn.tigris.org/ds/viewMessage.do?dsForumId=2390&dsMessageId=2403917

[WebSVN issue] [Issue 256] Diff fails for files which have been moved

by Bob Kline :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

http://websvn.tigris.org/issues/show_bug.cgi?id=256






------- Additional comments from bkline@... Mon Oct  5 19:55:24 -0700 2009 -------
I found a box I could test this on using the trunk snapshot (sooner than I
expected I would be able to).  It appears that the original bug I reported has
been corrected in the trunk.  However, the second failure I reported (because I
thought it might provide a clue in tracking down the cause of the diff bug) is
still happening (when you click on the "Next" link on the "View Log" page):

================================= snip ======================================
Error running this command:

svn --non-interactive --config-dir /tmp log --xml --verbose -r4934:4228
'file:///home/bkline/Packages/svnrepo/trunk/Schemas/CTGovProtocol.xml@4934'

File not found: revision 4934, path '/trunk/Schemas/CTGovProtocol.xml'
================================= snip ======================================

So, unless that's a known bug reported elsewhere, I guess you have the options
of hijacking this bug report and redirecting it to the problem which still
remains, or creating a separate tracker issue for that defect, or having me file
a new bug report.

Can I tell our systems administrator that he can expect the fix in trunk for the
first bug to be included with the next release of websvn?  What release will
that be?  Do you have a target date for it?

------------------------------------------------------
http://websvn.tigris.org/ds/viewMessage.do?dsForumId=2390&dsMessageId=2403929

[WebSVN issue] [Issue 256] Diff fails for files which have been moved

by Bob Kline :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

http://websvn.tigris.org/issues/show_bug.cgi?id=256






------- Additional comments from bkline@... Tue Oct  6 01:54:11 -0700 2009 -------
Is it really necessary to set the $pegrev variable in the getLog() function?  I
found that if I eliminated it the failure reported in the previous comment went
away, and as far as I can tell nothing else broke (though someone with much more
familiarity with this code needs to make that determination).  Patch to follow.

------------------------------------------------------
http://websvn.tigris.org/ds/viewMessage.do?dsForumId=2390&dsMessageId=2403987

[WebSVN issue] [Issue 256] Diff fails for files which have been moved

by Bob Kline :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

http://websvn.tigris.org/issues/show_bug.cgi?id=256



User bkline changed the following:

                What    |Old value                 |New value
================================================================================
     Attachment is patch|                          |Created an attachment (id=
                        |                          |127)
Patch which eliminate
                        |                          |s embedding of revision nu
                        |                          |mber in URL for svn log co
                        |                          |mmand

--------------------------------------------------------------------------------




------- Additional comments from bkline@... Tue Oct  6 01:56:24 -0700 2009 -------
Created an attachment (id=127)
Patch which eliminates embedding of revision number in URL for svn log command

------------------------------------------------------
http://websvn.tigris.org/ds/viewMessage.do?dsForumId=2390&dsMessageId=2403989

[WebSVN issue] [Issue 256] Diff fails for files which have been moved

by Quinn Taylor :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

http://websvn.tigris.org/issues/show_bug.cgi?id=256






------- Additional comments from quinntaylor@... Tue Oct  6 08:09:33 -0700 2009 -------
Thanks for submitting a patch. I'll review it when I get a chance to see if it breaks other behavior.

Bottom line, yes, sometimes it is necessary to set the peg revision, and other times not. It's a tricky set of
circumstances, and something I've worked a lot to improve for the upcoming 2.3.0 release. (I'm sure there
are inconsistencies between the various PHP pages...) We have plans to further refactor this behavior into a
separate function that handles all the strange cases to ensure that we can always count on getting the
correct data back if a resource does in fact exist at a given revision.

------------------------------------------------------
http://websvn.tigris.org/ds/viewMessage.do?dsForumId=2390&dsMessageId=2404130

[WebSVN issue] [Issue 256] Diff fails for files which have been moved

by Dirk Thomas :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

http://websvn.tigris.org/issues/show_bug.cgi?id=256



User dirkthomas changed the following:

                What    |Old value                 |New value
================================================================================
                  Status|NEW                       |STARTED
--------------------------------------------------------------------------------




------- Additional comments from dirkthomas@... Wed Nov 18 09:04:11 -0800 2009 -------
I have looked a little bit deeper into this issue.
Omitting the peg revision as described in the patch is not a feasible solution
as it will break other scenarios.

But i have added the peg revision parmeter for links to subsequent pages.
Therefore it is assured that the path (which might be different in an older
revision) is still found.

Could you please try the latest SVN trunk and check if it works for you now?
Thank you for reporting back.

------------------------------------------------------
http://websvn.tigris.org/ds/viewMessage.do?dsForumId=2390&dsMessageId=2419607

[WebSVN issue] [Issue 256] Diff fails for files which have been moved

by Bob Kline :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

http://websvn.tigris.org/issues/show_bug.cgi?id=256






------- Additional comments from bkline@... Thu Nov 19 06:33:46 -0800 2009 -------
I tested with R 971, and the problem (that is the second bug, failure when
navigating between pages for the log entries of a file's revisions) appears to
be solved.  I see you've made extensive modifications to include/svnlook.php
since I submitted my patch.  I take that as encouraging evidence of the
project's healthy level of activity.  Can I ask again the question I floated
earlier, about whether I can give our systems administration staff any heads-up
about when the fixes for these two bugs might be included in an official release?

Thanks!

------------------------------------------------------
http://websvn.tigris.org/ds/viewMessage.do?dsForumId=2390&dsMessageId=2420059

Re: [WebSVN issue] [Issue 256] Diff fails for files which have been moved

by Dirk Thomas :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi Bob,

> ------- Additional comments from bkline@... Thu Nov 19 06:33:46 -0800 2009 -------
> I tested with R 971, and the problem (that is the second bug, failure when
> navigating between pages for the log entries of a file's revisions) appears to
> be solved.

Thank you for reporting back.

> I see you've made extensive modifications to include/svnlook.php
> since I submitted my patch.  I take that as encouraging evidence of the
> project's healthy level of activity.  Can I ask again the question I floated
> earlier, about whether I can give our systems administration staff any heads-up
> about when the fixes for these two bugs might be included in an official release?

The next release - named 2.3.0 - will be done very soon.
It should be available within the next week (if nothing severe will pop up).

Dirk

------------------------------------------------------
http://websvn.tigris.org/ds/viewMessage.do?dsForumId=2390&dsMessageId=2420065

[WebSVN issue] [Issue 256] Diff fails for files which have been moved

by Dirk Thomas :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

http://websvn.tigris.org/issues/show_bug.cgi?id=256



User dirkthomas changed the following:

                What    |Old value                 |New value
================================================================================
                  Status|STARTED                   |RESOLVED
--------------------------------------------------------------------------------
              Resolution|                          |FIXED
--------------------------------------------------------------------------------




------- Additional comments from dirkthomas@... Thu Nov 19 06:51:52 -0800 2009 -------
Marking the issue as solved.

------------------------------------------------------
http://websvn.tigris.org/ds/viewMessage.do?dsForumId=2390&dsMessageId=2420066

[WebSVN issue] [Issue 256] Diff fails for files which have been moved

by Dirk Thomas :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

http://websvn.tigris.org/issues/show_bug.cgi?id=256



User dirkthomas changed the following:

                What    |Old value                 |New value
================================================================================
                  Status|RESOLVED                  |CLOSED
--------------------------------------------------------------------------------




------- Additional comments from dirkthomas@... Thu Nov 19 10:56:41 -0800 2009 -------
Closing issue.

------------------------------------------------------
http://websvn.tigris.org/ds/viewMessage.do?dsForumId=2390&dsMessageId=2420168