Show More
@@ -1744,11 +1744,21 class httprepository: | |||
|
1744 | 1744 | qs = urllib.urlencode(q) |
|
1745 | 1745 | cu = "%s?%s" % (self.url, qs) |
|
1746 | 1746 | resp = urllib2.urlopen(cu) |
|
1747 | proto = resp.headers['content-type'] | |
|
1747 | 1748 | |
|
1748 | if not resp.headers['content-type'].startswith('application/hg'): | |
|
1749 | # accept old "text/plain" and "application/hg-changegroup" for now | |
|
1750 | if not proto.startswith('application/mercurial') and \ | |
|
1751 | not proto.startswith('text/plain') and \ | |
|
1752 | not proto.startswith('application/hg-changegroup'): | |
|
1749 | 1753 | raise RepoError("'%s' does not appear to be an hg repository" |
|
1750 | 1754 | % self.url) |
|
1751 | 1755 | |
|
1756 | if proto.startswith('application/mercurial'): | |
|
1757 | version = proto[22:] | |
|
1758 | if float(version) > 0.1: | |
|
1759 | raise RepoError("'%s' uses newer protocol %s" % | |
|
1760 | (self.url, version)) | |
|
1761 | ||
|
1752 | 1762 | return resp |
|
1753 | 1763 | |
|
1754 | 1764 | def heads(self): |
@@ -670,7 +670,7 class hgweb: | |||
|
670 | 670 | sys.stdout.write(" ".join(map(hex, b)) + "\n") |
|
671 | 671 | |
|
672 | 672 | elif args['cmd'][0] == 'between': |
|
673 |
httphdr("application/ |
|
|
673 | httphdr("application/mercurial-0.1") | |
|
674 | 674 | nodes = [] |
|
675 | 675 | if args.has_key('pairs'): |
|
676 | 676 | pairs = [ map(bin, p.split("-")) |
General Comments 0
You need to be logged in to leave comments.
Login now