# HG changeset patch # User Thomas Arendsen Hein # Date 2008-10-19 20:07:43 # Node ID 3d080733a339fbfc4fc6e4dadbbcc6e8acfa254b # Parent 09ed32b79656ffcc5ff3e301f140d4a830c77fc9 # Parent 98b6c3dde237d7688fb4c577bc0f851bbd257ca0 merge with crew-stable diff --git a/mercurial/statichttprepo.py b/mercurial/statichttprepo.py --- a/mercurial/statichttprepo.py +++ b/mercurial/statichttprepo.py @@ -42,11 +42,18 @@ class statichttprepository(localrepo.loc try: requirements = self.opener("requires").read().splitlines() except IOError, inst: - if inst.errno == errno.ENOENT: + if inst.errno != errno.ENOENT: + raise + # check if it is a non-empty old-style repository + try: + self.opener("00changelog.i").read(1) + except IOError, inst: + if inst.errno != errno.ENOENT: + raise + # we do not care about empty old-style repositories here msg = _("'%s' does not appear to be an hg repository") % path raise repo.RepoError(msg) - else: - requirements = [] + requirements = [] # check them for r in requirements: