comparison hgext/evolve.py @ 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 405be3783fbc
comparison
equal deleted inserted replaced
1506:a55c691f4cc0 1507:6f574c76c142
3494 @command( 3494 @command(
3495 'debugobsconvert', 3495 'debugobsconvert',
3496 [('', 'new-format', _bestformat, _('Destination format for markers.'))], 3496 [('', 'new-format', _bestformat, _('Destination format for markers.'))],
3497 '') 3497 '')
3498 def debugobsconvert(ui, repo, new_format): 3498 def debugobsconvert(ui, repo, new_format):
3499 origmarkers = repo.obsstore._all # settle version
3499 if new_format == repo.obsstore._version: 3500 if new_format == repo.obsstore._version:
3500 msg = _('New format is the same as the old format, not upgrading!') 3501 msg = _('New format is the same as the old format, not upgrading!')
3501 raise util.Abort(msg) 3502 raise util.Abort(msg)
3502 f = repo.svfs('obsstore', 'wb', atomictemp=True) 3503 f = repo.svfs('obsstore', 'wb', atomictemp=True)
3503 origmarkers = repo.obsstore._all
3504 known = set() 3504 known = set()
3505 markers = [] 3505 markers = []
3506 for m in origmarkers: 3506 for m in origmarkers:
3507 # filter out invalid markers 3507 # filter out invalid markers
3508 if nullid in m[1]: 3508 if nullid in m[1]: