hgext/convert/hg.py
changeset 9431 d1b135f2f415
parent 8693 68e0a55eee6e
child 9432 fef209e65757
child 9531 a2f36a082449
equal deleted inserted replaced
9429:d8143769e1d4 9431:d1b135f2f415
   187         except:
   187         except:
   188             oldlines = []
   188             oldlines = []
   189 
   189 
   190         newlines = sorted([("%s %s\n" % (tags[tag], tag)) for tag in tags])
   190         newlines = sorted([("%s %s\n" % (tags[tag], tag)) for tag in tags])
   191         if newlines == oldlines:
   191         if newlines == oldlines:
   192             return None
   192             return None, None
   193         data = "".join(newlines)
   193         data = "".join(newlines)
   194         def getfilectx(repo, memctx, f):
   194         def getfilectx(repo, memctx, f):
   195             return context.memfilectx(f, data, False, False, None)
   195             return context.memfilectx(f, data, False, False, None)
   196 
   196 
   197         self.ui.status(_("updating tags\n"))
   197         self.ui.status(_("updating tags\n"))
   199         extra = {'branch': self.tagsbranch}
   199         extra = {'branch': self.tagsbranch}
   200         ctx = context.memctx(self.repo, (tagparent, None), "update tags",
   200         ctx = context.memctx(self.repo, (tagparent, None), "update tags",
   201                              [".hgtags"], getfilectx, "convert-repo", date,
   201                              [".hgtags"], getfilectx, "convert-repo", date,
   202                              extra)
   202                              extra)
   203         self.repo.commitctx(ctx)
   203         self.repo.commitctx(ctx)
   204         return hex(self.repo.changelog.tip())
   204         return hex(self.repo.changelog.tip()), hex(tagparent)
   205 
   205 
   206     def setfilemapmode(self, active):
   206     def setfilemapmode(self, active):
   207         self.filemapmode = active
   207         self.filemapmode = active
   208 
   208 
   209 class mercurial_source(converter_source):
   209 class mercurial_source(converter_source):