Patchwork [2,of,4] bundle2.unbundle20: add compressed() method

login
register
mail settings
Submitter Eric Sumner
Date Feb. 6, 2015, 7:47 p.m.
Message ID <53207724988e8c5948fd.1423252052@waste.org>
Download mbox | patch
Permalink /patch/7717/
State Accepted
Commit 184a2f6f40da97768781334fa580795e4f270dc8
Headers show

Comments

Eric Sumner - Feb. 6, 2015, 7:47 p.m.
# HG changeset patch
# User Eric Sumner <ericsumner@fb.com>
# Date 1423180610 28800
#      Thu Feb 05 15:56:50 2015 -0800
# Node ID 53207724988e8c5948fd0ed1835f55763180beaa
# Parent  1ad4be7f38934fb84161588d7d4b106c20beec49
bundle2.unbundle20: add compressed() method

Bundlerepo uses the compressed() method to determine whether it should write
an uncompressed temporary file.  Since we don't support compressed bundle2 files
at the moment, make this method return true.

Patch

diff --git a/mercurial/bundle2.py b/mercurial/bundle2.py
--- a/mercurial/bundle2.py
+++ b/mercurial/bundle2.py
@@ -607,6 +607,8 @@ 
             return self._readexact(headersize)
         return None
 
+    def compressed(self):
+        return False
 
 class bundlepart(object):
     """A bundle2 part contains application level payload