D2577: mdiff: prefer xdiff for diff calculation

2018-03-03 Thread quark (Jun Wu)
quark commandeered this revision. quark added a reviewer: ryanmce. quark added a comment. Took the diffopts approach - note: merge conflicts improvements are gone since `mdiff.get_matching_blocks` is not covered. REPOSITORY rHG Mercurial REVISION DETAIL https://phab.mercurial-scm.org/D25

D2577: mdiff: prefer xdiff for diff calculation

2018-03-03 Thread indygreg (Gregory Szorc)
indygreg added inline comments. INLINE COMMENTS > quark wrote in mdiff.py:34 > The diff functions below do not have an `ui` object. Would you be okay if the > config is global? ex. something like > > # mdiff.py > def setdiffalgo(name): > global blocks > if name == 'xdiff': >

D2577: mdiff: prefer xdiff for diff calculation

2018-03-03 Thread ryanmce (Ryan McElroy)
ryanmce added inline comments. INLINE COMMENTS > quark wrote in mdiff.py:34 > The diff functions below do not have an `ui` object. Would you be okay if the > config is global? ex. something like > > # mdiff.py > def setdiffalgo(name): > global blocks > if name == 'xdiff': >

D2577: mdiff: prefer xdiff for diff calculation

2018-03-03 Thread quark (Jun Wu)
quark added inline comments. INLINE COMMENTS > durin42 wrote in mdiff.py:34 > Rather than this, let's try to get the xdiffblocks function (and if it's not > there set it to none), and then we could rework the below code to use > xdiffblocks instead of blocks if experimental.xdiff is set to true

D2577: mdiff: prefer xdiff for diff calculation

2018-03-03 Thread durin42 (Augie Fackler)
durin42 added inline comments. INLINE COMMENTS > mdiff.py:34 > > +try: > +from .cext import xdiff Rather than this, let's try to get the xdiffblocks function (and if it's not there set it to none), and then we could rework the below code to use xdiffblocks instead of blocks if experiment

D2577: mdiff: prefer xdiff for diff calculation

2018-03-02 Thread ryanmce (Ryan McElroy)
ryanmce created this revision. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers. REVISION SUMMARY Let's switch to xdiff for its better diff quality and faster performance! bdiff is still used as a fallback for cases xdiff isn't built, or the pure Python ve