Show More
@@ -887,6 +887,7 b' def perfrevlogchunks(ui, repo, file_=Non' | |||||
887 | see ``perfrevlog`` and ``perfrevlogrevision``. |
|
887 | see ``perfrevlog`` and ``perfrevlogrevision``. | |
888 | """ |
|
888 | """ | |
889 | rl = cmdutil.openrevlog(repo, 'perfrevlogchunks', file_, opts) |
|
889 | rl = cmdutil.openrevlog(repo, 'perfrevlogchunks', file_, opts) | |
|
890 | segmentforrevs = rl._chunkraw | |||
890 |
|
891 | |||
891 | # Verify engines argument. |
|
892 | # Verify engines argument. | |
892 | if engines: |
|
893 | if engines: | |
@@ -918,22 +919,22 b' def perfrevlogchunks(ui, repo, file_=Non' | |||||
918 | def doread(): |
|
919 | def doread(): | |
919 | rl.clearcaches() |
|
920 | rl.clearcaches() | |
920 | for rev in revs: |
|
921 | for rev in revs: | |
921 |
|
|
922 | segmentforrevs(rev, rev) | |
922 |
|
923 | |||
923 | def doreadcachedfh(): |
|
924 | def doreadcachedfh(): | |
924 | rl.clearcaches() |
|
925 | rl.clearcaches() | |
925 | fh = rlfh(rl) |
|
926 | fh = rlfh(rl) | |
926 | for rev in revs: |
|
927 | for rev in revs: | |
927 |
|
|
928 | segmentforrevs(rev, rev, df=fh) | |
928 |
|
929 | |||
929 | def doreadbatch(): |
|
930 | def doreadbatch(): | |
930 | rl.clearcaches() |
|
931 | rl.clearcaches() | |
931 |
|
|
932 | segmentforrevs(revs[0], revs[-1]) | |
932 |
|
933 | |||
933 | def doreadbatchcachedfh(): |
|
934 | def doreadbatchcachedfh(): | |
934 | rl.clearcaches() |
|
935 | rl.clearcaches() | |
935 | fh = rlfh(rl) |
|
936 | fh = rlfh(rl) | |
936 |
|
|
937 | segmentforrevs(revs[0], revs[-1], df=fh) | |
937 |
|
938 | |||
938 | def dochunk(): |
|
939 | def dochunk(): | |
939 | rl.clearcaches() |
|
940 | rl.clearcaches() | |
@@ -1002,6 +1003,7 b' def perfrevlogrevision(ui, repo, file_, ' | |||||
1002 | raise error.CommandError('perfrevlogrevision', 'invalid arguments') |
|
1003 | raise error.CommandError('perfrevlogrevision', 'invalid arguments') | |
1003 |
|
1004 | |||
1004 | r = cmdutil.openrevlog(repo, 'perfrevlogrevision', file_, opts) |
|
1005 | r = cmdutil.openrevlog(repo, 'perfrevlogrevision', file_, opts) | |
|
1006 | segmentforrevs = r._chunkraw | |||
1005 | node = r.lookup(rev) |
|
1007 | node = r.lookup(rev) | |
1006 | rev = r.rev(node) |
|
1008 | rev = r.rev(node) | |
1007 |
|
1009 | |||
@@ -1033,7 +1035,7 b' def perfrevlogrevision(ui, repo, file_, ' | |||||
1033 | def doread(chain): |
|
1035 | def doread(chain): | |
1034 | if not cache: |
|
1036 | if not cache: | |
1035 | r.clearcaches() |
|
1037 | r.clearcaches() | |
1036 |
|
|
1038 | segmentforrevs(chain[0], chain[-1]) | |
1037 |
|
1039 | |||
1038 | def dorawchunks(data, chain): |
|
1040 | def dorawchunks(data, chain): | |
1039 | if not cache: |
|
1041 | if not cache: | |
@@ -1061,7 +1063,7 b' def perfrevlogrevision(ui, repo, file_, ' | |||||
1061 | r.revision(node) |
|
1063 | r.revision(node) | |
1062 |
|
1064 | |||
1063 | chain = r._deltachain(rev)[0] |
|
1065 | chain = r._deltachain(rev)[0] | |
1064 |
data = |
|
1066 | data = segmentforrevs(chain[0], chain[-1])[1] | |
1065 | rawchunks = getrawchunks(data, chain) |
|
1067 | rawchunks = getrawchunks(data, chain) | |
1066 | bins = r._chunks(chain) |
|
1068 | bins = r._chunks(chain) | |
1067 | text = str(bins[0]) |
|
1069 | text = str(bins[0]) |
General Comments 0
You need to be logged in to leave comments.
Login now