hgext/transplant.py
changeset 12349 7340b0fa049a
parent 12347 6277a9469dff
child 12581 19dabc8a3236
equal deleted inserted replaced
12348:7f97b4841ee7 12349:7340b0fa049a
    46     def write(self):
    46     def write(self):
    47         if self.dirty and self.transplantfile:
    47         if self.dirty and self.transplantfile:
    48             if not os.path.isdir(self.path):
    48             if not os.path.isdir(self.path):
    49                 os.mkdir(self.path)
    49                 os.mkdir(self.path)
    50             fp = self.opener(self.transplantfile, 'w')
    50             fp = self.opener(self.transplantfile, 'w')
    51             for l in self.transplants.itervalues():
    51             for list in self.transplants.itervalues():
    52                 for c in l:
    52                 for t in list:
    53                     l, r = map(revlog.hex, (c.lnode, c.rnode))
    53                     l, r = map(revlog.hex, (t.lnode, t.rnode))
    54                     fp.write(l + ':' + r + '\n')
    54                     fp.write(l + ':' + r + '\n')
    55             fp.close()
    55             fp.close()
    56         self.dirty = False
    56         self.dirty = False
    57 
    57 
    58     def get(self, rnode):
    58     def get(self, rnode):