##// END OF EJS Templates
convert: don't use type as a variable name...
Pulkit Goyal -
r36350:aefb7573 default
parent child Browse files
Show More
@@ -168,19 +168,19 b' class convert_git(common.converter_sourc'
168 168 raise error.Abort(_('cannot retrieve git head "%s"') % rev)
169 169 return heads
170 170
171 def catfile(self, rev, type):
171 def catfile(self, rev, ftype):
172 172 if rev == nodemod.nullhex:
173 173 raise IOError
174 174 self.catfilepipe[0].write(rev+'\n')
175 175 self.catfilepipe[0].flush()
176 176 info = self.catfilepipe[1].readline().split()
177 if info[1] != type:
178 raise error.Abort(_('cannot read %r object at %s') % (type, rev))
177 if info[1] != ftype:
178 raise error.Abort(_('cannot read %r object at %s') % (ftype, rev))
179 179 size = int(info[2])
180 180 data = self.catfilepipe[1].read(size)
181 181 if len(data) < size:
182 182 raise error.Abort(_('cannot read %r object at %s: unexpected size')
183 % (type, rev))
183 % (ftype, rev))
184 184 # read the trailing newline
185 185 self.catfilepipe[1].read(1)
186 186 return data
General Comments 0
You need to be logged in to leave comments. Login now