equal
deleted
inserted
replaced
107 |
107 |
108 def __delitem__(self, key): |
108 def __delitem__(self, key): |
109 self._clean = False |
109 self._clean = False |
110 return dict.__delitem__(self, key) |
110 return dict.__delitem__(self, key) |
111 |
111 |
|
112 def applychanges(self, repo, tr, changes): |
|
113 """Apply a list of changes to bookmarks |
|
114 """ |
|
115 for name, node in changes: |
|
116 if node is None: |
|
117 del self[name] |
|
118 else: |
|
119 self[name] = node |
|
120 self.recordchange(tr) |
|
121 |
112 def recordchange(self, tr): |
122 def recordchange(self, tr): |
113 """record that bookmarks have been changed in a transaction |
123 """record that bookmarks have been changed in a transaction |
114 |
124 |
115 The transaction is then responsible for updating the file content.""" |
125 The transaction is then responsible for updating the file content.""" |
116 tr.addfilegenerator('bookmarks', ('bookmarks',), self._write, |
126 tr.addfilegenerator('bookmarks', ('bookmarks',), self._write, |