Show More
@@ -106,13 +106,12 b' class bmstore(dict):' | |||||
106 | for name, node in self.iteritems(): |
|
106 | for name, node in self.iteritems(): | |
107 | fp.write("%s %s\n" % (hex(node), encoding.fromlocal(name))) |
|
107 | fp.write("%s %s\n" % (hex(node), encoding.fromlocal(name))) | |
108 |
|
108 | |||
109 |
def read |
|
109 | def readactive(repo): | |
110 | '''Get the current bookmark |
|
110 | """ | |
111 |
|
111 | Get the active bookmark. We can have an active bookmark that updates | ||
112 | If we use gittish branches we have a current bookmark that |
|
112 | itself as we commit. This function returns the name of that bookmark. | |
113 | we are on. This function returns the name of the bookmark. It |
|
113 | It is stored in .hg/bookmarks.current | |
114 | is stored in .hg/bookmarks.current |
|
114 | """ | |
115 | ''' |
|
|||
116 | mark = None |
|
115 | mark = None | |
117 | try: |
|
116 | try: | |
118 | file = repo.vfs('bookmarks.current') |
|
117 | file = repo.vfs('bookmarks.current') |
@@ -416,7 +416,7 b' class localrepository(object):' | |||||
416 |
|
416 | |||
417 | @repofilecache('bookmarks.current') |
|
417 | @repofilecache('bookmarks.current') | |
418 | def _bookmarkcurrent(self): |
|
418 | def _bookmarkcurrent(self): | |
419 |
return bookmarks.read |
|
419 | return bookmarks.readactive(self) | |
420 |
|
420 | |||
421 | def bookmarkheads(self, bookmark): |
|
421 | def bookmarkheads(self, bookmark): | |
422 | name = bookmark.split('@', 1)[0] |
|
422 | name = bookmark.split('@', 1)[0] |
General Comments 0
You need to be logged in to leave comments.
Login now