hgext/convert/hg.py
changeset 21689 503bb3af70fe
parent 21635 5f2cc464e502
child 21765 44255f7ce886
equal deleted inserted replaced
21688:cc677803bad4 21689:503bb3af70fe
   134         def getfilectx(repo, memctx, f):
   134         def getfilectx(repo, memctx, f):
   135             v = files[f]
   135             v = files[f]
   136             data, mode = source.getfile(f, v)
   136             data, mode = source.getfile(f, v)
   137             if f == '.hgtags':
   137             if f == '.hgtags':
   138                 data = self._rewritetags(source, revmap, data)
   138                 data = self._rewritetags(source, revmap, data)
   139             return context.memfilectx(f, data, 'l' in mode, 'x' in mode,
   139             return context.memfilectx(self.repo, f, data, 'l' in mode,
   140                                       copies.get(f))
   140                                       'x' in mode, copies.get(f))
   141 
   141 
   142         pl = []
   142         pl = []
   143         for p in parents:
   143         for p in parents:
   144             if p not in pl:
   144             if p not in pl:
   145                 pl.append(p)
   145                 pl.append(p)
   227         if not newtags:
   227         if not newtags:
   228             return None, None
   228             return None, None
   229 
   229 
   230         data = "".join(newlines)
   230         data = "".join(newlines)
   231         def getfilectx(repo, memctx, f):
   231         def getfilectx(repo, memctx, f):
   232             return context.memfilectx(f, data, False, False, None)
   232             return context.memfilectx(repo, f, data, False, False, None)
   233 
   233 
   234         self.ui.status(_("updating tags\n"))
   234         self.ui.status(_("updating tags\n"))
   235         date = "%s 0" % int(time.mktime(time.gmtime()))
   235         date = "%s 0" % int(time.mktime(time.gmtime()))
   236         extra = {'branch': self.tagsbranch}
   236         extra = {'branch': self.tagsbranch}
   237         ctx = context.memctx(self.repo, (tagparent, None), "update tags",
   237         ctx = context.memctx(self.repo, (tagparent, None), "update tags",