Mercurial > hg
changeset 24514:d01c767d8753
hgk: remove no longer needed debug-config command
author | Andrew Shadura <andrew@shadura.me> |
---|---|
date | Sat, 28 Mar 2015 21:24:57 +0100 |
parents | b5a0b2374eb6 |
children | c1fe7111b6bb |
files | contrib/hgk hgext/hgk.py |
diffstat | 2 files changed, 10 insertions(+), 16 deletions(-) [+] |
line wrap: on
line diff
--- a/contrib/hgk Sat Mar 28 20:05:01 2015 +0100 +++ b/contrib/hgk Sat Mar 28 21:24:57 2015 +0100 @@ -4051,13 +4051,15 @@ proc getconfig {} { global env - - set lines [exec $env(HG) debug-config] - regsub -all "\r\n" $lines "\n" config set config {} - foreach line [split $lines "\n"] { - regsub "^(k|v)=" $line "" line - lappend config $line + + set lines [exec $env(HG) debugconfig] + foreach line [split $lines \n] { + set line [string trimright $line \r] + if {[string match hgk.* $line]} { + regexp {(.*)=(.*)} $line - k v + lappend config $k $v + } } return $config } @@ -4121,8 +4123,9 @@ set stuffsaved 0 set patchnum 0 +set config(hgk.vdiff) "" array set config [getconfig] -set hgvdiff $config(vdiff) +set hgvdiff $config(hgk.vdiff) setcoords makewindow readrefs
--- a/hgext/hgk.py Sat Mar 28 20:05:01 2015 +0100 +++ b/hgext/hgk.py Sat Mar 28 21:24:57 2015 +0100 @@ -335,15 +335,6 @@ copy = [x for x in revs] revtree(ui, copy, repo, full, opts['max_count'], opts['parents']) -@command('debug-config', [], _('hg debug-config')) -def config(ui, repo, **opts): - """print extension options""" - def writeopt(name, value): - ui.write(('k=%s\nv=%s\n' % (name, value))) - - writeopt('vdiff', ui.config('hgk', 'vdiff', '')) - - @command('view', [('l', 'limit', '', _('limit number of changes displayed'), _('NUM'))],