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.
--- 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))