Show More
@@ -394,6 +394,16 b' class engine(object):' | |||
|
394 | 394 | |
|
395 | 395 | engines = {'default': engine} |
|
396 | 396 | |
|
397 | def stylelist(): | |
|
398 | path = templatepath()[0] | |
|
399 | dirlist = os.listdir(path) | |
|
400 | stylelist = [] | |
|
401 | for file in dirlist: | |
|
402 | split = file.split(".") | |
|
403 | if split[0] == "map-cmdline": | |
|
404 | stylelist.append(split[1]) | |
|
405 | return ", ".join(stylelist) | |
|
406 | ||
|
397 | 407 | class templater(object): |
|
398 | 408 | |
|
399 | 409 | def __init__(self, mapfile, filters={}, defaults={}, cache={}, |
@@ -415,7 +425,8 b' class templater(object):' | |||
|
415 | 425 | if not mapfile: |
|
416 | 426 | return |
|
417 | 427 | if not os.path.exists(mapfile): |
|
418 |
raise util.Abort(_(' |
|
|
428 | raise util.Abort(_("style '%s' not found") % mapfile, | |
|
429 | hint=_("available styles: %s") % stylelist()) | |
|
419 | 430 | |
|
420 | 431 | conf = config.config() |
|
421 | 432 | conf.read(mapfile) |
@@ -84,6 +84,14 b' log on directory' | |||
|
84 | 84 | abort: cannot follow file not in parent revision: "dir" |
|
85 | 85 | [255] |
|
86 | 86 | |
|
87 | -f, a wrong style | |
|
88 | ||
|
89 | $ hg log -f -l1 --style something | |
|
90 | abort: style 'something' not found | |
|
91 | (available styles: changelog, bisect, default, xml, compact) | |
|
92 | [255] | |
|
93 | ||
|
94 | ||
|
87 | 95 | -f, but no args |
|
88 | 96 | |
|
89 | 97 | $ hg log -f |
General Comments 0
You need to be logged in to leave comments.
Login now