Mercurial > hg-stable
changeset 5258:b534c502bfb3
Turn capabilities into a mutable set, instead of a fixed tuple.
author | Bryan O'Sullivan <bos@serpentine.com> |
---|---|
date | Mon, 27 Aug 2007 14:16:04 -0700 |
parents | fd371f99f20b |
children | 65dc707606ed |
files | mercurial/httprepo.py mercurial/localrepo.py mercurial/sshrepo.py |
diffstat | 3 files changed, 5 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/httprepo.py Mon Aug 27 13:38:34 2007 -0700 +++ b/mercurial/httprepo.py Mon Aug 27 14:16:04 2007 -0700 @@ -276,9 +276,9 @@ def get_caps(self): if self.caps is None: try: - self.caps = self.do_read('capabilities').split() + self.caps = util.set(self.do_read('capabilities').split()) except repo.RepoError: - self.caps = () + self.caps = util.set() self.ui.debug(_('capabilities: %s\n') % (' '.join(self.caps or ['none']))) return self.caps
--- a/mercurial/localrepo.py Mon Aug 27 13:38:34 2007 -0700 +++ b/mercurial/localrepo.py Mon Aug 27 14:16:04 2007 -0700 @@ -13,7 +13,7 @@ import os, revlog, time, util, extensions, hook class localrepository(repo.repository): - capabilities = ('lookup', 'changegroupsubset') + capabilities = util.set(('lookup', 'changegroupsubset')) supported = ('revlogv1', 'store') def __init__(self, parentui, path=None, create=0):
--- a/mercurial/sshrepo.py Mon Aug 27 13:38:34 2007 -0700 +++ b/mercurial/sshrepo.py Mon Aug 27 14:16:04 2007 -0700 @@ -71,11 +71,11 @@ else: self.raise_(repo.RepoError(_("no suitable response from remote hg"))) - self.capabilities = () + self.capabilities = util.set() lines.reverse() for l in lines: if l.startswith("capabilities:"): - self.capabilities = l[:-1].split(":")[1].split() + self.capabilities.update(l[:-1].split(":")[1].split()) break def readerr(self):