Mercurial > hg
changeset 9237:abc198bca7c1
bookmarks: optimize update routine in case track.current is set
author | David Soria Parra <dsp@php.net> |
---|---|
date | Fri, 24 Jul 2009 00:40:00 +0200 |
parents | a15b0412de06 |
children | 40196d036a71 |
files | hgext/bookmarks.py |
diffstat | 1 files changed, 7 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- a/hgext/bookmarks.py Fri Jul 24 00:37:42 2009 +0200 +++ b/hgext/bookmarks.py Fri Jul 24 00:40:00 2009 +0200 @@ -259,12 +259,13 @@ parents = (parents[0],) marks = parse(self) update = False - for mark, n in marks.items(): - if ui.configbool('bookmarks', 'track.current'): - if mark == current(self) and n in parents: - marks[mark] = node - update = True - else: + if ui.configbool('bookmarks', 'track.current'): + mark = current(self) + if mark and marks[mark] in parents: + marks[mark] = node + update = True + else: + for mark, n in marks.items(): if n in parents: marks[mark] = node update = True