comparison hgext/convert/hg.py @ 5553:ee80591f5636

convert: save hg revision during a convert This breaks hg->hg hash roundtripping, but that was fragile, didn't work reliably, and hence arguably of little value.
author Bryan O'Sullivan <bos@serpentine.com>
date Mon, 26 Nov 2007 14:01:31 -0800
parents f5345a2d2391
children 2147a734dcf9
comparison
equal deleted inserted replaced
5542:253736bb0dc9 5553:ee80591f5636
239 239
240 def getcommit(self, rev): 240 def getcommit(self, rev):
241 ctx = self.changectx(rev) 241 ctx = self.changectx(rev)
242 parents = [hex(p.node()) for p in ctx.parents() if p.node() != nullid] 242 parents = [hex(p.node()) for p in ctx.parents() if p.node() != nullid]
243 return commit(author=ctx.user(), date=util.datestr(ctx.date()), 243 return commit(author=ctx.user(), date=util.datestr(ctx.date()),
244 desc=ctx.description(), parents=parents, 244 desc=ctx.description(), rev=rev, parents=parents,
245 branch=ctx.branch(), extra=ctx.extra()) 245 branch=ctx.branch(), extra=ctx.extra())
246 246
247 def gettags(self): 247 def gettags(self):
248 tags = [t for t in self.repo.tagslist() if t[0] != 'tip'] 248 tags = [t for t in self.repo.tagslist() if t[0] != 'tip']
249 return dict([(name, hex(node)) for name, node in tags]) 249 return dict([(name, hex(node)) for name, node in tags])