hgext3rd/evolve/__init__.py
changeset 2122 efc6633e78e1
parent 2101 de92f7efb030
child 2123 cf7b4ab31f0c
--- a/hgext3rd/evolve/__init__.py	Thu Mar 16 21:16:57 2017 -0400
+++ b/hgext3rd/evolve/__init__.py	Wed Mar 22 03:00:11 2017 +0100
@@ -814,43 +814,6 @@
     _deprecatealias('gup', 'next')
     _deprecatealias('gdown', 'previous')
 
-@eh.command('debugrecordpruneparents', [], '')
-def cmddebugrecordpruneparents(ui, repo):
-    """add parent data to prune markers when possible
-
-    This command searches the repo for prune markers without parent information.
-    If the pruned node is locally known, it creates a new marker with parent
-    data.
-    """
-    pgop = 'reading markers'
-
-    # lock from the beginning to prevent race
-    wlock = lock = tr = None
-    try:
-        wlock = repo.wlock()
-        lock = repo.lock()
-        tr = repo.transaction('recordpruneparents')
-        unfi = repo.unfiltered()
-        nm = unfi.changelog.nodemap
-        store = repo.obsstore
-        pgtotal = len(store._all)
-        for idx, mark in enumerate(list(store._all)):
-            if not mark[1]:
-                rev = nm.get(mark[0])
-                if rev is not None:
-                    ctx = unfi[rev]
-                    parents = tuple(p.node() for p in ctx.parents())
-                    before = len(store._all)
-                    store.create(tr, mark[0], mark[1], mark[2], mark[3],
-                                 parents=parents)
-                    if len(store._all) - before:
-                        ui.write(_('created new markers for %i\n') % rev)
-            ui.progress(pgop, idx, total=pgtotal)
-        tr.close()
-        ui.progress(pgop, None)
-    finally:
-        lockmod.release(tr, lock, wlock)
-
 @eh.command('debugobsstorestat', [], '')
 def cmddebugobsstorestat(ui, repo):
     """print statistics about obsolescence markers in the repo"""