Tue Dec 20 11:36:01 UTC 2005 nils@ndecker.de
* show raw for noncompressed patches
hunk ./darcsweb.cgi 756
- dsrc = gzip.open(realf)
+ file = open(realf, 'rb')
+ if file.read(2) == '\x1f\x8b':
+ # file begins with gzip magic
+ file.close()
+ dsrc = gzip.open(realf)
+ else:
+ file.seek(0)
+ dsrc = file