changeset 23469:65e48b8d20f5

bookmarks: factor out repository lookup from writing bookmarks file This will allow the share extension to extend bookmarks functionality to share bookmarks between repositories.
author Ryan McElroy <rmcelroy@fb.com>
date Tue, 02 Dec 2014 20:31:19 -0800
parents ee311681e591
children 2b23a25f06fd
files mercurial/bookmarks.py
diffstat 1 files changed, 4 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/bookmarks.py	Thu Dec 04 12:02:02 2014 -0500
+++ b/mercurial/bookmarks.py	Tue Dec 02 20:31:19 2014 -0800
@@ -79,6 +79,10 @@
         can be copied back on rollback.
         '''
         repo = self._repo
+        self._writerepo(repo)
+
+    def _writerepo(self, repo):
+        """Factored out for extensibility"""
         if repo._bookmarkcurrent not in self:
             unsetcurrent(repo)