##// END OF EJS Templates
phabsend: detect patch change with larger context...
phabsend: detect patch change with larger context Previously phabsend has an optimization that will skip uploading a diff if the patch (with context line number = 1) remains unchanged. That could be confusing: Aug 24 15:52:28 <martinvonz> phillco: something is wrong with phabricator'your patches/ Aug 24 15:52:45 <martinvonz> ... with phabricator's view of your patches again Aug 24 15:53:38 <martinvonz> if i phabread D388 and then D399, i get a version of filemerge.py with "a, b, c" somewhere on line 344, which is not what phabricator shows for D399 Aug 24 15:53:51 <martinvonz> junw: maybe that's more for you ^ Fix that by checking context with 32767 lines, which is the same as what will be actually sent. Differential Revision: https://phab.mercurial-scm.org/D512

File last commit:

r30895:c32454d6 default
r33978:27ff2a87 default
Show More
test_estimate_sizes.py
22 lines | 512 B | text/x-python | PythonLexer
try:
import unittest2 as unittest
except ImportError:
import unittest
import zstd
from . common import (
make_cffi,
)
@make_cffi
class TestSizes(unittest.TestCase):
def test_decompression_size(self):
size = zstd.estimate_decompression_context_size()
self.assertGreater(size, 100000)
def test_compression_size(self):
params = zstd.get_compression_parameters(3)
size = zstd.estimate_compression_context_size(params)
self.assertGreater(size, 100000)