Menu

#11 Fix parallel view in with perforce diff.

open
nobody
None
5
2007-07-17
2007-07-17
No

parallel

Discussion

  • Russell Cattelan

     
  • Russell Cattelan

    Logged In: YES
    user_id=209337
    Originator: YES

    There is a small bug with parallel when using a perforce repository,
    actually this seem to be broken for any repo.

    When doing a parallel view codestriker will pull the current version of
    the file from perforce and placing each line of the file into an array.

    When codestriker is displaying the common parts of the file when doing
    a side by side diff it was using the run line number of the previous
    version of the file.
    Since the line numbers and the actual lines in the array do not
    correspond now this resulted in missing lines.

    Patch attached.

    Also added a check to make sure there are actual lines in the file array
    since a failed p4 print would result in an empty array and then a side
    by side diff with a bunch of blank lines.

    File Added: ViewTopicFile.patch

     
  • David Sitsky

    David Sitsky - 2007-08-25

    Logged In: YES
    user_id=208928
    Originator: NO

    Something else is wrong here - this patch breaks my parallel views.

    Can you show me what you mean? For example, in the example topic on SF at http://codestriker.sourceforge.net/cgi-bin/codestriker.pl?topic=7063366&action=view, do you think the parallel view broken there?

    Perhaps the issue is in how Codestriker parsed a Perforce diff file. This code has been like this for ages. Can you send me your before and after parallel views for an example file which had an issue? Thanks.

    Cheers,
    David

     
  • Russell Cattelan

    Logged In: YES
    user_id=209337
    Originator: YES

    I'll see if I can generate some examples you can look at.

    The stuff I have currently is all internal stuff and not really available for external viewing.

    The problem is definitely with the display code.
    I assume you are doing this against a cvs tree?

    Maybe the problem is which file CS picks to yank out of perforce vs cvs.
    Currently the problems is that the newest version of the file is pulled from
    perforce but the parallel viewer uses a line counter based on the previous file.

    I'll look at the cvs code for pulling a file and see what it is doing.

     
  • David Sitsky

    David Sitsky - 2007-08-30

    Logged In: YES
    user_id=208928
    Originator: NO

    Ah yes - well that would be the problem. It should be pulling out the older revision from the depot. I haven't got time now, but maybe that can give you a clue where the real bug lies.

    Cheers,
    David

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.