Show More
@@ -96,9 +96,15 b' def setcurrent(repo, mark):' | |||||
96 | Set the name of the bookmark that we are on (hg update <bookmark>). |
|
96 | Set the name of the bookmark that we are on (hg update <bookmark>). | |
97 | The name is recoreded in .hg/bookmarks.current |
|
97 | The name is recoreded in .hg/bookmarks.current | |
98 | ''' |
|
98 | ''' | |
99 |
if repo |
|
99 | if current(repo) == mark: | |
100 | return |
|
100 | return | |
|
101 | ||||
101 | refs = parse(repo) |
|
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 | if mark not in refs: |
|
108 | if mark not in refs: | |
103 | mark = '' |
|
109 | mark = '' | |
104 | file = repo.opener('bookmarks.current', 'w+') |
|
110 | file = repo.opener('bookmarks.current', 'w+') |
General Comments 0
You need to be logged in to leave comments.
Login now