# HG changeset patch # User Shubhanshu Agrawal # Date 1449865657 28800 # Node ID 42c30774e63d3aeace07687740b76c43c6fc37ad # Parent 6a9f0261b181509a8c094ea4a0d5858cbc8004b5 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. diff -r 6a9f0261b181 -r 42c30774e63d hgext/evolve.py --- 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') diff -r 6a9f0261b181 -r 42c30774e63d hgext/inhibit.py --- a/hgext/inhibit.py Fri Dec 11 10:42:46 2015 -0800 +++ b/hgext/inhibit.py Fri Dec 11 12:27:37 2015 -0800 @@ -97,7 +97,7 @@ 'new': [], 'succ': [], 'rev': [], - 'bookmark': bookmarks[0], + 'bookmark': [bookmarks[0]], 'keep': None, 'biject': False, } diff -r 6a9f0261b181 -r 42c30774e63d tests/test-prune.t --- a/tests/test-prune.t Fri Dec 11 10:42:46 2015 -0800 +++ b/tests/test-prune.t Fri Dec 11 12:27:37 2015 -0800 @@ -279,11 +279,15 @@ $ cd .. $ hg init bookmarks $ cd bookmarks - $ hg debugbuilddag '..<2.*1/2:m<2+3:c