[PATCH 3 of 4] convert: add bookmark support to main command
Edouard Gomez
ed.gomez at free.fr
Wed Mar 23 15:50:16 CDT 2011
# HG changeset patch
# User Edouard Gomez <ed.gomez at free.fr>
# Date 1278454019 -7200
# Branch stable
# Node ID 4a80f1cfa260cf5c06230e4fd7175f9d65c7875e
# Parent 3fda6383d43abf72561cd72ea03c197040889cc6
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 @@
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()
More information about the Mercurial-devel
mailing list