Mercurial > public > mercurial-scm > hg-stable
diff tests/test-hybridencode.py @ 17690:eb7f8359249a
test-hybridencode: in practice, extensions aren't really unbound in length
due to the fact that we only get to encode files ending in .i and .d inside
the store
author | Adrian Buehlmann <adrian@cadifra.com> |
---|---|
date | Sun, 30 Sep 2012 23:53:56 +0200 |
parents | 57bf86677daa |
children | 8c019d2fd7c0 |
line wrap: on
line diff
--- a/tests/test-hybridencode.py Mon Oct 01 21:54:04 2012 +0200 +++ b/tests/test-hybridencode.py Sun Sep 30 23:53:56 2012 +0200 @@ -414,44 +414,49 @@ '678/12345678/12 /xx-xxxxxxxxx-xxxxxxxxx-xxxxxxxxx-' '123456789-123456') -print "extensions are replicated on hashed paths (unbounded!)" +print '''Extensions are replicated on hashed paths. Note that +we only get to encode files that end in .i or .d inside the +store. Encoded filenames are thus bound in length.''' show('data/12345678/12345678/12345678/12345678/12345678/12345' '678/12345678/12345/-xxxxxxxxx-xxxxxxxxx-xxxxxxxxx-' - '123456789-12.345') + '123456789-12.345.i') show('data/12345678/12345678/12345678/12345678/12345678/12345' '678/12345678/12345/-xxxxxxxxx-xxxxxxxxx-xxxxxxxxx-' - '123456789-12.3456') + '123456789-12.345.d') show('data/12345678/12345678/12345678/12345678/12345678/12345' '678/12345678/12345/-xxxxxxxxx-xxxxxxxxx-xxxxxxxxx-' - '123456789-12.34567') + '123456789-12.3456.i') show('data/12345678/12345678/12345678/12345678/12345678/12345' '678/12345678/12345/-xxxxxxxxx-xxxxxxxxx-xxxxxxxxx-' - '123456789-12.345678') + '123456789-12.34567.i') +show('data/12345678/12345678/12345678/12345678/12345678/12345' + '678/12345678/12345/-xxxxxxxxx-xxxxxxxxx-xxxxxxxxx-' + '123456789-12.345678.i') show('data/12345678/12345678/12345678/12345678/12345678/12345' '678/12345678/12345/-xxxxxxxxx-xxxxxxxxx-xxxxxxxxx-' - '123456789-12.3456789') + '123456789-12.3456789.i') show('data/12345678/12345678/12345678/12345678/12345678/12345' '678/12345678/12345/-xxxxxxxxx-xxxxxxxxx-xxxxxxxxx-' - '123456789-12.3456789-') + '123456789-12.3456789-.i') show('data/12345678/12345678/12345678/12345678/12345678/12345' '678/12345678/12345/-xxxxxxxxx-xxxxxxxxx-xxxxxxxxx-' - '123456789-12.3456789-1') + '123456789-12.3456789-1.i') show('data/12345678/12345678/12345678/12345678/12345678/12345' '678/12345678/12345/-xxxxxxxxx-xxxxxxxxx-xxxxxxxxx-' - '123456789-12.3456789-12') + '123456789-12.3456789-12.i') show('data/12345678/12345678/12345678/12345678/12345678/12345' '678/12345678/12345/-xxxxxxxxx-xxxxxxxxx-xxxxxxxxx-' - '123456789-12.3456789-123') + '123456789-12.3456789-123.i') show('data/12345678/12345678/12345678/12345678/12345678/12345' '678/12345678/12345/-xxxxxxxxx-xxxxxxxxx-xxxxxxxxx-' - '123456789-12.3456789-1234') + '123456789-12.3456789-1234.i') show('data/12345678/12345678/12345678/12345678/12345678/12345' '678/12345678/12345/-xxxxxxxxx-xxxxxxxxx-xxxxxxxxx-' - '123456789-12.3456789-12345') + '123456789-12.3456789-12345.i') show('data/12345678/12345678/12345678/12345678/12345678/12345' '678/12345678/12345/-xxxxxxxxx-xxxxxxxxx-xxxxxxxxx-' '123456789-12.3456789-12345-ABCDEFGHIJKLMNOPRSTUVWX' 'YZ-abcdefghjiklmnopqrstuvwxyz-ABCDEFGHIJKLMNOPRSTU' 'VWXYZ-1234567890-xxxxxxxxx-xxxxxxxxx-xxxxxxxx-xxxx' 'xxxxx-wwwwwwwww-wwwwwwwww-wwwwwwwww-wwwwwwwww-wwww' - 'wwwww-wwwwwwwww-wwwwwwwww-wwwwwwwww-wwwwwwwww') + 'wwwww-wwwwwwwww-wwwwwwwww-wwwwwwwww-wwwwwwwww.i')