debugobsconvert: make sure obsstore is loaded before version comparison
authorYuya Nishihara <yuya@tcha.org>
Mon, 21 Sep 2015 22:30:44 +0900
changeset 1507 6f574c76c142
parent 1506 a55c691f4cc0
child 1508 8dfb88ca0c08
debugobsconvert: make sure obsstore is loaded before version comparison hg 44918682093f delays loading obsstore, so we have to access _all to get the correct store version.
hgext/evolve.py
--- a/hgext/evolve.py	Wed Sep 16 16:50:06 2015 -0700
+++ b/hgext/evolve.py	Mon Sep 21 22:30:44 2015 +0900
@@ -3496,11 +3496,11 @@
     [('', 'new-format', _bestformat, _('Destination format for markers.'))],
     '')
 def debugobsconvert(ui, repo, new_format):
+    origmarkers = repo.obsstore._all  # settle version
     if new_format == repo.obsstore._version:
         msg = _('New format is the same as the old format, not upgrading!')
         raise util.Abort(msg)
     f = repo.svfs('obsstore', 'wb', atomictemp=True)
-    origmarkers = repo.obsstore._all
     known = set()
     markers = []
     for m in origmarkers: