Mercurial > hg
comparison contrib/perf.py @ 32202:ded48ad55146
bdiff: proxy through mdiff module
See the previous commit for why.
mdiff seems a good place to host bdiff functions. bdiff.bdiff was already
aliased as textdiff, so we use it.
author | Yuya Nishihara <yuya@tcha.org> |
---|---|
date | Wed, 26 Apr 2017 22:03:37 +0900 |
parents | f6d77af84ef3 |
children | 6b582f9b6e5e |
comparison
equal
deleted
inserted
replaced
32201:4462a981e8df | 32202:ded48ad55146 |
---|---|
24 import os | 24 import os |
25 import random | 25 import random |
26 import sys | 26 import sys |
27 import time | 27 import time |
28 from mercurial import ( | 28 from mercurial import ( |
29 bdiff, | |
30 changegroup, | 29 changegroup, |
31 cmdutil, | 30 cmdutil, |
32 commands, | 31 commands, |
33 copies, | 32 copies, |
34 error, | 33 error, |
810 dp = r.deltaparent(rev) | 809 dp = r.deltaparent(rev) |
811 textpairs.append((r.revision(dp), r.revision(rev))) | 810 textpairs.append((r.revision(dp), r.revision(rev))) |
812 | 811 |
813 def d(): | 812 def d(): |
814 for pair in textpairs: | 813 for pair in textpairs: |
815 bdiff.bdiff(*pair) | 814 mdiff.textdiff(*pair) |
816 | 815 |
817 timer, fm = gettimer(ui, opts) | 816 timer, fm = gettimer(ui, opts) |
818 timer(d) | 817 timer(d) |
819 fm.end() | 818 fm.end() |
820 | 819 |