[PATCH] convert: added bookmarks support in filemap

Etienne Desautels etienne.desautels at gmail.com
Thu Sep 15 14:06:02 CDT 2011


# HG changeset patch
# User etienne <etienne.desautels at gmail.com>
# Date 1316113434 14400
# Node ID 1716b3ec91929593c614c1ccf43500b6999278a3
# Parent  a051f8a6a7ccd93bce8aa856f8e48b7a1ca01f46
convert: added bookmarks support in filemap

When using the convert extension from a Mercurial rep. to subset it with
filemap, the bookmarks are not copied. I fixed this by calling the
base.get_bookmarks() from the filemap getbookmarks() instead of returning an
empty dictionary. It should work also for other converters that implement
getbookmarks() (like git). I don't see any drawbacks except that the bookmarks
are always copied (not necessarily wanted all the times).

diff -r a051f8a6a7cc -r 1716b3ec9192 hgext/convert/filemap.py
--- a/hgext/convert/filemap.py	Wed Sep 07 10:24:26 2011 -0400
+++ b/hgext/convert/filemap.py	Thu Sep 15 15:03:54 2011 -0400
@@ -375,3 +375,6 @@
 
     def lookuprev(self, rev):
         return self.base.lookuprev(rev)
+
+    def getbookmarks(self):
+        return self.base.getbookmarks()


More information about the Mercurial-devel mailing list