# HG changeset patch # User Pierre-Yves David # Date 1416526394 28800 # Node ID 6f08a8f6bb1d611cdf3fe05710917a7a39d5c81f # Parent 04bd66779a1f0e7385e58be9239d7a5fcb5f85d5 debugobsconvert: also deduplicate markers in the process Various bug allowed identical or semantically identical marker to be added to the repository. So we also filter duplicates when converting. diff -r 04bd66779a1f -r 6f08a8f6bb1d hgext/evolve.py --- a/hgext/evolve.py Mon Oct 20 22:16:24 2014 -0400 +++ b/hgext/evolve.py Thu Nov 20 15:33:14 2014 -0800 @@ -2765,7 +2765,14 @@ msg = _('New format is the same as the old format, not upgrading!') raise util.Abort(msg) f = repo.sopener('obsstore', 'wb', atomictemp=True) - markers = repo.obsstore._all + origmarkers = repo.obsstore._all + known = set() + markers = [] + for m in markers: + if m in known: + continue + know.add(m) + markers.append(m) ui.write(_('Old store is version %d, will rewrite in verion %d\n') % ( repo.obsstore._version, new_format)) map(f.write, obsolete.encodemarkers(markers, True, new_format))