[PATCH 1 of 4] convert: add bookmark support to common sink/source implementation

Edouard Gomez ed.gomez at free.fr
Wed Mar 23 15:50:14 CDT 2011


# HG changeset patch
# User Edouard Gomez <ed.gomez at free.fr>
# Date 1278454019 -7200
# Branch stable
# Node ID 24fe02dbca9978a913650e23b49269530176d5ce
# Parent  a083c6e62acbf9a9389df26fe3af47352161cec3
convert: add bookmark support to common sink/source implementation

diff --git a/hgext/convert/common.py b/hgext/convert/common.py
--- a/hgext/convert/common.py
+++ b/hgext/convert/common.py
@@ -151,6 +151,13 @@
         """
         return None
 
+    def getbookmarks(self):
+        """Return the bookmarks as a dictionary of name: revision
+
+        Bookmark names are to be UTF-8 strings.
+        """
+        return {}
+
 class converter_sink(object):
     """Conversion sink (target) interface"""
 
@@ -228,6 +235,12 @@
     def after(self):
         pass
 
+    def putbookmarks(self, bookmarks):
+        """Put bookmarks into sink.
+
+        bookmarks: {bookmarkname: sink_rev_id, ...} where bookmarkname is an UTF-8 string.
+        """
+        pass
 
 class commandline(object):
     def __init__(self, ui, command):


More information about the Mercurial-devel mailing list