diff mercurial/commands.py @ 24944:08ec11e3ae4c

bookmarks: rename unsetcurrent to deactivate (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.
author Ryan McElroy <rmcelroy@fb.com>
date Mon, 13 Apr 2015 21:53:37 -0700
parents a4ee6f774f14
children e0b0fbd47491
line wrap: on
line diff
--- a/mercurial/commands.py	Wed May 06 17:15:38 2015 +0200
+++ b/mercurial/commands.py	Mon Apr 13 21:53:37 2015 -0700
@@ -980,7 +980,7 @@
                         raise util.Abort(_("bookmark '%s' does not exist") %
                                          mark)
                     if mark == repo._bookmarkcurrent:
-                        bookmarks.unsetcurrent(repo)
+                        bookmarks.deactivate(repo)
                     del marks[mark]
                 marks.write()
 
@@ -1006,7 +1006,7 @@
                     if newact is None:
                         newact = mark
                     if inactive and mark == repo._bookmarkcurrent:
-                        bookmarks.unsetcurrent(repo)
+                        bookmarks.deactivate(repo)
                         return
                     tgt = cur
                     if rev:
@@ -1016,7 +1016,7 @@
                 if not inactive and cur == marks[newact] and not rev:
                     bookmarks.setcurrent(repo, newact)
                 elif cur != tgt and newact == repo._bookmarkcurrent:
-                    bookmarks.unsetcurrent(repo)
+                    bookmarks.deactivate(repo)
                 marks.write()
 
             elif inactive:
@@ -1025,7 +1025,7 @@
                 elif not repo._bookmarkcurrent:
                     ui.status(_("no active bookmark\n"))
                 else:
-                    bookmarks.unsetcurrent(repo)
+                    bookmarks.deactivate(repo)
         finally:
             wlock.release()
     else: # show bookmarks
@@ -6413,7 +6413,7 @@
         if repo._bookmarkcurrent:
             ui.status(_("(leaving bookmark %s)\n") %
                       repo._bookmarkcurrent)
-        bookmarks.unsetcurrent(repo)
+        bookmarks.deactivate(repo)
 
     return ret