##// END OF EJS Templates
convert/hg: make parents() return changectx, not nodes
Patrick Mezard -
r9531:a2f36a08 default
parent child Browse files
Show More
@@ -248,8 +248,7 class mercurial_source(converter_source)
248 return self.lastctx
248 return self.lastctx
249
249
250 def parents(self, ctx):
250 def parents(self, ctx):
251 return [p.node() for p in ctx.parents()
251 return [p for p in ctx.parents() if p and self.keep(p.node())]
252 if p and self.keep(p.node())]
253
252
254 def getheads(self):
253 def getheads(self):
255 if self.rev:
254 if self.rev:
@@ -280,7 +279,7 class mercurial_source(converter_source)
280 if self._changescache and self._changescache[0] == rev:
279 if self._changescache and self._changescache[0] == rev:
281 m, a, r = self._changescache[1]
280 m, a, r = self._changescache[1]
282 else:
281 else:
283 m, a, r = self.repo.status(parents[0], ctx.node())[:3]
282 m, a, r = self.repo.status(parents[0].node(), ctx.node())[:3]
284 # getcopies() detects missing revlogs early, run it before
283 # getcopies() detects missing revlogs early, run it before
285 # filtering the changes.
284 # filtering the changes.
286 copies = self.getcopies(ctx, m + a)
285 copies = self.getcopies(ctx, m + a)
@@ -309,7 +308,7 class mercurial_source(converter_source)
309
308
310 def getcommit(self, rev):
309 def getcommit(self, rev):
311 ctx = self.changectx(rev)
310 ctx = self.changectx(rev)
312 parents = [hex(p) for p in self.parents(ctx)]
311 parents = [p.hex() for p in self.parents(ctx)]
313 if self.saverev:
312 if self.saverev:
314 crev = rev
313 crev = rev
315 else:
314 else:
@@ -332,7 +331,7 class mercurial_source(converter_source)
332 changes = [], ctx.manifest().keys(), []
331 changes = [], ctx.manifest().keys(), []
333 else:
332 else:
334 i = i or 0
333 i = i or 0
335 changes = self.repo.status(parents[i], ctx.node())[:3]
334 changes = self.repo.status(parents[i].node(), ctx.node())[:3]
336 changes = [[f for f in l if f not in self.ignored] for l in changes]
335 changes = [[f for f in l if f not in self.ignored] for l in changes]
337
336
338 if i == 0:
337 if i == 0:
General Comments 0
You need to be logged in to leave comments. Login now