Coder Social home page Coder Social logo

Scrollable diff about icdiff HOT 10 CLOSED

jeffkaufman avatar jeffkaufman commented on June 16, 2024
Scrollable diff

from icdiff.

Comments (10)

jeffkaufman avatar jeffkaufman commented on June 16, 2024

Does piping the output into less -R do what you want?

from icdiff.

FloWi avatar FloWi commented on June 16, 2024

More or less ;-)

Works great for an overview.

But for larger diff's, it is necessary to let icdiff finish its streaming to less - otherwise I get a lot of exceptions from icdiff due to its broken pipe when I quit less.

close failed in file object destructor:
sys.excepthook is missing
lost sys.stderr
#--------------------------------------------
# multiple times
#--------------------------------------------
Traceback (most recent call last):
  File "/home/flwi/bin/icdiff/icdiff", line 531, in <module>
    lines_a, lines_b, headers[0], headers[1], context=(not options.whole_file), numlines=int(options.numlines)))
IOError: [Errno 32] Broken pipe
#--------------------------------------------
# multiple times
#--------------------------------------------
close failed in file object destructor:
sys.excepthook is missing
lost sys.stderr
#--------------------------------------------
# multiple times
#--------------------------------------------
Traceback (most recent call last):
  File "/home/flwi/bin/icdiff/icdiff", line 531, in <module>
    lines_a, lines_b, headers[0], headers[1], context=(not options.whole_file), numlines=int(options.numlines)))
IOError: [Errno 32] Broken pipe

from icdiff.

yamalight avatar yamalight commented on June 16, 2024

yes, this please!
broken pipe errors with less are a bit annoying.

from icdiff.

jeffkaufman avatar jeffkaufman commented on June 16, 2024

4228d6c fixes the broken pipe errors.

Is that enough or do we still want an integrated pager?

from icdiff.

yamalight avatar yamalight commented on June 16, 2024

still get following errors if I run icdiff as git difftool, pipe it to less and quit less before git passes all the files (so git difftool --no-prompt --extcmd icdiff | less for repo that has 4 relatively large changed files then q right away):

close failed in file object destructor:
sys.excepthook is missing
lost sys.stderr
close failed in file object destructor:
sys.excepthook is missing
lost sys.stderr

from icdiff.

jeffkaufman avatar jeffkaufman commented on June 16, 2024

@yamalight I haven't been able to reproduce the error you're seeing. It looks like http://stackoverflow.com/questions/12790328/how-to-silence-sys-excepthook-is-missing-error though, which isn't promising?

from icdiff.

yamalight avatar yamalight commented on June 16, 2024

@jeffkaufman yep, that's it. tried the solution provided in last reply, added sys.stdout.flush() to icdiff on line 532 - and it actually worked OK for me.

from icdiff.

jeffkaufman avatar jeffkaufman commented on June 16, 2024

Flushing stdout doesn't seem like it would break anything; committed 94ba182.

from icdiff.

yamalight avatar yamalight commented on June 16, 2024

awesome, works perfectly now!

from icdiff.

FloWi avatar FloWi commented on June 16, 2024

Cool, thx for fixing!

from icdiff.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.