equal
deleted
inserted
replaced
198 if update: |
198 if update: |
199 write(repo, marks) |
199 write(repo, marks) |
200 return node |
200 return node |
201 |
201 |
202 def addchangegroup(self, source, srctype, url, emptyok=False): |
202 def addchangegroup(self, source, srctype, url, emptyok=False): |
203 try: |
203 parents = repo.dirstate.parents() |
204 onode = repo.changectx('.').node() |
|
205 except RepoError, inst: |
|
206 pass |
|
207 |
204 |
208 result = super(bookmark_repo, self).addchangegroup( |
205 result = super(bookmark_repo, self).addchangegroup( |
209 source, srctype, url, emptyok) |
206 source, srctype, url, emptyok) |
210 if result > 1: |
207 if result > 1: |
211 # We have more heads than before |
208 # We have more heads than before |
212 return result |
209 return result |
213 node = repo.changelog.tip() |
210 node = repo.changelog.tip() |
214 marks = parse(repo) |
211 marks = parse(repo) |
215 update = False |
212 update = False |
216 for mark, n in marks.items(): |
213 for mark, n in marks.items(): |
217 if n == onode: |
214 if n in parents: |
218 marks[mark] = node |
215 marks[mark] = node |
219 update = True |
216 update = True |
220 if update: |
217 if update: |
221 write(repo, marks) |
218 write(repo, marks) |
222 return result |
219 return result |