# HG changeset patch # User Ryan McElroy # Date 1428991393 25200 # Node ID c44534209a0ac2bdf848fa49cdda771b1a25b20a # Parent e0b0fbd47491e0ec8039f7d530b05280195bbe4b bookmarks: rename readcurrent to readactive (API) Today, the terms 'active' and 'current' are interchangeably used throughout the codebase in reference to the active bookmark (the bookmark that will be updated with the next commit). This leads to confusion among developers and users. This patch is part of a series to standardize the usage to 'active' throughout the mercurial codebase and user interface. diff -r e0b0fbd47491 -r c44534209a0a mercurial/bookmarks.py --- a/mercurial/bookmarks.py Mon Apr 13 22:27:01 2015 -0700 +++ b/mercurial/bookmarks.py Mon Apr 13 23:03:13 2015 -0700 @@ -106,13 +106,12 @@ for name, node in self.iteritems(): fp.write("%s %s\n" % (hex(node), encoding.fromlocal(name))) -def readcurrent(repo): - '''Get the current bookmark - - If we use gittish branches we have a current bookmark that - we are on. This function returns the name of the bookmark. It - is stored in .hg/bookmarks.current - ''' +def readactive(repo): + """ + Get the active bookmark. We can have an active bookmark that updates + itself as we commit. This function returns the name of that bookmark. + It is stored in .hg/bookmarks.current + """ mark = None try: file = repo.vfs('bookmarks.current') diff -r e0b0fbd47491 -r c44534209a0a mercurial/localrepo.py --- a/mercurial/localrepo.py Mon Apr 13 22:27:01 2015 -0700 +++ b/mercurial/localrepo.py Mon Apr 13 23:03:13 2015 -0700 @@ -416,7 +416,7 @@ @repofilecache('bookmarks.current') def _bookmarkcurrent(self): - return bookmarks.readcurrent(self) + return bookmarks.readactive(self) def bookmarkheads(self, bookmark): name = bookmark.split('@', 1)[0]