##// 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 raise error.Abort(_('cannot retrieve git head "%s"') % rev)
168 raise error.Abort(_('cannot retrieve git head "%s"') % rev)
169 return heads
169 return heads
170
170
171 def catfile(self, rev, type):
171 def catfile(self, rev, ftype):
172 if rev == nodemod.nullhex:
172 if rev == nodemod.nullhex:
173 raise IOError
173 raise IOError
174 self.catfilepipe[0].write(rev+'\n')
174 self.catfilepipe[0].write(rev+'\n')
175 self.catfilepipe[0].flush()
175 self.catfilepipe[0].flush()
176 info = self.catfilepipe[1].readline().split()
176 info = self.catfilepipe[1].readline().split()
177 if info[1] != type:
177 if info[1] != ftype:
178 raise error.Abort(_('cannot read %r object at %s') % (type, rev))
178 raise error.Abort(_('cannot read %r object at %s') % (ftype, rev))
179 size = int(info[2])
179 size = int(info[2])
180 data = self.catfilepipe[1].read(size)
180 data = self.catfilepipe[1].read(size)
181 if len(data) < size:
181 if len(data) < size:
182 raise error.Abort(_('cannot read %r object at %s: unexpected size')
182 raise error.Abort(_('cannot read %r object at %s: unexpected size')
183 % (type, rev))
183 % (ftype, rev))
184 # read the trailing newline
184 # read the trailing newline
185 self.catfilepipe[1].read(1)
185 self.catfilepipe[1].read(1)
186 return data
186 return data
General Comments 0
You need to be logged in to leave comments. Login now