comparison hgext/obsolete.py @ 339:3853061e7fea stable

[obsolete] convert json unicode into string before creating an obsolete marker
author Pierre-Yves David <pierre-yves.david@logilab.fr>
date Fri, 06 Jul 2012 16:25:06 +0200
parents b922d144f93d
children 37b543215187
comparison
equal deleted inserted replaced
338:b922d144f93d 339:3853061e7fea
615 oldsubjects = [repo[s].node() for s in oldsubjects] 615 oldsubjects = [repo[s].node() for s in oldsubjects]
616 except error.RepoLookupError: 616 except error.RepoLookupError:
617 pass 617 pass
618 618
619 oldmark['date'] = '%i %i' % tuple(oldmark['date']) 619 oldmark['date'] = '%i %i' % tuple(oldmark['date'])
620 meta = dict((k.encode('utf-8'), v.encode('utf-8'))
621 for k, v in oldmark.iteritems())
620 try: 622 try:
621 store.create(bin(oldobject), [bin(n) for n in oldsubjects], 623 store.create(bin(oldobject), [bin(n) for n in oldsubjects],
622 0, oldmark) 624 0, meta)
623 except ValueError: 625 except ValueError:
624 repo.ui.write_err("invalid marker %s -> %s\n" 626 repo.ui.write_err("invalid marker %s -> %s\n"
625 % (oldobject, oldsubjects)) 627 % (oldobject, oldsubjects))
626 err += 1 628 err += 1
627 cnt += 1 629 cnt += 1