diff hgext/evolve.py @ 1564:42c30774e63d

prune: changing bookmark argument to be a list Currently prune works with a single bookmark the changes in this patch modifies the prune command to accept a list of bookmarks Also changes to inhibit module which internally calls the cmdprune function. the change is to wrap the bookmark input into a list.
author Shubhanshu Agrawal <agrawal.shubhanshu@gmail.com>
date Fri, 11 Dec 2015 12:27:37 -0800
parents 6a9f0261b181
children 25254b2f8116
line wrap: on
line diff
--- a/hgext/evolve.py	Fri Dec 11 10:42:46 2015 -0800
+++ b/hgext/evolve.py	Fri Dec 11 12:27:37 2015 -0800
@@ -2276,7 +2276,7 @@
         _("record a fold (multiple precursors, one successors)")),
      ('', 'split', False,
         _("record a split (on precursor, multiple successors)")),
-     ('B', 'bookmark', '', _("remove revs only reachable from given"
+     ('B', 'bookmark', [], _("remove revs only reachable from given"
                              " bookmark"))] + metadataopts,
     _('[OPTION] [-r] REV...'))
     # -U  --noupdate option to prevent wc update and or bookmarks update ?
@@ -2305,9 +2305,7 @@
     """
     revs = scmutil.revrange(repo, list(revs) + opts.get('rev'))
     succs = opts['new'] + opts['succ']
-    bookmarks = None
-    if opts.get('bookmark'):
-        bookmarks = set([opts.get('bookmark')])
+    bookmarks = set(opts.get('bookmark'))
     metadata = _getmetadata(**opts)
     biject = opts.get('biject')
     fold = opts.get('fold')