--- a/mercurial/hg.py Sat May 07 16:11:36 2005 -0800
+++ b/mercurial/hg.py Sat May 07 16:12:31 2005 -0800
@@ -5,15 +5,12 @@
# This software may be used and distributed according to the terms
# of the GNU General Public License, incorporated herein by reference.
-import sys, struct, sha, socket, os, time, base64, re, urllib2, binascii
+import sys, struct, sha, socket, os, time, base64, re, urllib2
import urllib
from mercurial import byterange
from mercurial.transaction import *
from mercurial.revlog import *
-def hex(node): return binascii.hexlify(node)
-def bin(node): return binascii.unhexlify(node)
-
class filelog(revlog):
def __init__(self, opener, path):
s = self.encodepath(path)
@@ -112,6 +109,8 @@
revlog.__init__(self, opener, "00changelog.i", "00changelog.d")
def extract(self, text):
+ if not text:
+ return (nullid, "", 0, [], "")
last = text.index("\n\n")
desc = text[last + 2:]
l = text[:last].splitlines()