##// END OF EJS Templates
convert: add bookmark support to the hg sink
Edouard Gomez -
r13746:d80b7685 default
parent child Browse files
Show More
@@ -21,7 +21,7 b''
21 21 import os, time, cStringIO
22 22 from mercurial.i18n import _
23 23 from mercurial.node import bin, hex, nullid
24 from mercurial import hg, util, context, error
24 from mercurial import hg, util, context, bookmarks, error
25 25
26 26 from common import NoRepo, commit, converter_source, converter_sink
27 27
@@ -214,6 +214,16 b' class mercurial_sink(converter_sink):'
214 214 def setfilemapmode(self, active):
215 215 self.filemapmode = active
216 216
217 def putbookmarks(self, updatedbookmark):
218 if not len(updatedbookmark):
219 return
220
221 self.ui.status(_("updating bookmarks\n"))
222 for bookmark in updatedbookmark:
223 self.repo._bookmarks[bookmark] = bin(updatedbookmark[bookmark])
224 bookmarks.write(self.repo)
225
226
217 227 class mercurial_source(converter_source):
218 228 def __init__(self, ui, path, rev=None):
219 229 converter_source.__init__(self, ui, path, rev)
General Comments 0
You need to be logged in to leave comments. Login now