# HG changeset patch # User Ryan McElroy # Date 2014-12-03 04:31:19 # Node ID 65e48b8d20f58d7b982e4eefb10f720df181d698 # Parent ee311681e5918386743f27d7f6d9e7b85e26e393 bookmarks: factor out repository lookup from writing bookmarks file This will allow the share extension to extend bookmarks functionality to share bookmarks between repositories. diff --git a/mercurial/bookmarks.py b/mercurial/bookmarks.py --- a/mercurial/bookmarks.py +++ b/mercurial/bookmarks.py @@ -79,6 +79,10 @@ class bmstore(dict): 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)