comparison hgext/convert/convcmd.py @ 13745:9ff22f600c6c

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.
author Edouard Gomez <ed.gomez@free.fr>
date Wed, 07 Jul 2010 00:06:59 +0200
parents e9628665b670
children ebaa0aa749e2
comparison
equal deleted inserted replaced
13744:7e525d2f9a75 13745:9ff22f600c6c
376 tagsparents = [e for e in self.map.iteritems() 376 tagsparents = [e for e in self.map.iteritems()
377 if e[1] == tagsparent] 377 if e[1] == tagsparent]
378 if tagsparents: 378 if tagsparents:
379 self.map[tagsparents[0][0]] = nrev 379 self.map[tagsparents[0][0]] = nrev
380 380
381 bookmarks = self.source.getbookmarks()
382 cbookmarks = {}
383 for k in bookmarks:
384 v = bookmarks[k]
385 if self.map.get(v, SKIPREV) != SKIPREV:
386 cbookmarks[k] = self.map[v]
387
388 if c and cbookmarks:
389 self.dest.putbookmarks(cbookmarks)
390
381 self.writeauthormap() 391 self.writeauthormap()
382 finally: 392 finally:
383 self.cleanup() 393 self.cleanup()
384 394
385 def cleanup(self): 395 def cleanup(self):