Mercurial > hg
comparison mercurial/statichttprepo.py @ 7637:1d54e2f6c0b7
error: move repo errors
rename NoCapability to CapabilityError
author | Matt Mackall <mpm@selenic.com> |
---|---|
date | Mon, 12 Jan 2009 10:42:31 -0600 |
parents | 95f3694cc5a4 |
children | 4a4c7f6a5912 |
comparison
equal
deleted
inserted
replaced
7636:e3f8c6d6b72e | 7637:1d54e2f6c0b7 |
---|---|
6 # | 6 # |
7 # This software may be used and distributed according to the terms | 7 # This software may be used and distributed according to the terms |
8 # of the GNU General Public License, incorporated herein by reference. | 8 # of the GNU General Public License, incorporated herein by reference. |
9 | 9 |
10 from i18n import _ | 10 from i18n import _ |
11 import changelog, byterange, url | 11 import changelog, byterange, url, error |
12 import repo, localrepo, manifest, util, store | 12 import repo, localrepo, manifest, util, store |
13 import urllib, urllib2, errno | 13 import urllib, urllib2, errno |
14 | 14 |
15 class httprangereader(object): | 15 class httprangereader(object): |
16 def __init__(self, url, opener): | 16 def __init__(self, url, opener): |
77 except IOError, inst: | 77 except IOError, inst: |
78 if inst.errno != errno.ENOENT: | 78 if inst.errno != errno.ENOENT: |
79 raise | 79 raise |
80 # we do not care about empty old-style repositories here | 80 # we do not care about empty old-style repositories here |
81 msg = _("'%s' does not appear to be an hg repository") % path | 81 msg = _("'%s' does not appear to be an hg repository") % path |
82 raise repo.RepoError(msg) | 82 raise error.RepoError(msg) |
83 requirements = [] | 83 requirements = [] |
84 | 84 |
85 # check them | 85 # check them |
86 for r in requirements: | 86 for r in requirements: |
87 if r not in self.supported: | 87 if r not in self.supported: |
88 raise repo.RepoError(_("requirement '%s' not supported") % r) | 88 raise error.RepoError(_("requirement '%s' not supported") % r) |
89 | 89 |
90 # setup store | 90 # setup store |
91 def pjoin(a, b): | 91 def pjoin(a, b): |
92 return a + '/' + b | 92 return a + '/' + b |
93 self.store = store.store(requirements, self.path, opener, pjoin) | 93 self.store = store.store(requirements, self.path, opener, pjoin) |