D5155: bundle2: fix broken compression engine assertion

2018-10-19 Thread martinvonz (Martin von Zweigbergk)
This revision was automatically updated to reflect the committed changes.
Closed by commit rHG81c80ed7c991: bundle2: fix broken compression engine 
assertion (authored by martinvonz, committed by ).

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D5155?vs=12253&id=12261

REVISION DETAIL
  https://phab.mercurial-scm.org/D5155

AFFECTED FILES
  mercurial/bundle2.py

CHANGE DETAILS

diff --git a/mercurial/bundle2.py b/mercurial/bundle2.py
--- a/mercurial/bundle2.py
+++ b/mercurial/bundle2.py
@@ -839,7 +839,7 @@
 params = self._readexact(paramssize)
 self._processallparams(params)
 yield params
-assert self._compengine.bundletype == 'UN'
+assert self._compengine.bundletype()[1] == 'UN'
 # From there, payload might need to be decompressed
 self._fp = self._compengine.decompressorreader(self._fp)
 emptycount = 0



To: martinvonz, #hg-reviewers
Cc: mercurial-devel
___
Mercurial-devel mailing list
Mercurial-devel@mercurial-scm.org
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel


D5155: bundle2: fix broken compression engine assertion

2018-10-18 Thread martinvonz (Martin von Zweigbergk)
martinvonz created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.

REVISION SUMMARY
  bundletype() is a function, so it needs to be called, and it is
  documented to return a 2-tuple. This code is untested, so that's why
  we haven't noticed the bad assertion.

REPOSITORY
  rHG Mercurial

REVISION DETAIL
  https://phab.mercurial-scm.org/D5155

AFFECTED FILES
  mercurial/bundle2.py

CHANGE DETAILS

diff --git a/mercurial/bundle2.py b/mercurial/bundle2.py
--- a/mercurial/bundle2.py
+++ b/mercurial/bundle2.py
@@ -839,7 +839,7 @@
 params = self._readexact(paramssize)
 self._processallparams(params)
 yield params
-assert self._compengine.bundletype == 'UN'
+assert self._compengine.bundletype()[1] == 'UN'
 # From there, payload might need to be decompressed
 self._fp = self._compengine.decompressorreader(self._fp)
 emptycount = 0



To: martinvonz, #hg-reviewers
Cc: mercurial-devel
___
Mercurial-devel mailing list
Mercurial-devel@mercurial-scm.org
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel