Mercurial > hgsubversion
comparison hgsubversion/wrappers.py @ 1519:aec176db232c
svnrepo: update with the latest upstream change
The Mercurial upstream had a massive change on wireproto interface recently.
Update code to be compatible with both versions.
author | Jun Wu <quark@fb.com> |
---|---|
date | Mon, 21 Aug 2017 15:19:12 -0700 |
parents | fbc22592f4fa |
children | 0212c3a84ccd |
comparison
equal
deleted
inserted
replaced
1518:09476d758b59 | 1519:aec176db232c |
---|---|
87 if isinstance(repo, bool): | 87 if isinstance(repo, bool): |
88 repo = peer | 88 repo = peer |
89 return repo | 89 return repo |
90 | 90 |
91 def getcaps(other): | 91 def getcaps(other): |
92 return (getattr(other, 'caps', None) or | 92 caps = (getattr(other, 'caps', None) or |
93 getattr(other, 'capabilities', None) or set()) | 93 getattr(other, 'capabilities', None) or set()) |
94 | 94 # 'capabilities' might be an instance method |
95 if hgutil.safehasattr(caps, '__call__'): | |
96 caps = caps() | |
97 return caps | |
95 | 98 |
96 def incoming(orig, ui, repo, origsource='default', **opts): | 99 def incoming(orig, ui, repo, origsource='default', **opts): |
97 """show incoming revisions from Subversion | 100 """show incoming revisions from Subversion |
98 """ | 101 """ |
99 | 102 |