Mercurial > hg
comparison mercurial/debugcommands.py @ 42041:3e47d1ec9da5
util: extract compression code in `mercurial.utils.compression`
The code seems large enough to be worth extracting. This is similar to what was
done for various module in `mercurial/utils/`.
Since None of the compression logic takes a `ui` objet, issuing deprecation
warning is tricky. Luckly the logic does not seems to have many external users.
author | Pierre-Yves David <pierre-yves.david@octobus.net> |
---|---|
date | Wed, 27 Mar 2019 16:45:14 +0100 |
parents | eec20025ada3 |
children | b63b8b7ca5fa |
comparison
equal
deleted
inserted
replaced
42040:02fa567f8a3c | 42041:3e47d1ec9da5 |
---|---|
80 wireprotoserver, | 80 wireprotoserver, |
81 wireprotov2peer, | 81 wireprotov2peer, |
82 ) | 82 ) |
83 from .utils import ( | 83 from .utils import ( |
84 cborutil, | 84 cborutil, |
85 compression, | |
85 dateutil, | 86 dateutil, |
86 procutil, | 87 procutil, |
87 stringutil, | 88 stringutil, |
88 ) | 89 ) |
89 | 90 |
1297 fm.write('compenginesavail', _('checking available compression engines ' | 1298 fm.write('compenginesavail', _('checking available compression engines ' |
1298 '(%s)\n'), | 1299 '(%s)\n'), |
1299 fm.formatlist(sorted(e.name() for e in compengines | 1300 fm.formatlist(sorted(e.name() for e in compengines |
1300 if e.available()), | 1301 if e.available()), |
1301 name='compengine', fmt='%s', sep=', ')) | 1302 name='compengine', fmt='%s', sep=', ')) |
1302 wirecompengines = util.compengines.supportedwireengines(util.SERVERROLE) | 1303 wirecompengines = compression.compengines.supportedwireengines( |
1304 compression.SERVERROLE) | |
1303 fm.write('compenginesserver', _('checking available compression engines ' | 1305 fm.write('compenginesserver', _('checking available compression engines ' |
1304 'for wire protocol (%s)\n'), | 1306 'for wire protocol (%s)\n'), |
1305 fm.formatlist([e.name() for e in wirecompengines | 1307 fm.formatlist([e.name() for e in wirecompengines |
1306 if e.wireprotosupport()], | 1308 if e.wireprotosupport()], |
1307 name='compengine', fmt='%s', sep=', ')) | 1309 name='compengine', fmt='%s', sep=', ')) |