#3961 Fix long unchanged code blocks in commit diffs

unreleased
invalid
nobody
None
General
nobody
2015-04-01
2012-03-28
Cory Johns
No

The patience diff algorithm is a bit too over eager about connecting change blocks in diff outputs. For example: https://sourceforge.net/p/allura/git/ci/ffd14b6b4dec78e2bd2da3c7b5413b8afa0e23b8/tree/Allura/allura/controllers/repository.py?diff=01acd51bdebf9f563a242720aef46df7d499211d

Long unchanged blocks should be elided in some fashion.

Related

Tickets: #3019

Discussion

  • Anonymous - 2012-04-14

    Originally by: kambi

    In my project (castle-engine, SVN repo), this makes the diff browser of Allura almost useless.

    The algorithm showing diffs connects two changed blocks very eagerly, often causing a trivial diff to look like a 1000-line diff (because of two small changes that happened to be at the very different places of a large file). It also tends to introduce additional code blocks, even where nothing changed.

    Example: see this very long page for the commit 11299: http://sourceforge.net/p/castle-engine/code/11299/ . And compare it with the actual pretty trivial change that is shown by "svn diff svn://svn.code.sf.net/p/castle-engine/code/trunk -r r11298:r11299". Changes to castlescenemanager.pas were very small (just 7 lines added, SVN diff has 2 blocks), yet Allura decided to show > 1000 lines of code (in > 10 blocks).

    If I may suggest, maybe it would be better to just show the colorized output of commands like "svn diff" or "git diff", instead of customized diff algorithm in Allura?

     
  • Dave Brondsema

    Dave Brondsema - 2012-04-18

    Dupe of [#3019]

     

    Related

    Tickets: #3019

  • Dave Brondsema

    Dave Brondsema - 2012-04-18
    • status: open --> invalid
    • milestone: forge-backlog --> forge-apr-20
     

Log in to post a comment.