equal
deleted
inserted
replaced
98 def write(self): |
98 def write(self): |
99 if self.dirty and self.transplantfile: |
99 if self.dirty and self.transplantfile: |
100 if not os.path.isdir(self.path): |
100 if not os.path.isdir(self.path): |
101 os.mkdir(self.path) |
101 os.mkdir(self.path) |
102 fp = self.opener(self.transplantfile, b'w') |
102 fp = self.opener(self.transplantfile, b'w') |
103 for list in self.transplants.itervalues(): |
103 for list in pycompat.itervalues(self.transplants): |
104 for t in list: |
104 for t in list: |
105 l, r = map(nodemod.hex, (t.lnode, t.rnode)) |
105 l, r = map(nodemod.hex, (t.lnode, t.rnode)) |
106 fp.write(l + b':' + r + b'\n') |
106 fp.write(l + b':' + r + b'\n') |
107 fp.close() |
107 fp.close() |
108 self.dirty = False |
108 self.dirty = False |