##// END OF EJS Templates
bookmarks: do not overwrite bookmarks.current if not necessary...
David Soria Parra -
r7484:167853c7 default
parent child Browse files
Show More
@@ -96,9 +96,15 b' def setcurrent(repo, mark):'
96 96 Set the name of the bookmark that we are on (hg update <bookmark>).
97 97 The name is recoreded in .hg/bookmarks.current
98 98 '''
99 if repo._bookmarkcurrent == mark:
99 if current(repo) == mark:
100 100 return
101
101 102 refs = parse(repo)
103
104 'do not update if we do update to an rev equal to the current bookmark'
105 if (mark not in refs and
106 current(repo) and refs[current(repo)] == repo.changectx('.').node()):
107 return
102 108 if mark not in refs:
103 109 mark = ''
104 110 file = repo.opener('bookmarks.current', 'w+')
General Comments 0
You need to be logged in to leave comments. Login now