hgext/bookmarks.py
changeset 9237 abc198bca7c1
parent 9236 a15b0412de06
child 9282 f9087eea293a
equal deleted inserted replaced
9236:a15b0412de06 9237:abc198bca7c1
   257                 parents = self.changelog.parents(node)
   257                 parents = self.changelog.parents(node)
   258                 if parents[1] == nullid:
   258                 if parents[1] == nullid:
   259                     parents = (parents[0],)
   259                     parents = (parents[0],)
   260                 marks = parse(self)
   260                 marks = parse(self)
   261                 update = False
   261                 update = False
   262                 for mark, n in marks.items():
   262                 if ui.configbool('bookmarks', 'track.current'):
   263                     if ui.configbool('bookmarks', 'track.current'):
   263                     mark = current(self)
   264                         if mark == current(self) and n in parents:
   264                     if mark and marks[mark] in parents:
   265                             marks[mark] = node
   265                         marks[mark] = node
   266                             update = True
   266                         update = True
   267                     else:
   267                 else:
       
   268                     for mark, n in marks.items():
   268                         if n in parents:
   269                         if n in parents:
   269                             marks[mark] = node
   270                             marks[mark] = node
   270                             update = True
   271                             update = True
   271                 if update:
   272                 if update:
   272                     write(self, marks)
   273                     write(self, marks)