##// END OF EJS Templates
Move hex/bin bits to revlog...
mpm@selenic.com -
r37:a8811676 default
parent child Browse files
Show More
@@ -5,15 +5,12 b''
5 # This software may be used and distributed according to the terms
5 # This software may be used and distributed according to the terms
6 # of the GNU General Public License, incorporated herein by reference.
6 # of the GNU General Public License, incorporated herein by reference.
7
7
8 import sys, struct, sha, socket, os, time, base64, re, urllib2, binascii
8 import sys, struct, sha, socket, os, time, base64, re, urllib2
9 import urllib
9 import urllib
10 from mercurial import byterange
10 from mercurial import byterange
11 from mercurial.transaction import *
11 from mercurial.transaction import *
12 from mercurial.revlog import *
12 from mercurial.revlog import *
13
13
14 def hex(node): return binascii.hexlify(node)
15 def bin(node): return binascii.unhexlify(node)
16
17 class filelog(revlog):
14 class filelog(revlog):
18 def __init__(self, opener, path):
15 def __init__(self, opener, path):
19 s = self.encodepath(path)
16 s = self.encodepath(path)
@@ -112,6 +109,8 b' class changelog(revlog):'
112 revlog.__init__(self, opener, "00changelog.i", "00changelog.d")
109 revlog.__init__(self, opener, "00changelog.i", "00changelog.d")
113
110
114 def extract(self, text):
111 def extract(self, text):
112 if not text:
113 return (nullid, "", 0, [], "")
115 last = text.index("\n\n")
114 last = text.index("\n\n")
116 desc = text[last + 2:]
115 desc = text[last + 2:]
117 l = text[:last].splitlines()
116 l = text[:last].splitlines()
General Comments 0
You need to be logged in to leave comments. Login now