changeset 32891:7e2eb964a561

exchange: switch to usual way of testing for bundle2-ness We used safehasattr() in one place, but we use isinstance() for this everywhere else, so switch to the latter.
author Martin von Zweigbergk <martinvonz@google.com>
date Fri, 16 Jun 2017 22:57:31 -0700
parents 20fc5d39d0c1
children a7851519ea02
files mercurial/exchange.py
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/exchange.py	Fri Jun 16 21:57:22 2017 -0400
+++ b/mercurial/exchange.py	Fri Jun 16 22:57:31 2017 -0700
@@ -1731,7 +1731,7 @@
         # 'check_heads' call wil be a no-op
         check_heads(repo, heads, 'uploading changes')
         # push can proceed
-        if not util.safehasattr(cg, 'params'):
+        if not isinstance(cg, bundle2.unbundle20):
             # legacy case: bundle1 (changegroup 01)
             with repo.lock():
                 r = cg.apply(repo, source, url)