equal
deleted
inserted
replaced
40 |
40 |
41 # find requirements |
41 # find requirements |
42 try: |
42 try: |
43 requirements = self.opener("requires").read().splitlines() |
43 requirements = self.opener("requires").read().splitlines() |
44 except IOError, inst: |
44 except IOError, inst: |
45 if inst.errno == errno.ENOENT: |
45 if inst.errno != errno.ENOENT: |
|
46 raise |
|
47 # check if it is a non-empty old-style repository |
|
48 try: |
|
49 self.opener("00changelog.i").read(1) |
|
50 except IOError, inst: |
|
51 if inst.errno != errno.ENOENT: |
|
52 raise |
|
53 # we do not care about empty old-style repositories here |
46 msg = _("'%s' does not appear to be an hg repository") % path |
54 msg = _("'%s' does not appear to be an hg repository") % path |
47 raise repo.RepoError(msg) |
55 raise repo.RepoError(msg) |
48 else: |
56 requirements = [] |
49 requirements = [] |
|
50 |
57 |
51 # check them |
58 # check them |
52 for r in requirements: |
59 for r in requirements: |
53 if r not in self.supported: |
60 if r not in self.supported: |
54 raise repo.RepoError(_("requirement '%s' not supported") % r) |
61 raise repo.RepoError(_("requirement '%s' not supported") % r) |