Show More
@@ -3720,6 +3720,19 b' proc doquit {} {' | |||||
3720 | destroy . |
|
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 | # defaults... |
|
3736 | # defaults... | |
3724 | set datemode 0 |
|
3737 | set datemode 0 | |
3725 | set boldnames 0 |
|
3738 | set boldnames 0 |
@@ -266,6 +266,14 b' def revlist(ui, repo, *revs, **opts):' | |||||
266 | copy = [x for x in revs] |
|
266 | copy = [x for x in revs] | |
267 | revtree(copy, repo, full, opts['max_count'], opts['parents']) |
|
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 | def view(ui, repo, *etc, **opts): |
|
277 | def view(ui, repo, *etc, **opts): | |
270 | "start interactive history viewer" |
|
278 | "start interactive history viewer" | |
271 | os.chdir(repo.root) |
|
279 | os.chdir(repo.root) | |
@@ -292,6 +300,8 b' cmdtable = {' | |||||
292 | (catfile, |
|
300 | (catfile, | |
293 | [('s', 'stdin', None, 'stdin')], |
|
301 | [('s', 'stdin', None, 'stdin')], | |
294 | 'hg debug-cat-file [OPTION]... TYPE FILE'), |
|
302 | 'hg debug-cat-file [OPTION]... TYPE FILE'), | |
|
303 | "debug-config": | |||
|
304 | (config, [], 'hg debug-config'), | |||
295 | "debug-merge-base": |
|
305 | "debug-merge-base": | |
296 | (base, [], 'hg debug-merge-base node node'), |
|
306 | (base, [], 'hg debug-merge-base node node'), | |
297 | "debug-rev-parse": |
|
307 | "debug-rev-parse": |
General Comments 0
You need to be logged in to leave comments.
Login now