##// END OF EJS Templates
merge with stable
Augie Fackler -
r45643:3a6ec080 merge default
parent child Browse files
Show More
@@ -56,6 +56,7 b' IGNORES = {'
56 '__builtin__',
56 '__builtin__',
57 'builtins',
57 'builtins',
58 'urwid.command_map', # for pudb
58 'urwid.command_map', # for pudb
59 'lzma',
59 }
60 }
60
61
61 _pypy = '__pypy__' in sys.builtin_module_names
62 _pypy = '__pypy__' in sys.builtin_module_names
@@ -189,7 +189,12 b' class tarit(object):'
189 name, pycompat.sysstr(mode), gzfileobj
189 name, pycompat.sysstr(mode), gzfileobj
190 )
190 )
191 else:
191 else:
192 return tarfile.open(name, pycompat.sysstr(mode + kind), fileobj)
192 try:
193 return tarfile.open(
194 name, pycompat.sysstr(mode + kind), fileobj
195 )
196 except tarfile.CompressionError as e:
197 raise error.Abort(pycompat.bytestr(e))
193
198
194 if isinstance(dest, bytes):
199 if isinstance(dest, bytes):
195 self.z = taropen(b'w:', name=dest)
200 self.z = taropen(b'w:', name=dest)
@@ -1061,3 +1061,14 b' def has_rustfmt():'
1061 return matchoutput(
1061 return matchoutput(
1062 '`rustup which --toolchain nightly rustfmt` --version', b'rustfmt'
1062 '`rustup which --toolchain nightly rustfmt` --version', b'rustfmt'
1063 )
1063 )
1064
1065
1066 @check("lzma", "python lzma module")
1067 def has_lzma():
1068 try:
1069 import _lzma
1070
1071 _lzma.FORMAT_XZ
1072 return True
1073 except ImportError:
1074 return False
@@ -576,12 +576,18 b' old file -- date clamped to 1980'
576
576
577 test xz support only available in Python 3.4
577 test xz support only available in Python 3.4
578
578
579 #if py3
579 #if lzma
580 $ hg archive ../archive.txz
580 $ hg archive ../archive.txz
581 $ which xz >/dev/null && xz -l ../archive.txz | head -n1 || true
581 $ which xz >/dev/null && xz -l ../archive.txz | head -n1 || true
582 Strms Blocks Compressed Uncompressed Ratio Check Filename (xz !)
582 Strms Blocks Compressed Uncompressed Ratio Check Filename (xz !)
583 $ rm -f ../archive.txz
583 $ rm -f ../archive.txz
584 #else
584 #endif
585 #if py3 no-lzma
586 $ hg archive ../archive.txz
587 abort: lzma module is not available
588 [255]
589 #endif
590 #if no-py3
585 $ hg archive ../archive.txz
591 $ hg archive ../archive.txz
586 abort: xz compression is only available in Python 3
592 abort: xz compression is only available in Python 3
587 [255]
593 [255]
General Comments 0
You need to be logged in to leave comments. Login now