#3019 Mercurial diff shows unchanged sections [22196]

v1.0.0
closed
nobody
General
2015-08-20
2011-10-17
Chris Tsai
No

https://sourceforge.net/apps/trac/sourceforge/ticket/22196

The diff at https://sourceforge.net/u/simonjwright/nuweb/code/ci/1d2874647acfd2ff1b9f5b9475718fe4a6f3d3b9/tree/nuweb.py?diff=33d2580649bbffcffd1c653c06d0a3eec8b20d4f shows a lot of "difference" sections which are in fact unchanged.

The equivalent non-beta diff at http://nuweb.hg.sourceforge.net/hgweb/nuweb/nuweb.py/rev/1d2874647acf only shows the sections that have actually changed (I decided that this should really be a developer project for the time being, which is why the same code appears in two places).

We should evaluate the 'patience' diff algorithm we currently use, and see if there's a way to make it not have so many unchanged lines. If that isn't feasible, we can switch to use python's difflib instead of the patience algorithm.

Related

Tickets: #3019
Tickets: #3961

Discussion

  • Dave Brondsema

    Dave Brondsema - 2012-04-18
    • milestone: forge-backlog --> forge-may-04
     
  • Dave Brondsema

    Dave Brondsema - 2012-04-18

    See [#3961] for more info too.

     

    Related

    Tickets: #3961

  • Dave Brondsema

    Dave Brondsema - 2012-04-20
    • size: --> 2
     
  • Dave Brondsema

    Dave Brondsema - 2012-05-09
    • labels: support --> support, 42cc
    • Description has changed:

    Diff:

    --- old 
    +++ new 
    @@ -3,3 +3,5 @@
     >The diff at https://sourceforge.net/u/simonjwright/nuweb/code/ci/1d2874647acfd2ff1b9f5b9475718fe4a6f3d3b9/tree/nuweb.py?diff=33d2580649bbffcffd1c653c06d0a3eec8b20d4f shows a lot of "difference" sections which are in fact unchanged.
    
     >The equivalent non-beta diff at http://nuweb.hg.sourceforge.net/hgweb/nuweb/nuweb.py/rev/1d2874647acf only shows the sections that have actually changed (I decided that this should really be a developer project for the time being, which is why the same code appears in two places).
    +
    +We should evaluate the 'patience' diff algorithm we currently use, and see if there's a way to make it not have so many unchanged lines.  If that isn't feasible, we can switch to use python's difflib instead of the patience algorithm.
    
     
  • Anonymous - 2012-05-10

    Originally by: *anonymous

    Created #49: [3019] Do not show unchanged lines in diffs (3cp)

     
  • Anonymous - 2012-05-11

    Originally by: tramadolmen

    I have removed custom SequenceMatcher only for code comparison and diff works fine. Hope it not cause a mistake.

     
  • Yaroslav Luzin - 2012-05-14

    Closed #49 - changes are in 42cc_3019

    Just replaced patiance.SequenceMatcher with difflib.SequenceMatcher and it looks much better

     
  • Dave Brondsema

    Dave Brondsema - 2012-05-14
    • status: open --> code-review
     
  • Dave Brondsema

    Dave Brondsema - 2012-05-14
    • status: code-review --> open
     
  • Dave Brondsema

    Dave Brondsema - 2012-05-14

    This change means that most of patience.py is unused. Why don't we just use difflib.unified_diff everywhere we currently use patience.unified_diff? Then delete patience.py so we don't have unused code lying around.

     
  • Yaroslav Luzin - 2012-05-15

    OK, we'll do that in #53: [#3019] Replace patience with difflib (1cp)

     

    Related

    Tickets: #3019

  • Yaroslav Luzin - 2012-05-16

    Done. Closed #53 and pushed changes back to 42cc_3019

     
  • Yaroslav Luzin - 2012-05-16
    • status: open --> code-review
     
  • Dave Brondsema

    Dave Brondsema - 2012-05-21
    • status: code-review --> closed
    • qa: Dave Brondsema…
    • size: 2 --> 0
    • milestone: forge-backlog --> forge-jun-01
     

Log in to post a comment.