diff -r fed842bb84b2 mercurial/hg.py --- a/mercurial/hg.py Tue Jul 19 20:09:04 2005 +++ b/mercurial/hg.py Thu Jul 21 14:28:15 2005 @@ -1687,6 +1687,19 @@ opener = urllib2.build_opener(proxy_handler, authinfo) urllib2.install_opener(opener) + # verify that it's a proper hg repository + resp = urllib2.urlopen(self.url) + headers = dict(resp.headers) + try: + if (headers['pragma'] == 'mercurial/0.1'): + pass + else: + raise KeyError + except KeyError: # no proper 'pragma' header + msg = """'%s' does not appear to be a mercurial repository - +it doesn't have a HTTP 'pragma: mercurial/0.1' header""" % (self.url,) + raise RepoError(msg) + def dev(self): return -1 diff -r fed842bb84b2 templates/header.tmpl --- a/templates/header.tmpl Tue Jul 19 20:09:04 2005 +++ b/templates/header.tmpl Thu Jul 21 14:28:15 2005 @@ -1,4 +1,5 @@ Content-type: text/html +Pragma: mercurial/0.1