Show More
@@ -224,6 +224,7 b' def reposetup(ui, repo):' | |||
|
224 | 224 | in the .hg/bookmarks file. |
|
225 | 225 | Read the file and return a (name=>nodeid) dictionary |
|
226 | 226 | ''' |
|
227 | self._loadingbookmarks = True | |
|
227 | 228 | try: |
|
228 | 229 | bookmarks = {} |
|
229 | 230 | for line in self.opener('bookmarks'): |
@@ -231,6 +232,7 b' def reposetup(ui, repo):' | |||
|
231 | 232 | bookmarks[refspec] = super(bookmark_repo, self).lookup(sha) |
|
232 | 233 | except: |
|
233 | 234 | pass |
|
235 | self._loadingbookmarks = False | |
|
234 | 236 | return bookmarks |
|
235 | 237 | |
|
236 | 238 | @util.propertycache |
@@ -257,6 +259,7 b' def reposetup(ui, repo):' | |||
|
257 | 259 | return super(bookmark_repo, self).rollback(*args) |
|
258 | 260 | |
|
259 | 261 | def lookup(self, key): |
|
262 | if not getattr(self, '_loadingbookmarks', False): | |
|
260 | 263 | if key in self._bookmarks: |
|
261 | 264 | key = self._bookmarks[key] |
|
262 | 265 | return super(bookmark_repo, self).lookup(key) |
@@ -357,6 +360,7 b' def reposetup(ui, repo):' | |||
|
357 | 360 | def _findtags(self): |
|
358 | 361 | """Merge bookmarks with normal tags""" |
|
359 | 362 | (tags, tagtypes) = super(bookmark_repo, self)._findtags() |
|
363 | if not getattr(self, '_loadingbookmarks', False): | |
|
360 | 364 | tags.update(self._bookmarks) |
|
361 | 365 | return (tags, tagtypes) |
|
362 | 366 |
@@ -43,3 +43,18 b' hg strip 1 | hidebackup' | |||
|
43 | 43 | echo % list bookmarks |
|
44 | 44 | hg book |
|
45 | 45 | |
|
46 | echo '% test immediate rollback and reentrancy issue' | |
|
47 | echo "mq=!" >> $HGRCPATH | |
|
48 | hg init repo | |
|
49 | cd repo | |
|
50 | echo a > a | |
|
51 | hg ci -Am adda | |
|
52 | echo b > b | |
|
53 | hg ci -Am addb | |
|
54 | hg bookmarks markb | |
|
55 | hg rollback | |
|
56 | hg bookmarks | |
|
57 | hg bookmarks markb | |
|
58 | hg bookmarks | |
|
59 | cd .. | |
|
60 |
General Comments 0
You need to be logged in to leave comments.
Login now