Show More
@@ -276,9 +276,9 b' class httprepository(remoterepository):' | |||||
276 | def get_caps(self): |
|
276 | def get_caps(self): | |
277 | if self.caps is None: |
|
277 | if self.caps is None: | |
278 | try: |
|
278 | try: | |
279 | self.caps = self.do_read('capabilities').split() |
|
279 | self.caps = util.set(self.do_read('capabilities').split()) | |
280 | except repo.RepoError: |
|
280 | except repo.RepoError: | |
281 | self.caps = () |
|
281 | self.caps = util.set() | |
282 | self.ui.debug(_('capabilities: %s\n') % |
|
282 | self.ui.debug(_('capabilities: %s\n') % | |
283 | (' '.join(self.caps or ['none']))) |
|
283 | (' '.join(self.caps or ['none']))) | |
284 | return self.caps |
|
284 | return self.caps |
@@ -13,7 +13,7 b' import re, lock, transaction, tempfile, ' | |||||
13 | import os, revlog, time, util, extensions, hook |
|
13 | import os, revlog, time, util, extensions, hook | |
14 |
|
14 | |||
15 | class localrepository(repo.repository): |
|
15 | class localrepository(repo.repository): | |
16 | capabilities = ('lookup', 'changegroupsubset') |
|
16 | capabilities = util.set(('lookup', 'changegroupsubset')) | |
17 | supported = ('revlogv1', 'store') |
|
17 | supported = ('revlogv1', 'store') | |
18 |
|
18 | |||
19 | def __init__(self, parentui, path=None, create=0): |
|
19 | def __init__(self, parentui, path=None, create=0): |
@@ -71,11 +71,11 b' class sshrepository(remoterepository):' | |||||
71 | else: |
|
71 | else: | |
72 | self.raise_(repo.RepoError(_("no suitable response from remote hg"))) |
|
72 | self.raise_(repo.RepoError(_("no suitable response from remote hg"))) | |
73 |
|
73 | |||
74 | self.capabilities = () |
|
74 | self.capabilities = util.set() | |
75 | lines.reverse() |
|
75 | lines.reverse() | |
76 | for l in lines: |
|
76 | for l in lines: | |
77 | if l.startswith("capabilities:"): |
|
77 | if l.startswith("capabilities:"): | |
78 |
self.capabilities |
|
78 | self.capabilities.update(l[:-1].split(":")[1].split()) | |
79 | break |
|
79 | break | |
80 |
|
80 | |||
81 | def readerr(self): |
|
81 | def readerr(self): |
General Comments 0
You need to be logged in to leave comments.
Login now