##// END OF EJS Templates
hgk: add debug-config command to pass configuration options
Patrick Mezard -
r5393:c2ad1890 default
parent child Browse files
Show More
@@ -3720,6 +3720,19 b' proc doquit {} {'
3720 3720 destroy .
3721 3721 }
3722 3722
3723 proc getconfig {} {
3724 global env
3725
3726 set lines [exec $env(HG) debug-config]
3727 regsub -all "\r\n" $lines "\n" config
3728 set config {}
3729 foreach line [split $lines "\n"] {
3730 regsub "^(k|v)=" $line "" line
3731 lappend config $line
3732 }
3733 return $config
3734 }
3735
3723 3736 # defaults...
3724 3737 set datemode 0
3725 3738 set boldnames 0
@@ -266,6 +266,14 b' def revlist(ui, repo, *revs, **opts):'
266 266 copy = [x for x in revs]
267 267 revtree(copy, repo, full, opts['max_count'], opts['parents'])
268 268
269 def config(ui, repo, **opts):
270 """print extension options"""
271 def writeopt(name, value):
272 ui.write('k=%s\nv=%s\n' % (name, value))
273
274 writeopt('vdiff', ui.config('hgk', 'vdiff', ''))
275
276
269 277 def view(ui, repo, *etc, **opts):
270 278 "start interactive history viewer"
271 279 os.chdir(repo.root)
@@ -292,6 +300,8 b' cmdtable = {'
292 300 (catfile,
293 301 [('s', 'stdin', None, 'stdin')],
294 302 'hg debug-cat-file [OPTION]... TYPE FILE'),
303 "debug-config":
304 (config, [], 'hg debug-config'),
295 305 "debug-merge-base":
296 306 (base, [], 'hg debug-merge-base node node'),
297 307 "debug-rev-parse":
General Comments 0
You need to be logged in to leave comments. Login now