changeset 1507:6f574c76c142

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.
author Yuya Nishihara <yuya@tcha.org>
date Mon, 21 Sep 2015 22:30:44 +0900
parents a55c691f4cc0
children 8dfb88ca0c08
files hgext/evolve.py
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- 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: