# HG changeset patch # User Edouard Gomez # Date 2010-07-06 22:06:59 # Node ID 9ff22f600c6c7c304d5f56eb788babc8eec27c25 # Parent 7e525d2f9a75fba3af66a2425c67aa201fa618ae convert: add bookmark support to main command During conversion, read bookmarks from source repo, filter them and push the resulting set of bookmarks to destination sink. diff --git a/hgext/convert/convcmd.py b/hgext/convert/convcmd.py --- a/hgext/convert/convcmd.py +++ b/hgext/convert/convcmd.py @@ -378,6 +378,16 @@ class converter(object): if tagsparents: self.map[tagsparents[0][0]] = nrev + bookmarks = self.source.getbookmarks() + cbookmarks = {} + for k in bookmarks: + v = bookmarks[k] + if self.map.get(v, SKIPREV) != SKIPREV: + cbookmarks[k] = self.map[v] + + if c and cbookmarks: + self.dest.putbookmarks(cbookmarks) + self.writeauthormap() finally: self.cleanup()