hgext/inhibit.py
changeset 1293 dc5528e04c06
parent 1292 62229e7451f7
child 1297 51ec3610968c
--- a/hgext/inhibit.py	Mon Apr 06 15:44:00 2015 -0700
+++ b/hgext/inhibit.py	Tue Apr 07 14:08:18 2015 -0700
@@ -81,25 +81,20 @@
 
 def _bookmark(orig, ui, repo, *bookmarks, **opts):
     """ Add a -D option to the bookmark command, map it to prune -B """
-    def getdefaultopts(module, command):
-        """ Get default options of a command from a module """
-        cmds = [v for k,v in module.cmdtable.items() if command in k]
-        assert len(cmds) == 1, "Ambiguous command"
-        # Options of the first command that matched
-        cmdopts = cmds[0][1]
-        optsdict = {}
-        for d in cmdopts:
-            optsdict[d[1]] = d[2]
-        return optsdict
-
     haspruneopt = opts.get('prune', False)
-
     if not haspruneopt:
         return orig(ui, repo, *bookmarks, **opts)
+
     # Call prune -B
     evolve = extensions.find('evolve')
-    optsdict = getdefaultopts(evolve, 'prune|obsolete')
-    optsdict['bookmark'] = bookmarks[0]
+    optsdict = {
+        'new': [],
+        'succ': [],
+        'rev': [],
+        'bookmark': bookmarks[0],
+        'keep': None,
+        'biject': False,
+    }
     evolve.cmdprune(ui, repo, **optsdict)
 
 # obsolescence inhibitor