closehead: fix close-head -r listification
Differential Revision: https://phab.mercurial-scm.org/D4908
--- a/hgext/closehead.py Thu Aug 23 12:25:54 2018 +0900
+++ b/hgext/closehead.py Mon Oct 08 20:07:13 2018 +0200
@@ -28,7 +28,7 @@
commitopts = cmdutil.commitopts
commitopts2 = cmdutil.commitopts2
-commitopts3 = [('r', 'rev', '',
+commitopts3 = [('r', 'rev', [],
_('revision to check'), _('REV'))]
@command('close-head|close-heads', commitopts + commitopts2 + commitopts3,
--- a/tests/test-close-head.t Thu Aug 23 12:25:54 2018 +0900
+++ b/tests/test-close-head.t Mon Oct 08 20:07:13 2018 +0200
@@ -1,8 +1,22 @@
$ hg init test-content
$ cd test-content
- $ hg debugbuilddag '+2*2*3*4'
+ $ hg debugbuilddag '+2*2*3*4+7'
$ hg bookmark -r 1 @
$ hg log -G --template '{rev}:{node|short}'
+ o 11:1d876b1f862c
+ |
+ o 10:ea5f71948eb8
+ |
+ o 9:f1b0356d867a
+ |
+ o 8:e8d1253fb0d7
+ |
+ o 7:d423bbba4459
+ |
+ o 6:a2f58e9c1e56
+ |
+ o 5:3a367db1fabc
+ |
o 4:e7bd5218ca15
|
| o 3:6100d3090acf
@@ -23,11 +37,10 @@
$ hg bookmark
@ 1:66f7d451a68b
$ hg heads
- changeset: 4:e7bd5218ca15
- parent: 0:1ea73414a91b
+ changeset: 11:1d876b1f862c
user: debugbuilddag
- date: Thu Jan 01 00:00:04 1970 +0000
- summary: r4
+ date: Thu Jan 01 00:00:11 1970 +0000
+ summary: r11
changeset: 3:6100d3090acf
parent: 0:1ea73414a91b
@@ -35,7 +48,7 @@
date: Thu Jan 01 00:00:03 1970 +0000
summary: r3
- $ hg --config extensions.closehead= close-head -m 'Close more old heads' 4
+ $ hg --config extensions.closehead= close-head -m 'Close more old heads' -r 11
$ hg heads
changeset: 3:6100d3090acf
parent: 0:1ea73414a91b