comparison hgext/bookmarks.py @ 7262:3cbadcf28a4c

bookmarks: do nothing if commit was not successful.
author Dmitriy Taychenachev <dimichxp@gmail.com>
date Sun, 26 Oct 2008 17:08:48 +0800
parents eb91b9ce2c19
children 810ca383da9c
comparison
equal deleted inserted replaced
7261:4ba89b6d0e05 7262:3cbadcf28a4c
182 182
183 def commit(self, *k, **kw): 183 def commit(self, *k, **kw):
184 """Add a revision to the repository and 184 """Add a revision to the repository and
185 move the bookmark""" 185 move the bookmark"""
186 node = super(bookmark_repo, self).commit(*k, **kw) 186 node = super(bookmark_repo, self).commit(*k, **kw)
187 if node == None:
188 return None
187 parents = repo.changelog.parents(node) 189 parents = repo.changelog.parents(node)
188 if parents[1] == nullid: 190 if parents[1] == nullid:
189 parents = (parents[0],) 191 parents = (parents[0],)
190 marks = parse(repo) 192 marks = parse(repo)
191 update = False 193 update = False