Mercurial > hg
changeset 9236:a15b0412de06
bookmarks: Teach addchangset to respect track.current
addchangeset didn't respect track.current, resulting in hg pull to forward all
bookmarks although track.current is set to True. Reported by Christos Trochalakis.
author | David Soria Parra <dsp@php.net> |
---|---|
date | Fri, 24 Jul 2009 00:37:42 +0200 |
parents | dde454349864 |
children | abc198bca7c1 |
files | hgext/bookmarks.py |
diffstat | 1 files changed, 8 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/hgext/bookmarks.py Fri Jul 24 00:04:24 2009 +0200 +++ b/hgext/bookmarks.py Fri Jul 24 00:37:42 2009 +0200 @@ -285,10 +285,16 @@ node = self.changelog.tip() marks = parse(self) update = False - for mark, n in marks.items(): - if n in parents: + 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 if update: write(self, marks) return result