mercurial/manifest.py
changeset 9420 d0db168136dc
parent 9416 eecbaac5ca88
child 10263 25e572394f5c
equal deleted inserted replaced
9419:3516a4e877c1 9420:d0db168136dc
   130             checkforbidden(files)
   130             checkforbidden(files)
   131 
   131 
   132             # if this is changed to support newlines in filenames,
   132             # if this is changed to support newlines in filenames,
   133             # be sure to check the templates/ dir again (especially *-raw.tmpl)
   133             # be sure to check the templates/ dir again (especially *-raw.tmpl)
   134             hex, flags = revlog.hex, map.flags
   134             hex, flags = revlog.hex, map.flags
   135             text = ["%s\000%s%s\n" % (f, hex(map[f]), flags(f))
   135             text = ''.join("%s\000%s%s\n" % (f, hex(map[f]), flags(f))
   136                     for f in files]
   136                            for f in files)
   137             arraytext = array.array('c', "".join(text))
   137             arraytext = array.array('c', text)
   138             cachedelta = None
   138             cachedelta = None
   139         else:
   139         else:
   140             added, removed = changed
   140             added, removed = changed
   141             addlist = self._mancache[2]
   141             addlist = self._mancache[2]
   142 
   142 
   188 
   188 
   189             # the delta is only valid if we've been processing the tip revision
   189             # the delta is only valid if we've been processing the tip revision
   190             if p1 != self.tip():
   190             if p1 != self.tip():
   191                 cachedelta = None
   191                 cachedelta = None
   192             arraytext = addlist
   192             arraytext = addlist
       
   193             text = buffer(arraytext)
   193 
   194 
   194         n = self.addrevision(buffer(arraytext), transaction, link,
   195         n = self.addrevision(text, transaction, link, p1, p2, cachedelta)
   195                              p1, p2, cachedelta)
       
   196         self._mancache = (n, map, arraytext)
   196         self._mancache = (n, map, arraytext)
   197 
   197 
   198         return n
   198         return n